argyleink / open-props

CSS custom properties to help accelerate adaptive and consistent design.

Home Page:https://open-props.style

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

--radius-conditional 1e5 syntax doesn't work in Firefox

wcDogg opened this issue · comments

Here is a Codepen showing the issue: https://codepen.io/wcDogg/pen/bGzPwpw

In Firefox 120.0.1, no radius is applied when using this:

--radius-1e5: clamp(0px, calc(100vw - 100%) * 1e5, var(--radius-4));

However, this does work:

--radius-9999: clamp(0px, calc(100vw - 100%) * 9999, var(--radius-4)); 

hmmm... that scientific notation is old school, sounds like a regression in firefox? i'll do some investigation on this, thanks!

hehe, 1e3 and 1e4 work, but not anything 1e5 and above 🤦🏻

so i guess, until that bug is fixed (and maybe just forever), we make all the calc's use 1e4…?

Glad the answer was easy to find - I didn't even think of trying 1e3 or 1e4. Should I close this?

i was going to say leave it open.. but it seems that the calc() in firefox is fine with the 1e5 notation, when it's inside a custom property 🤔

https://codepen.io/argyleink/pen/yLZdjrE/56b6355cf0248aff95e6923e70f76b8f

like, the OP library vars dont seem to fail. can you confirm that? if so, we can close this

Sorry - not sure what the ask is? But, if you open that pen in Firefox, --radius-conditional-3 is not working.

Is the ask to try an OP variable directly like this? No love in Firefox.

https://codepen.io/wcDogg/pen/GRzbGxO

for me just now:
Firefox 120 - shows this bug
Firefox 121 - this bug doesnt happen

which version are you testing in?

Firefox 120.0.1

wanna try 121 and verify the bug is gone? then we can just close this as a temporary firefox regression of 120

Sorry, no - Firefox says I'm up to date with 12.0.1 - I even tried reinstalling it. I'm on Windows 11