-
Notifications
You must be signed in to change notification settings - Fork 262
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
Fix at-rules nesting #216
Fix at-rules nesting #216
Conversation
LGTM, also patched the span {}
@media (min-width: 480px) { div { color: red } }
/* @media[prefix](min-width[prefix]:480px[prefix]) div[prefix]{color:red} */ |
@thysultan thank you! I found another small bug @-webkit-keyframes -[prefix]{0%{opacity:0}100%{opacity:1}}@keyframes -[prefix]{0%{opacity:0}100%{opacity:1}} animations get an extra |
I think that's by design since the key for name-spacing animations is extracted from the namespace and prefixed with a |
In contrast the same key will be applied to the |
@giuseppeg Actually the way it handles it right now looks like incorrect behavior since it prevents you from using an empty namespace to mimic a global namespace with the guarantee that keyframe names are preserved. patched in v3.0.7 |
@thysultan cool, however now (with 3.0.7) namespaced one don't get the prefix: @keyframes hahaha {}
/* result @keyframes hahaha- {} */
/* expected @keyframes hahaha-[data-jsx="123"] {} */ I used |
technically you could also do |
For attributes it grabs just the part after = within quotes, then it converts every invalid character to a valid character. In this case numbers as leading characters are invalid so they are all converted to a single dash but there is also I wonder if we can avoid removing the leading number rule since the key is appended to the authored animation name making it valid in that context. |
Yes that's what I thought too, a string that matches the character class I am fine with any solution :) as soon as it works with our data attributes too (whose value is numeric) – in general I think that this is a valid fix for the library in general. |
patched, v3.0.9 |
Fixes #214