csstools / csstools/postcss-advanced-variables

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

Open
#92 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
144
Forks
33
PR merge metrics
No merged PRs in 30d

Description

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!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.