Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

postCSS definitions issue in sass #1624

Closed
alisamar opened this issue Jul 7, 2016 · 3 comments
Closed

postCSS definitions issue in sass #1624

alisamar opened this issue Jul 7, 2016 · 3 comments

Comments

@alisamar
Copy link

alisamar commented Jul 7, 2016

I am having strange issue when I test the postCSS with Sass!

HTML color names converted to the hex code!

// SASS
:root {
  --teal: #444; // postCSS variable
}

div.1 { content: var(--teal) } // postCSS definition
div.2 { content: (- red) }
div.3 { content: (+- blue) }
div.4 { content: (-green) }
div.5 { content: (+ yellow) }
/* CSS OUTPUT */
:root {
  --teal: #444; }

div.1 {
  content: var(--#008080); }
div.2 {
  content: -#ff0000; }
div.3 {
  content: +-#0000ff; }
div.4 {
  content: -#008000; }
div.5 {
  content: +#ffff00; }

so I can not use color names as variable in postCSS with sass :(

@nschonni
Copy link
Contributor

nschonni commented Jul 8, 2016

@xzyfer
Copy link
Contributor

xzyfer commented Aug 4, 2016

This a known issue. Colour names are converted to their colour values. This shouldn't happen with custom properties i.e. --red. This was a feature recently added to Ruby Sass. It has not landed in LibSass yet.

@xzyfer
Copy link
Contributor

xzyfer commented Aug 4, 2016

This is a bug with LibSass. Move this issue there sass/libsass#2140

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

3 participants