less - lesscss - which is the best way -


article {    // css code    //...    // end css code    h1 {       transition: 0.3s;    } }  body.active {     article {         h1 {            transform: translate(0, 10px);          }     }  } 

i try write better

body {     article {        // css code        //...        // end css code        h1 {           transition: 0.3s;        }     }      &.active article {        h1 {           transform: translate(0, 10px);         }     }  } 

and

body {     article {        // css code        //...        // end css code        h1 {           transition: 0.3s;        }     }      &.active article h1 {        transform: translate(0, 10px);      } } 

any suggestion ? want thing this

body {         article {            // css code            //...            // end css code            h1 {               transition: 0.3s;                // here, want write code h1 tag when body has active class in block            }         }       } 

see changing selector order, e.g.:

h1 {     transition: 0.3s;     body.active & {         transform: translate(0, 10px);     } } 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -