Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for nested calc expressions in CSS values #3068

Closed
claudepache opened this issue Dec 23, 2016 · 4 comments
Closed

Support for nested calc expressions in CSS values #3068

claudepache opened this issue Dec 23, 2016 · 4 comments

Comments

@claudepache
Copy link

E.g.

.foo {
    width: calc(3em + calc(100px / 2)); /* equivalent to: calc(3em + (100px / 2)) */
}

This may be useful when working with CSS variables.
See https://developer.mozilla.org/en-US/docs/Web/CSS/calc#Nested_calc()_with_CSS_Variables for details.

Maybe the support for calc may be marked as "partial" if the browser does not support nested calc.

@claudepache claudepache changed the title Nested calc expressions in CSS values Support for nested calc expressions in CSS values Dec 23, 2016
@jraoult
Copy link

jraoult commented Apr 25, 2017

@Fyrd would you consider a PR if I were to submit one for that? I just wasted a couple of hours on Safari for iOS not supporting it, so if I could avoid this pain to someone else it would make my day :)

@JaneX8
Copy link
Contributor

JaneX8 commented May 9, 2017

+1

@brisourceful
Copy link

It would seem that IE 11 has many issues (3+ and counting) with supporting calc() as well. I think it would make more sense to mark this as 'partial' support. Then again, I don't know the qualifications for marking a browser as partial support. Would love to know what that is.

@GPHemsley
Copy link

Looks like this is now covered by MDN data:
https://caniuse.com/mdn-css_types_calc_nested

(via mdn/browser-compat-data#854)

@Fyrd Fyrd closed this as completed Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants