shadycss
shadycss copied to clipboard
Issues with mixins having `!important` properties when using native custom properties.
From @blasten on June 9, 2016 0:1
Say I have:
:host {
--a: 10px;
--b: {
width: var(--a) !important;
};
}
div {
@apply(--b);
}
Expected Results
The mixin transformer to native custom properties should preserve the !important property
div {
width: var(--b_-_width) !important;
}
Actual Results
The mixin transformer to native custom properties generates the following rule (moreless):
div {
width: var(--b_-_width); /* No !important */
}
Browsers Affected
All browsers that support this setup.
Versions
- Polymer: master branch and
useNativeCSSProperties: true
Copied from original issue: Polymer/polymer#3700
Wow, this turned out to be a critical issue for me in current project, will try to fix it
I've fixed this in #171, hope for quick review and merge into next patch version