Skip to content

Instantly share code, notes, and snippets.

@kwhitaker
Created February 14, 2012 15:03
Show Gist options
  • Save kwhitaker/1827417 to your computer and use it in GitHub Desktop.
Save kwhitaker/1827417 to your computer and use it in GitHub Desktop.
CSSLint command line rules reference
ids
Selectors should not contain IDs.
adjoining-classes
Don't use adjoining classes.
import
Don't use @import, use <link> instead.
box-sizing
The box-sizing properties isn't supported in IE6 and IE7.
box-model
Don't use width or height when using padding or border.
known-properties
Properties should be known (listed in CSS specification) or be a vendor-prefixed property.
duplicate-background-images
Every background-image should be unique. Use a common class for e.g. sprites.
compatible-vendor-prefixes
Include all compatible vendor prefixes to reach a wider range of users.
display-property-grouping
Certain properties shouldn't be used with certain display property values.
overqualified-elements
Don't use classes or IDs with elements (a.foo or a#foo).
fallback-colors
For older browsers that don't support RGBA, HSL, or HSLA, provide a fallback color.
duplicate-properties
Duplicate properties must appear one after the other.
empty-rules
Rules without any properties specified should be removed.
errors
This rule looks for recoverable syntax errors.
regex-selectors
Selectors that look like regular expressions are slow and should be avoided.
gradients
When using a vendor-prefixed gradient, make sure to use them all.
font-sizes
Checks the number of font-size declarations.
font-faces
Too many different web fonts in the same stylesheet.
floats
This rule tests if the float property is used too many times
important
Be careful when using !important declaration
outline-none
Use of outline: none or outline: 0 should be limited to :focus rules.
qualified-headings
Headings should not be qualified (namespaced).
rules-count
Track how many rules there are.
shorthand
Use shorthand properties where possible.
text-indent
Checks for text indent less than -99px
unique-headings
Headings should be defined only once.
universal-selector
The universal selector (*) is known to be slow.
vendor-prefix
When using a vendor-prefixed property, make sure to include the standard one.
zero-units
You don't need to specify units when a value is 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment