Skip to content
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

Squishit ignores Bootstrap 3.3.0 stylesheet #304

Open
peaeater opened this issue Jan 12, 2015 · 5 comments
Open

Squishit ignores Bootstrap 3.3.0 stylesheet #304

peaeater opened this issue Jan 12, 2015 · 5 comments

Comments

@peaeater
Copy link

In Bootstrap 3.3.0 a workaround for Mobile Safari is introduced for temporal inputs, then an "IE 11 hack" reverses the workaround. The latter produces styles like the following:

_:-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: 1.42857143;
}

Squishit ignores the Bootstrap source stylesheet when this syntax is present. In my case I am calling Squishit in an ASP.NET MVC Razor view:

@SquishIt.Framework.Bundle.Css()
.Add("bootstrap-3.3.0.css")
.MvcRender("styles.css")

Commenting out the offending styles makes Squishit include the Bootstrap source again. Bootstrap 3.3.1 does not include the "IE 11 hack" with the naughty syntax, so upgrading Bootstrap is another way to avoid this issue.

@AlexCuse
Copy link
Collaborator

Can you try a couple things for me?

  1. Do other files show up in the combined output if included?
  2. Does it work if you use the null minifier? (call .WithMinifier() on the bundle)?

I'm assuming this is ajaxmin choking on your input CSS. I think using the YUI minifiers might help also.

@peaeater
Copy link
Author

  1. Other files do show up in the combined output, yes.
  2. It works if I call .WithMinifier<NullMinifier>(), yes. Nothing gets compressed, of course.

Just for fun, I did try .WithMinifier<YuiMinifier>(), and that worked, so your surmise re ajaxmin seems correct.

@AlexCuse
Copy link
Collaborator

I would recommend using YUI for everything. The only reason AjaxMin is the default is because it has been for so long and I don't want to pull the rug out from under people in a release. You can call

Bundle.ConfigureDefaults()
    .UseYuiForCssMinification()
    .UseYuiForJsMinification();

in app_start and they will be used for every bundle in your app unless overridden on an individual bundle instance.

@kipusoep
Copy link

We had the same issue with responsivebp v4, thanks for the work-around 👍

@drewfreyling
Copy link

This appears to be broader issue then if the maximum version of AjaxMin supplied with SquishIt causes issues with this and #313 E5-Shim.

@AlexCuse AlexCuse mentioned this issue Jun 22, 2015
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants