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

Bare CSS color names should not be compressed when used in string expressions #2232

Closed
bwbuchanan opened this issue Nov 30, 2016 · 2 comments

Comments

@bwbuchanan
Copy link

bwbuchanan commented Nov 30, 2016

Upstream issue: sass/sass#2196

.#{'b-' + black} {
  background: black;
}

LibSass 3.4.0-RC1

.b-#000{background:black}

Ruby Sass 3.4.22

.b-#000{background:black}
@xzyfer
Copy link
Contributor

xzyfer commented Dec 5, 2016

@bwbuchanan thanks for the report. I have confirm this behaviour is broken in both LibSass and Ruby Sass.

@sapegin
Copy link

sapegin commented Mar 13, 2017

Another example:

$colors: red #f00, yellow #ff0, green #0f0, blue #00f;
@each $entry in $colors {
    $name: nth($entry, 1);
    $color: nth($entry, 2);

    .box-#{$name} > header {
         background: $color;
    }
}

Was reported at Ruby Sass in 2013, I can reproduce it in Libasass 3.5.0.beta.2 (via node-sass 4.5.0). Seems to be fine in LibSass 3.4.0 though.

Another similar issue — #1701

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

4 participants