Closed ryrun closed 10 years ago
Descendant selectors are slow. I use stylus mainly with the indent syntax and produce css with many descendant selectors. What about chaining of classnames and combine styles of chained classes and ids?
Example:
.menu padding: 0 margin: 0 _item font-size: 12px color: red .text color: #ccc __link text-decoration: none &:hover text-decoration: underline
Generated CSS:
.menu{ padding:0; margin:0 } .menu_item{ font-size:12px; color:red } .text{ color:#ccc } .text_link{ color:#ccc; text-decoration:none } .text_link:hover{ color:#ccc; text-decoration:underline }
_ = combine previous class or id __ = combine previous class or id and copy styles
What do you think about it?
Ah sorry, wrong github :)
Descendant selectors are slow. I use stylus mainly with the indent syntax and produce css with many descendant selectors. What about chaining of classnames and combine styles of chained classes and ids?
Example:
Generated CSS:
_ = combine previous class or id __ = combine previous class or id and copy styles
What do you think about it?