Skip to content

Require properties appropriate for display

nzakas edited this page Oct 24, 2011 · 6 revisions

Even though you can define any group of properties together in a CSS rule, some of them will be ignored due to the display of the element. This leads to extra cruft in the CSS file. The list of properties that CSSLint checks for are:

  • display: inline should not use width, height, margin (and all variants), or float.
  • display: inline-block should not use float.
  • display: block should not use vertical-align.
  • display: table-* should not use margin (and all variants) or float.

Removed the ignored or problematic properties decreases file size and improves performance.

Rule ID: display-property-grouping

Clone this wiki locally