odin-css-exercises/foundations/06-cascade-fix/README.md
2021-08-28 18:25:48 -04:00

1.3 KiB

CSS Methods

This final exercise for CSS Foundations is going to get you a little more comfortable with the cascade, specificity and rule order in particular. Both the HTMl and CSS files are filled out for you, so instead of adding rules yourself you will simply be editing what is provided.

There are several elements that have some sort of specificity or rule order issue in the provided CSS file. Each element that you must fix will contain text that tells you how to fix the issue, either "Fix specificity" or "Fix rule order".

Specificity issues will require you to either add or remove a selector from an already existing rule, while rule order issues will require you to remove an entire rule from its current position and place it at the end of the CSS file in a particular order.

Issues with the cascade can be the bane for many when it comes to CSS, so once you complete this exercise you'll be one step ahead of the curve and on your way to loving CSS (or at the very least being friendly acquaintances with it).

Desired Outcome

Self Check

  • Do all rules for elements labeled "Fix specificity" have the correct selector added or removed?
  • Are all rules for elements labeled "Fix rule order" placed at the end of the CSS file and in the correct order?