Lack of interest Loop in css

  • Thread starter Thread starter Deleted member 10469
  • Start date Start date
This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.
D

Deleted member 10469

Guest
Hello, it would be cool to make loops in the css code.

Example:

HTML:
for( nodeID in xenOptions.nodeList, nodeColor in xenOptions.nodeListColor )
{
    .node{nodeID} .header {
        background: rgb({nodeColor});
    }
}

This idea came to me with my style called Color.
The colors of the categories and subforums are defined by the nodeID.

2Hq37.png


And I have a big duplicate css code:

2HpVR.png


HTML:
.node{$xenOptions.4You_catId_1} .messageUserInfo
{
    background-color: rgba({$xenOptions.4You_color_1}, 0.1) !important;
}
.node{$xenOptions.4You_catId_2} .messageUserInfo
{
    background-color: rgba({$xenOptions.4You_color_2}, 0.1) !important;
}
.node{$xenOptions.4You_catId_3} .messageUserInfo
{
    background-color: rgba({$xenOptions.4You_color_3}, 0.1) !important;
}
.node{$xenOptions.4You_catId_4} .messageUserInfo
{
    background-color: rgba({$xenOptions.4You_color_4}, 0.1) !important;
}
.node{$xenOptions.4You_catId_5} .messageUserInfo
{
    background-color: rgba({$xenOptions.4You_color_5}, 0.1) !important;
}
.node{$xenOptions.4You_catId_6} .messageUserInfo
{
    background-color: rgba({$xenOptions.4You_color_6}, 0.1) !important;
}
.node{$xenOptions.4You_catId_7} .messageUserInfo
{
    background-color: rgba({$xenOptions.4You_color_7}, 0.1) !important;
}
.node{$xenOptions.4You_catId_8} .messageUserInfo
{
    background-color: rgba({$xenOptions.4You_color_8}, 0.1) !important;
}
.node{$xenOptions.4You_catId_9} .messageUserInfo
{
    background-color: rgba({$xenOptions.4You_color_9}, 0.1) !important;
}
.node{$xenOptions.4You_catId_10} .messageUserInfo
{
    background-color: rgba({$xenOptions.4You_color_10}, 0.1) !important;
}
AND MORE FOR ALL PROPERTIES...

The performance is not annoying with the system level cache, it loads very quickly by con, any change is a nightmare, a system of loop/array in css template would solve the problem and extand possibility for devellopers.
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
Back
Top Bottom