|
|
|
|
|
by jzimdars
5391 days ago
|
|
> How do you handle adding the same styles to page elements that aren't siblings/exist in vastly different areas of the dom structure? That's usually a case for refactoring. Either by pulling styles common to both elements out and up the tree so they apply more widely or creating a class that can modify both. In the latter case we'll usually use a technique like the last example in the article (more of an OOCSS approach) that works independent of the dom structure. |
|
I could see whatever you pulled out being clobbered by the huge amount of specificity you have built up by mirroring the dom. Heavy use of the child selector would probably prevent that from happening as much, though.