Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCSS optimization breaks when :host-context is included #18672
Comments
|
Caused by cssnano/cssnano#730 |
|
I faced the same issue. Workaround is adding an important comment to the :host-context.
|
Command (mark with an
x)Is this a regression?
Yes, the previous version in which this bug was not present was: ....Description
A clear and concise description of the problem...I have a CSS file that is shared between two components, one that uses default encapsulation and one that uses NONE. I have two lines in the CSS as follows:
This works fine with dev/unoptimized builds. However, when done with a prod/optimized build the resulting CSS combines the two selectors:
.darkMode .myLogo,:host-context(.darkMode) .myLogo{color:white}The selector is essentially ignored by the browser.
For the component using default encapsulation it similarly works fine regardless of whether optimized or not.
Anything else relevant?
All that I've tried exhibit same issue.
no.