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

CSS variables not compiling sass variables #1147

Closed
joshuajohnson814 opened this issue Apr 18, 2018 · 3 comments
Closed

CSS variables not compiling sass variables #1147

joshuajohnson814 opened this issue Apr 18, 2018 · 3 comments
Labels
needs reproduction This issue is missing a minimal runnable reproduction, provided by the author

Comments

@joshuajohnson814
Copy link

joshuajohnson814 commented Apr 18, 2018

Version

3.0.0-beta.6

Reproduction link

https://codesandbox.io/s/18k1ormynl

Steps to reproduce

Usage of CSS Variables inside of a scoped component is not compiling SCSS variables used with a CSS variable.

HelloWorld.vue

<style lang="scss" rel="stylesheet/scss" scoped>
h3 {
  color: var(--h3-color, blue);
}

App.vue

<style lang="scss">
$variable-name: red;
#app {
  --h3-color: $variable-name;
}

The compiled css results is --h3-color: $variable-name; as shown in Chrome when it is expected to be --h3-color: red;

What is expected?

The css variable instance is expected to compile the sass variable into the resolved value.

What is actually happening?

The scss variable is not being compiled.


I wasn't able to get the cli 3 beta 6 running with code sandbox but you can see the file changes I made in my steps to reproduce. I'm running that code locally and seeing the issue.

@LinusBorg
Copy link
Member

Plesase provide an actual reproduction. codesandbox doesn't use vuze-cli 3 so doesn't count ;)

@LinusBorg LinusBorg added the needs reproduction This issue is missing a minimal runnable reproduction, provided by the author label Apr 20, 2018
@soft903
Copy link

soft903 commented Apr 23, 2018

@joshuajohnson814 ,
for SCSS / SASS with CSS variable
--h3-color: #{$variable-name};

@joshuajohnson814
Copy link
Author

@soft903 thanks that worked. closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reproduction This issue is missing a minimal runnable reproduction, provided by the author
Projects
None yet
Development

No branches or pull requests

3 participants