question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

specialComments and @media queries

See original GitHub issue

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:

@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:closed
  • Created 7 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
jamesmacwhitecommented, Feb 16, 2017

@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.

0reactions
jakubpawlowiczcommented, May 10, 2017

It’s been released in 4.1 as described above.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found