Last Updated: February 25, 2016
·
577
· fernandoperigolo

CSS Properties Order Approach

Fast tip. When i write CSS code, i like to order properties by impact.

Examples

  • If you are doing a big call with a big font, put font size at top.
.big-call {
  font-size: 7rem;
  color: #f00;
  min-height: 12rem;
}
  • If you are doing a button that will float at top right of website.
.nice-button{
  position: absolute;
  top: 0;
  right: 0;
}

In other words, put first what you think is relevant.