I'm seeing two cases of this warning that I think are false positives:
1) When using a reset stylesheet, you always get this warning, because a heading must be defined in at least two locations (one+ for the reset, one for your own styles).
In the case of a website using the OOCSS reset and all six levels of heading, you would get at least 12 misleading warnings from CSS Lint (OOCSS resets headings in two places).
2) When several levels of heading share code, it's shorter and more DRY to have multiple declarations. For example, this code would incur three warnings from CSS Lint.:
In both situations, styles are being applied to the base selector (i.e. "h2" and not "#sidebar h2").
Would it not be better to remove the "unique headings" rule, while keeping the "don't qualify headings" rule? The latter seems to cover everything you want without any false positives.
I'm seeing two cases of this warning that I think are false positives:
1) When using a reset stylesheet, you always get this warning, because a heading must be defined in at least two locations (one+ for the reset, one for your own styles).
In the case of a website using the OOCSS reset and all six levels of heading, you would get at least 12 misleading warnings from CSS Lint (OOCSS resets headings in two places).
2) When several levels of heading share code, it's shorter and more DRY to have multiple declarations. For example, this code would incur three warnings from CSS Lint.:
h1, h2, h3 { font-family: "Trebuchet MS", sans-serif; font-size-adjust: 0.523; letter-spacing: -1px; color: #265aa7; font-size: 200%; /* Sets size for h1 */ } h2 { font-size: 150%; } h3 { font-size: 120%; }
In both situations, styles are being applied to the base selector (i.e. "h2" and not "#sidebar h2").
Would it not be better to remove the "unique headings" rule, while keeping the "don't qualify headings" rule? The latter seems to cover everything you want without any false positives.