Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 682 Bytes

File metadata and controls

35 lines (27 loc) · 682 Bytes

concatenate-property-values

Concatenating Property Values

Guideline: Combine multiple CSS properties on a single line to reduce redundancy and improve readability.

/* Instead of this */
.element {
  filter: grayscale(100%);
  filter: blur(5px)
}

/* Use this */
.element {
  filter: grayscale(100%) blur(5px)
}

Combine Multiple of the Same Property Values

Guideline: Combine multiple CSS property values into a single line using a comma-separated list.

/* Instead of this */
.element {
  box-shadow: 1px 1px 2px #000;
  box-shadow: inset 0 0 10px #000
}

/* Use this */
.element {
  box-shadow: 1px 1px 2px #000, inset 0 0 10px #000
}