refactor: replace hardcoded color values with SCSS variables for consistency #697
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TO BE MERGED IN #696
I believe we should use variables for colors too. So we can use them across all the files.
I also believe, we should consider (when possible) to use name colors instead of our own.
For example, we have defined
#686666
which is very similar to colordimgray
(#696969
). Having standarised colors is interesting, helps to talk about the colors, and helps the autocomplete tools.$fire-brick
is not detected:but
$firebrick
(standard name) is:But the preview shows here matches the standard definition of the color
firebrick
(#b22222
) which might differ from our own definition (#b72e2a
).I do acknowledge that the preview is provided by externals tools (VSCode extension: https://marketplace.visualstudio.com/items?itemName=bierner.color-info). Yet I find the approach and concept presented here important/useful.
Color names
The name of the variables are obtained (sort of) from the following script.
I also used it to find similar colors in for the #695