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

Css and while

Discussion in 'XenForo Development Discussions' started by Zephyr, Feb 25, 2013.

  1. Zephyr

    Zephyr Well-Known Member

    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?


    /* 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 */
    /* ... */
  2. Arty

    Arty Well-Known Member

    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

Share This Page