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-menuratherul.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 .availableactionmore (andli:first-child .availableactionquicker, can imagine might target things don't want target), , it'll make easier override styles other classes further down cascade.
Comments
Post a Comment