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

IE breadcrumb display is ugly when using SASS version 3.4 #803

Closed
tdonohue opened this issue Dec 18, 2014 · 9 comments
Closed

IE breadcrumb display is ugly when using SASS version 3.4 #803

tdonohue opened this issue Dec 18, 2014 · 9 comments

Comments

@tdonohue
Copy link

When using the latest version of SASS (version 3.4) with bootstrap-sass, the breadcrumb separator is wrongly decoded as ISO-8859-1 when using Internet Explorer version 10 and 11.

The problematic character seems to be the Unicode non-breaking space (\00a0) on this line:
https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_breadcrumbs.scss#L17

In SASS version 3.3, the hexcode for the Unicode non-breaking space was left as-is in the final CSS. So, the final CSS would actually include "\00a0". However, in SASS version 3.4, this behavior has changed, and in the final CSS the character is now translated to a Unicode space (" ").

While most browsers (Chrome, Firefox, Safari, Opera) properly display this new Unicode space (" ") from CSS, for some reason Internet Explorer wants to read it as ISO-8859-1 and displays "Â " instead. The resulting breadcrumb is something like this (assuming your breadcrumb-separator is the default slash):

Home /Â  Page /Â  SubPage

In the end, this means that SASS version 3.4 + bootstrap-sass results in ugly breadcrumbs in Internet Explorer. Whereas, SASS version 3.3 + bootstrap-sass works perfectly in all browsers.

More information (including some possible workarounds using functions) on this new behavior in SASS version 3.4 can be found in this related SASS ticket/request: sass/sass#1395

The only workaround I've found so far is to simply revert to using SASS version 3.3.

@cvrebert
Copy link
Collaborator

@twbs/sass Ping.

@glebm
Copy link
Member

glebm commented Jan 14, 2015

Unquoting the string seems to work around the issue. Will work around on the converter level.

glebm added a commit that referenced this issue Jan 14, 2015
Work around Sass 3.4.x generating BOM that break IE10+
sass/sass#1395
@glebm glebm added this to the v3.3.2 milestone Jan 14, 2015
@glebm glebm closed this as completed in 443d5b4 Jan 19, 2015
glebm added a commit that referenced this issue Jan 19, 2015
This reverts commit 443d5b4.
This "fix" breaks everything. Sorry!
@glebm glebm reopened this Jan 19, 2015
@glebm glebm added the docs label Jan 19, 2015
@glebm glebm removed this from the v3.3.2 milestone Jan 19, 2015
@cvrebert
Copy link
Collaborator

Does IE misinterpret it even with a @charset declaration in the CSS?

@cvrebert
Copy link
Collaborator

@tdonohue Does your CSS include an @charset declaration?

@cvrebert
Copy link
Collaborator

cvrebert commented Jun 3, 2015

JS Bin testcase: http://output.jsbin.com/potulo/2
(Using Sass 3.4.14 (Selective Steve))

@cvrebert
Copy link
Collaborator

cvrebert commented Jun 3, 2015

Unable to reproduce in IE11:
ie11

Unable to reproduce in IE10:
ie10

@glebm Were you ever able to repro this?

@glebm
Copy link
Member

glebm commented Jun 3, 2015

The cause of this seems to be sass/sass#1395:

SASS outputs a file with a BOM, which ends up in the middle of my concatenated files and causes other headaches.

I am guessing this is reproducible if there are other non-UTF-8 CSS files concatenated with bootstrap, but I haven't tried myself.

One workaround in that thread is:

<meta charset="utf-8" />

@tdonohue Can you try this? Thanks

@cvrebert
Copy link
Collaborator

cvrebert commented Jun 3, 2015

Sounds like either a Sass bug or a concatenator bug then, as opposed to a bug in Bootstrap itself.

@glebm
Copy link
Member

glebm commented Jun 3, 2015

Yes, though it may be possible to work around this on our side, I haven't found a way to this compatibly with all Sass versions (I have already tried all of the workaround in the linked sass bug). Closing for now, as this is something a smart concatenator should handle anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants