Is it possible to define custom color variables in SCSS and use them effectively?
I followed the instructions given on this particular website, but unfortunately, my efforts have been unsuccessful.
Despite having already installed a preprocessor, I am unable to achieve the desired result.
Additionally, I experimented with creating a color-map and attempting to access the color using map-get, but this approach also proved to be ineffective.
colors.scss file
$yellow_100: #FFC819;
In my style.scss file, I imported colors.scss for reference:
h1 {
color: $yellow_100;
}
Another attempt I made was defining the colors as follows:
colors.scss file
$colors: (
color: #FFBB00
);
Within my style.scss file:
h1 {
color: map-get($colors, color);
}
Unfortunately, neither of these strategies yielded successful results.