-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
inline !important styles don't get added #1834
Labels
Comments
Inline styles don't need |
True, apart from if you were trying to use |
Rich-Harris
added a commit
that referenced
this issue
Aug 20, 2019
Rich-Harris
added a commit
that referenced
this issue
Aug 20, 2019
Rich-Harris
added a commit
that referenced
this issue
Aug 22, 2019
Handle !important in inline styles
Finally fixed, in 3.9.1 — thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using svelte 2.15.0
if my template has inline !important styles like
<div style="margin:10px !important"></div>
the compiler will create
setStyle(node, 'margin', '10px !important')
which in the end executes
node.style.setProperty('margin', '10px !important')
This fails silently and
margin
attribute doesn't get added, becausesetProperty
expects !important attributes to be added with a flag like this:node.style.setProperty('margin', '10px', 'important')
The text was updated successfully, but these errors were encountered: