on-internet
← Community

Chrome returns non-unit calc() results but firefox does not - is there an alternative approach?

Stack Overflow ·

I'm designing a style in css using calc(), but it seems that firefox can't deal with a calc() that just returns an integer that can be used elsewhere. I've searched around but I can't find anyone talking about this specific issue wrt compatibility, everywhere just seems to say that both chrome and firefox fully support calc(); please let me know if you've seen this talked about elsewhere. Here's a reproducible of how I'm testing this to make sure that that's where my issue is: .container{ width:50%; container-type: size; } .card{ background-color: blue; color:white; display:flex; --offset: 5px

Comments

Sign in or sign up to comment and upvote.

No comments yet.