CSS Jot Down 1: Prioritize Objects

CSS Objects are selectors.

CSS Buckets are rules.

Prioritize defining objects over defining rules.

[codepen_embed height=”265″ theme_id=”dark” slug_hash=”LjjVWE” default_tab=”css” user=”BrianSahagun”]See the Pen CSS Jot Down 1: Prioritize Objects by Brian Dys Sahagun (@BrianSahagun) on CodePen.[/codepen_embed]

The purpose is to make each object independent.

Use CSS variables for shared styles when possible.

Someday soon, there will be a CSS function that would apply a rule to a selector.

Combine objects:

  • when applying hacks
  • when applying resets
  • when applying visual design modifiers
  • when applying usability enhancements

Prioritize objects:

  • when applying visual design modifiers
  • when in doubt

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *