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

CSS variables aren't properly compiled #1943

Closed
TakhirMamirov opened this issue Apr 3, 2017 · 10 comments
Closed

CSS variables aren't properly compiled #1943

TakhirMamirov opened this issue Apr 3, 2017 · 10 comments
Milestone

Comments

@TakhirMamirov
Copy link

I have set up the latest version of node-sass compiler (4.5.2 at the moment). Everything in scss is compiled perfectly except for CSS variables. Accordingly to this: sass/libsass#2076 variables compilation should already be in there if SASS 3.5 is used. Am I missing something to make variables compiled correctly?

@xzyfer
Copy link
Contributor

xzyfer commented Apr 3, 2017 via email

@TakhirMamirov
Copy link
Author

For instance, I would like this:

 #datatable {            
            --paper-datatable-column-header: { 
                 font-size: 16px;                 
                 color: #34495e; 
                 background-color: #fbfbfb;                       
            }
}

to be compiled correctly. By default, after SASS compilation it's transformed into:

 #datatable {            
            --paper-datatable-column-header-font-size: 16px; 
            --paper-datatable-column-header-color: ... etc
}

which, apparently, doesn't work.

@nschonni nschonni added this to the 4.6 milestone Apr 24, 2017
@nschonni
Copy link
Contributor

@TakhirMamirov the issue in libsass you've linked to hasn't been implemented yet. This would need to be implemented there and then have the libsass version of node-sass updated for this to be supported.

@xzyfer
Copy link
Contributor

xzyfer commented Apr 27, 2017

The LibSass issue sass/libsass#2076

@Pickra
Copy link

Pickra commented Jan 21, 2018

The libsass issue reported by @xzyfer has been updated

@nschonni nschonni modified the milestones: 4.6, 5.0 Feb 22, 2018
@xzyfer
Copy link
Contributor

xzyfer commented Mar 10, 2018

Fixed in 4.8.0

@xzyfer xzyfer closed this as completed Mar 10, 2018
@madmoizo
Copy link

madmoizo commented Apr 8, 2018

Well, I'm using webpack and css variable like:

:root {
  --primary: $primary
}

$primary is not replaced with its value in v4.8.x
It works in v4.7.x

@xzyfer
Copy link
Contributor

xzyfer commented Apr 8, 2018 via email

@jemomi
Copy link

jemomi commented Apr 9, 2018

We ran into this problem as well, with gulp-sass, and after a long time of trying to fix the problem, and maybe a bit of yelling, we ended up force installing version 4.7.2 on the solution, which solved the problem.

Hope this can help some of you that run into the same problem with node-sass 4.8.x, try installing node-sass 4.7.x

@xzyfer
Copy link
Contributor

xzyfer commented Apr 9, 2018

This is not an issue, it's the correct functionality. Older versions of node-sass will be deprecated. We highly recommend fixing your bugs.

:root {
  --foo: #{$bar};
}

@sass sass locked as resolved and limited conversation to collaborators Apr 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants