1

just as a precursor, you should know that I currently don't have the option of referencing another version of Bootstrap or using a CDN version of a minified Bootstrap.

In my scenario, we have LESS files from Bootstrap being referenced by our own LESS files. Recently, while trying to generate a compressed version of the CSS using SquishIt, I noticed that the output file was completely empty.

I traced the offending portion back to Bootstrap's forms.less, specifically these IE11 hacks:

// IE 11 hack to reverse the iOS temporal input hack.
_:-ms-fullscreen, :root input[type="date"],
_:-ms-fullscreen, :root input[type="time"],
_:-ms-fullscreen, :root input[type="datetime-local"],
_:-ms-fullscreen, :root input[type="month"] {
  line-height: @line-height-base;

  &.input-sm {
    line-height: @line-height-small;
  }
  &.input-lg {
    line-height: @line-height-large;
  }
}

Does anybody know why this particular block would generate CSS that breaks the compression and cause an empty file to be output? Is it the underscore selector? Commenting out this LESS portion fixes it and everything compresses fine, but that does not seem like the right fix.

Also of note, I'm using Web Essentials 2013 in Visual Studio 2013 to do my LESS to CSS compilation, and WE2013 is telling me in the IDE that the underscore selector is an invalid selector. Not sure if this is WE limitation generating incorrect CSS from the LESS?

Jay S
  • 7,904
  • 2
  • 39
  • 52
  • I've ended up commenting out these lines. I didn't find any documentation regarding this issue. Did you made any progress with it? – HuBeZa Mar 06 '17 at 09:13
  • 1
    I also had to just comment it out as nobody seemed to have a solution or answer for the question. – Jay S Mar 06 '17 at 13:47

1 Answers1

1

I don't know much about web essentials. Have you looked at SquishIt.Less? It may use a more up to date version of dotless.

If its not dotless, I'd suspect a minifier issue. If this is the case switching to YUI might help. Can do so with the following in global.asax.cs

Bundle.ConfigureDefaults().UseYuiForCssMinification()

AlexCuse
  • 18,008
  • 5
  • 42
  • 51