You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Empty @media queries generated when compiling less file with (reference) to bootstrap #2991
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:
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).
Bootstrap itself is not written to be imported with any (reference) option in mind so expecting or not expecting something from above snippet is not quite applicable at all (after all this is not Bootstrap issue tracker).
@Matthew-Bonner
Then give a minimal reproducing case. No-one is going to want to thrawl through acres of Bootstrap code to find the lines that cause those empty media statements to be generated.
Providing a terse reproduction is common etiquette when filing a bug.
Then the problem is probably not with @media queries, but with the treatment of single-line (Less) comments inside @media queries. Now developers will know where to look. :-)
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.
Activity
rjgotten commentedon Dec 31, 2016
Does this reproduce when using
@import (reference)with any sheet containing media queries in general, or is it a Bootstrap-specific thing?fredpalmer commentedon Jun 8, 2017
I can confirm (at least with BS3) this happens to me as well with latest BS3 and
less@2.7.2seven-phases-max commentedon Jun 8, 2017
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).
Bootstrap itself is not written to be imported with any
(reference)option in mind so expecting or not expecting something from above snippet is not quite applicable at all (after all this is not Bootstrap issue tracker).PonchoPowers commentedon Aug 21, 2017
This is nothing to do with Bootstrap, any referenced files should not be adding CSS to the output in this manner.
rjgotten commentedon Aug 21, 2017
@Matthew-Bonner
Then give a minimal reproducing case. No-one is going to want to thrawl through acres of Bootstrap code to find the lines that cause those empty media statements to be generated.
Providing a terse reproduction is common etiquette when filing a bug.
garkin commentedon Nov 27, 2017
This gist should be enough to reproduce it.
Fails in both
less@2.7.3andless@3.0.0-pre.4,node v8.9.1Run:
lessc index.less out.cssrjgotten commentedon Nov 27, 2017
Then the problem is probably not with
@mediaqueries, but with the treatment of single-line (Less) comments inside@mediaqueries. Now developers will know where to look. :-)stale commentedon Mar 28, 2018
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.
thatcher commentedon May 11, 2018
This is still an issue for me. Any progress? I dont use bootstrap.
matthew-dean commentedon May 11, 2018
@thatcher I marked it as up-for-grabs.
jkufrin commentedon May 29, 2018
I'm having the same issue.
lukebanana commentedon Jun 20, 2018
I too have this issue, using Webpack 4 and less-loader.
altcom-neil commentedon Jun 26, 2019
Bug still exists in latest version of less - 3.9.0
Fix #2991 (#3649)