-
Notifications
You must be signed in to change notification settings - Fork 3.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
Empty @media queries generated when compiling less file with (reference) to bootstrap #2991
Empty @media queries generated when compiling less file with (reference) to bootstrap #2991
Comments
Does this reproduce when using |
I can confirm (at least with BS3) this happens to me as well with latest BS3 and |
As @rjgotten mentioned, it's better to have a minimal example not involving any huge external framework (if there's issue with empty media queries). |
This is nothing to do with Bootstrap, any referenced files should not be adding CSS to the output in this manner. |
@Matthew-Bonner Providing a terse reproduction is common etiquette when filing a bug. |
This gist should be enough to reproduce it. // referenced.less
.referenced {
// line comment is enough to reproduce it
@media (hover) {
// sezam
}
// repeat to prove point
@media (hover) {
// sezam
}
// but block comment is not, huh
@media (hover) {
/* salabim */
}
// following block does not output, needs line comment
@media (hover) {
color: #000000;
}
}
// needs to be nested to fail
@media (hover) {
// sezam
} // index.less
@import (reference) "./referenced.less"; Run: // out.css
@media (hover) {
}@media (hover) {
} |
Then the problem is probably not with |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is still an issue for me. Any progress? I dont use bootstrap. |
@thatcher I marked it as up-for-grabs. |
I'm having the same issue. |
I too have this issue, using Webpack 4 and less-loader. |
Bug still exists in latest version of less - 3.9.0 |
This bug was originally reported to WebCompiler but was stated to be a bug with the node-less module. Please refer to original bug report for more information:
madskristensen/WebCompiler#269
Installed product versions
Description
Empty @media queries generated when compiling less file with (reference) to bootstrap
Steps to recreate
Download bootstrap less files from http://getbootstrap.com/getting-started/#download
Create a less file with a reference import to bootstrap.less and use a mixin:
Compile your less file
Current behavior
The css file contains many empty @media queries
Expected behavior
The css file should not contain empty @media queries
.mybutton { padding: 1px 1px; font-size: 1px; line-height: 1px; border-radius: 1px; }
The text was updated successfully, but these errors were encountered: