UM styles are too specific making styling very inefficient
-
As you probably know when we write CSS our goal is to use the minimal number of selectors and minimal level of specificity to create the desired styling. Overuse of specificity is unfortunately something we sometimes see in plugins. UM falls into this category. The CSS styles used throughout the core plugin showcase a terrible practice of massive levels of overkill in specificity, take the example below:
.um-directory .um-member-directory-header .um-member-directory-header-row .um-member-directory-search-line label .um-search-line {}
That’s right that’s 6 selectors. Six. Six! Whoever wrote that is not qualified to do front-end development… send them back for retraining or fire them.
To style UM requires using at 4, 5 or sometimes in the example above SEVEN selectors in order to override the aggressive and incredibly inefficient CSS use of the plugin.
Please read up on CSS best practices and begin to strip out all this bloated CSS code to make it easier for extensions and themes to provide UM override styles.
- The topic ‘UM styles are too specific making styling very inefficient’ is closed to new replies.