-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Enable vars and nested calc&var #127
base: main
Are you sure you want to change the base?
Conversation
This library already just passes calc's right through. I propose doing the same with var and nested calcs and nested vars. We don't need to resolve them, but I do need them not to be swallowed silently in my tests.
Codecov Report
@@ Coverage Diff @@
## master #127 +/- ##
==========================================
+ Coverage 37.39% 37.65% +0.26%
==========================================
Files 87 87
Lines 1182 1187 +5
Branches 227 229 +2
==========================================
+ Hits 442 447 +5
Misses 633 633
Partials 107 107
Continue to review full report at Codecov.
|
Just stumbled across this pull request after trying to figure out why Instead of defining a new VAR parser type, should CSSStyleDeclaration.setProperty be updated instead? There's already a check for custom properties which can be leveraged. I'd suggest doing this (the only change is to setting isCustomProperty):
As implemented in this pull request, only the color property will be able to use |
Thanks for taking a look, I'll see if I can find some time to update and check if that works, authors of the repo should feel free to push to my fork as well if they get to it before I do |
@domenic @jsakas I'd like to follow up here (and on this PR) since it appears that there are a number of missing features from here is a minimum-viable failure case using the vanilla-extract styling library which relies heavily on CSS variables to enable performant theming and dynamic styling https://stackblitz.com/edit/node-x7idfl?file=Button.test.tsx |
This comment was marked as spam.
This comment was marked as spam.
# Conflicts: # lib/parsers.js # lib/parsers.test.js
@hughes-ch thanks for the suggestion, I think that will work. I've updated the PR. Apologies for the long wait |
This library already just passes calc's right through. I propose doing the same with var and nested calcs and nested vars. We don't need to resolve them, but I do need them not to be swallowed silently in my tests.