• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Css and while

Zephyr

Well-known member
#1
Hello, I would like to know if there is a way to make a loop or another to avoid the repetition of a css code.

Example, my code:



This code is repeated numerous time.
how to avoid duplication, please?

Example:

HTML:
/* 1 */
.node{$xenOptions.4You_catId_1} .sectionHeaders {
    background-color: rgb({$xenOptions.4You_color_1}) !important;
}
 
/* 2 */
.node{$xenOptions.4You_catId_2} .sectionHeaders {
    background-color: rgb({$xenOptions.4You_color_2}) !important;
}
 
/* 3 */
.node{$xenOptions.4You_catId_3} .sectionHeaders {
    background-color: rgb({$xenOptions.4You_color_3}) !important;
}
 
/* ... */
 
/* 9 */
 
/* ... */
Thanks.
 

Arty

Well-known member
#2
You've posted a thumbnail of screenshot, not actual screenshot. Its impossible to see your code.

From small example you've posted below, its not possible to combine those elements. Values are different