specialComments and @media queries
See original GitHub issueI’ve been testing clean-css 4 in a project that I use it in.
I’ve noticed when using specialComments
0
inside code like this:
@media screen {
/*!
A special CSS comment
*/
}
The whole media query block is removed. Previously under clean-css 3, Having the same special comment within a media query block without any actual CSS rules (essentially an empty media query) would prevent this from happening, and the following would be left over.
@media screen {
}
I’m aware of some of the configuration changes between the versions, is there a specific option that’s causing this, that I can control?
Issue Analytics
- State:
- Created 7 years ago
- Comments:13
Top Results From Across the Web
specialComments and @media queries · Issue #890 - GitHub
I've been testing clean-css 4 in a project that I use it in. I've noticed when using specialComments 0 inside code like this:...
Read more >Using media queries - CSS: Cascading Style Sheets | MDN
A media query is composed of an optional media type and any number of media feature expressions, which may optionally be combined in...
Read more >Responsive Web Design Media Queries - W3Schools
Media query is a CSS technique introduced in CSS3. It uses the @media rule to include a block of CSS properties only if...
Read more >css 4 release
Media Queries defines a syntax for short expressions that describe required features of media (or devices), e. Modules can be altered, extended, ...
Read more >comments in media queries - css - Stack Overflow
Media queries are nothing special in terms of syntax. There have been CSS @ statements for a long time--@import, @font-face, etc.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jakubpawlowicz Thanks! I actually use
gulp-clean-css
which acts as a wrapper, but I can manually test it by overriding the clean-css dep to a specific commit/branch.It’s been released in 4.1 as described above.