-
-
Notifications
You must be signed in to change notification settings - Fork 78.8k
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
add a variable for \00a0 unicode character for breadcrumb #16576
Comments
Can it not be escaped inline? |
According to this link: http://stackoverflow.com/questions/21608762/sass-variable-interpolation-with-backslash-in-output Sass has issue with it, hence the solution there is move the unicode character into a variable. :( |
I haven't tested it myself but In Sass v3.3 you can get around this problem by using the new str-slice() function and doing something like this: @mixin make-icon ($name, $code) {
.#{$name}::before {
content: str-slice("\x",1,1) + $code;
}
}
@include make-icon('foo', 4556); which should output: .foo::before {
content: "\4556";
} EDIT: Oops. The above is basically just mixin vs. variable as above solution. Sorry for the noise I would think, though I don't know, that it would be possible to just use: unescape-string("\\something"); |
You know what, I just reran boostrap-sass again and it seems the problem had gone away. Really not sure why, but I will close it for now. Sorry for the smoke :(. |
The problem still there. I have double slashes in output. |
@xskif Please open an issue in https://github.com/twbs/bootstrap-sass/issues with more details. |
@cvrebert Someone from bootstrap-sass already referred this issue from there "upstream" back to the main bootstrap repository here. It seems bootstrap and bootstrap-sass are both saying it's the problem of the other repository. I'm having the same issue and am just hoping someone knows how to fix it. |
Broken link @orrd fixed link: |
I've asked @orrd to open a new (detailed) bug report in bootstrap-sass. |
There is very simple workaround, just replace interpolation with concatenation: + li:before {
content: $breadcrumb-separator + "\00a0";
padding: 0 5px;
color: $breadcrumb-color;
} I think this could be noted for converter. |
@mrliptontea Thanks, that worked for me! |
Currently, in the breadcrumb file:
Once it's transpiled to sass, then processed through a Sass engine, the slash in "\00a0" gets doubled to "\00a0" causing the breadcrumb to display incorrectly. We can easily factor this unicode out into a variable, which Sass will then properly escape it.
I will submit a PR for it. For reference, here are 2 issues downstream:
twbs/bootstrap-sass#911
lifegadget/ember-cli-bootstrap-sassy#22
The text was updated successfully, but these errors were encountered: