Skip to content

Commit

Permalink
Document at-rule-property-required-list difference between properti…
Browse files Browse the repository at this point in the history
…es and descriptors (#8185)

This change was produced by the discussion on <#8148 (comment)>.

We probably should have named the `at-rule-property-required-list` as `at-rule-descriptor-required-list`
because declarations in at-rules are semantically descriptors rather than properties.

See also <https://drafts.csswg.org/css-syntax/#declaration>.

Co-authored-by: Richard Hallows <[email protected]>
  • Loading branch information
ybiquitous and jeddy3 authored Dec 13, 2024
1 parent b2c99ce commit 63ea779
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/user-guide/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Allow, disallow or require things with these `allowed-list`, `disallowed-list`,
| [`at-rule-allowed-list`](../../lib/rules/at-rule-allowed-list/README.md)<br/>Specify a list of allowed at-rules. | | |
| [`at-rule-disallowed-list`](../../lib/rules/at-rule-disallowed-list/README.md)<br/>Specify a list of disallowed at-rules. | | |
| [`at-rule-no-vendor-prefix`](../../lib/rules/at-rule-no-vendor-prefix/README.md)<br/>Disallow vendor prefixes for at-rules. || 🔧 |
| [`at-rule-property-required-list`](../../lib/rules/at-rule-property-required-list/README.md)<br/>Specify a list of required properties for an at-rule. | | |
| [`at-rule-property-required-list`](../../lib/rules/at-rule-property-required-list/README.md)<br/>Specify a list of required descriptors for an at-rule. | | |
<!-- prettier-ignore-end -->

#### Color
Expand Down
6 changes: 3 additions & 3 deletions lib/rules/at-rule-property-required-list/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# at-rule-property-required-list

Specify a list of required properties for an at-rule.
Specify a list of required descriptors (previously labelled as properties) for an at-rule.

<!-- prettier-ignore -->
```css
@font-face { font-display: swap; font-family: 'foo'; }
/** ↑ ↑ ↑
* At-rule and required property names */
* At-rule and required descriptor names */
```

The [`message` secondary option](../../../docs/user-guide/configure.md#message) can accept the arguments of this rule.

## Options

`object`: `{ "at-rule-name": ["array", "of", "properties"]|"property" }`
`object`: `{ "at-rule-name": ["array", "of", "descriptors"]|"descriptor" }`

Given:

Expand Down

0 comments on commit 63ea779

Please sign in to comment.