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

Breadcrumb variable interpolation breaking sourcemaps #1105

Closed
JoshMoreno opened this issue Feb 5, 2017 · 0 comments
Closed

Breadcrumb variable interpolation breaking sourcemaps #1105

JoshMoreno opened this issue Feb 5, 2017 · 0 comments

Comments

@JoshMoreno
Copy link

For reference - #919

I think the above issue has to be reopened. Sorry if I should be posting there, kinda new to github and its issue/bug tracking.

So from what I can tell, there used to be an issue with how libsass compiled the following:

content: "#{$breadcrumb-separator}\00a0";

So it got changed to:

$nbsp: "\00a0";
content: "#{$breadcrumb-separator}#{$nbsp}";

But now that leads to it getting compiled to:

content: "/ ";

And on top of that if the libsass output style is set to compressed it causes source maps to be inaccurate. The other output styles are fine though. I submitted an issue over there - sass/libsass#2319

Proposition

Because this whole variable interpolation stuff is pretty unreliable and inconsistent across recent versions of libsass, I propose to just hardcode the value. So...

content: "/\00a0";

That way it will work for people using slightly older versions of libsass and also for people using the recent version(s). And though we won't have a simple variable to change/override, it's super easy to override the old fashion way. For example

.breadcrumb>li+li:before {
    content: "\003e\00a0"; // for a ">" instead of a "/"
}

I'd much rather have minified css and source maps than a variable for breadcrumbs. I know, as a work around, I could use a separate css minifier, but they add nearly one second to compile time. Libsass is fast and hard to beat and I really like to keep things simple and fast whenever possible.

Thoughts on this?

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

2 participants