I found the bug looking at the Github "bug" badge that appears on issues and isolated it to this snippet:
<style>
span {
color: hsl(0deg, 0%, calc(1 * 100%));
/* This works: */
/* color: hsl(0deg, 0%, 100%); */
/* While this produces the "bug" in FF too: */
/* color: hsl(0deg, 0%, 100); */
background-color: red;
font-size: 10em;
}
</style>
<span> bug </span>
This is how it looks in Firefox:
...and this is how it looks in Ladybird:
I think that the problem is that calc
doesn't preserve the %
in the result.
I was also able to spot a FIXME
in StyleValue.cpp about calc
and persentages but I'm not sure on how to proceed further since my C++ isn't that great..
First issue on Serenity, I hope I've been doing things right and that this will be helpful to someone :^)
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too