Answer the question
In order to leave comments, you need to log in
How to keep track of color variables (colors) in a large project?
Hello, I'm currently working on a large project that has a separate list of variables for colors. At the moment it looks like this
$color_black
$color_dark_black
$color_black2
$color_very_dark_black
In general, a complete mess. Please tell me how to keep the names of variable colors in order (we refer to them often).
Answer the question
In order to leave comments, you need to log in
Name them functionally, not by content.
color_header
color_body
etc.
As if taken from my project. Not sass by any chance?
A lot of advice has been given above. I do not claim to be an expert, but in my opinion it is correct to give a color a meaningful name.
Those. you are doing everything right.
But then, as GavriKos said, do it this way, but with slight changes in the
pseudocode (too lazy to remember the syntax)
//Цвета
$color_black:#000000;
//Цвет хэдэра
$color_header=$color_black;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question