Skip to content

[ShadyCSS] Parse and flatten nested calc() #196

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

wessberg
Copy link

@wessberg wessberg commented Sep 9, 2019

Reference Issue

#8

Migrated from: webcomponents/shadycss#242

Original description:

This PR adds a minimal CSS calc() parser strictly for flattening nested calc() expressions which may be the result of shimming CSS Custom Properties at runtime. This is important because browsers such as IE and Edge <= 15 doesn't support nested calc() which leads to broken styling under some circumstances as is outlined in #241.

The implementation use a heuristic to take a fast path for text that include less than two calc()s to avoid unnecessary work.

I've added Closure Compiler comments and there are no warnings.

@stale
Copy link

stale bot commented Sep 28, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 28, 2022
@wessberg
Copy link
Author

As I wrote last time this was marked as stale:

I would appreciate if this issue is kept open, as there is a PR ready and this causes issues in IE and Edge <= 15. By merging in the open PR, better interoperability will be achieved with these older browsers.

At this point, this issue and PR has been open for years with no response from the maintainers. I've had the web components polyfills served based on this PR for years via polyfill.app, which improves compatibility with these browsers visually

@stale stale bot removed the wontfix label Sep 28, 2022
Copy link

stale bot commented Apr 26, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants