Skip to content

Disallow duplicate properties

nzakas edited this page Oct 24, 2011 · 2 revisions

When you include the same property twice, it may be intentional (to provide a fallback) or unintentional (copy-paste error). If duplicate properties are found one after the other with different values, this is okay. For example:

.foo {
    background: #fff;
    background: rgba(255, 255, 255, 0.5);
}

However, if the properties either have the same value or are located at different spots in the rule, this results in a warning. For example:

.foo {
    background: #fff;
    color: #000;
    background: rgba(255, 255, 255, 0.5);
}   

Rule ID: duplicate-properties

Clone this wiki locally