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

Suggestion for a new feature: Read-Only Variables to Overide other Variables #92

Open
Saggitarie opened this issue Jun 15, 2021 · 2 comments

Comments

@Saggitarie
Copy link

Saggitarie commented Jun 15, 2021

Hey @jonathantneal !

To begin with, thanks for a great plugin!

Since we want to use our NUXTJS boilerplate on various projects, we want to be able to change the values for properties like background colors or width dynamically without changing the whole template each time.

Here is an example:

./overriding.sss  
$background-color: orange ---> This overrides and affects all the files in variablee.sss and other files that uses this variable. 

*Order of the files doesn't matter here
./variable.sss
$fg:                 	$blue
$fg--1:              	color( $fg shade(15%) )
$fg--2:              	color( $fg shade(30%) )
$fg-1:              	color( $fg tint(15%) )
$fg-2:              	color( $fg tint(30%) )

The syntax for overriding features can be something like:

@readonly {
   $fg: yellow
}

This readonly declaration comes before the original $fg declaration defined in other file.

We are thinking of making a PR. We really want to have this feature added!

Appreciate any response!

@jonathantneal
Copy link
Collaborator

I like it. Forgive me if this is a daft question, but does this mirror an existing Sass feature, too?

@Saggitarie
Copy link
Author

@jonathantneal
Thanks for the question! Yeah, Sass doesn't have this feature implemented.

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