Skip to content

Files

Latest commit

 

History

History
53 lines (39 loc) · 962 Bytes

at-rule-property-required-list.md

File metadata and controls

53 lines (39 loc) · 962 Bytes

Pattern: Unexpected property for at-rule

Issue: -

Description

Validates a requirelist of properties for an at-rule.

Examples

object: { "at-rule-name": ["array", "of", "properties"] }

Given:

{
  "font-face": ["font-display", "font-family", "font-style"]
}

The following patterns are considered violations:

@font-face {
    font-family: 'foo';
    src: url('./fonts/foo.woff2') format('woff2'); 
}
@font-face {
    font-family: 'foo';
    font-style: normal;
    src: url('./fonts/foo.woff2') format('woff2'); 
}

The following patterns are not considered violations:

@font-face {
    font-display: swap;
    font-family: 'foo';
    font-style: normal;
    src: url('./fonts/foo.woff2') format('woff2'); 
}

Further Reading