-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Closed
Description
Even though nesting properties in LESS feels so natural, it often results in inefficient CSS that overuses the costly descendant selector, as shown below:
.topbar form input
.pagination ul li a
.topbar ul li ul li a
.tabs li aRemoving the superfluous descendants yields much more optimized—and simplified—CSS:
.topbar input
.pagination ul a /* or */ .pagination li a
.topbar ul ul a /* or */ .topbar li li a
.tabs aAlthough these changes may make the LESS files a tad less intuitive, they are valuable when it comes to speed and will be of benefit to a large CSS framework such as this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels