Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Modifying one rule or even the HTML can cascade a lot of unintended styling changes. It’s about minimizing dependencies and achieving separation of concerns.

For example look at this:

Code Block
.global-logs .main-logs .line-marker .descriptor--new-entries button {
   background-color: transparent;
   color: var(--grey-600); 
}

This is quite fragile and it’s hard when you are looking “button” to find the relevant matching CSS rules - using flatter hierarchies and prefix name spaces is much easier to find the relevant class and it is less fragile to changes in HTML and CSS. i.e.

Code Block
.LOGbutton{
   background-color: transparent;
   color: var(--grey-600);
}

The first rule style means one has to search up the markup and look at a lot of CSS rules to find what is relevant.