css - Simplifying/combining nested LESS -


i have following less:

ul.dropdown-menu {   padding-top: 0;   z-index: 2010;   li:first-child {     a.disabled.heading {       &.availableaction {         border-top: none;         margin: 0;       }     }   } } 

is there way combine li:first-child, a.disabled.heading, , &.availableaction selectors?

do mean this?

ul.dropdown-menu {   padding-top: 0;   z-index: 2010;   li:first-child a.disabled.heading.availableaction {     border-top: none;     margin: 0;   } } 

less supports nesting never requires use it.


unasked notes :)

  • hope z-index arbitrary-looking , huge reason
  • if possible, design selector names can .dropdown-menu rather ul.dropdown-menu - browser process first 1 more second
  • if possible, it's practice use less specific selector ul.dropdown-menu li:first-child a.disabled.heading.availableaction. again, browsers process .dropdown li:first-child .availableaction more (and li:first-child .availableaction quicker, can imagine might target things don't want target), , it'll make easier override styles other classes further down cascade.

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -