Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions css/properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,7 @@ There are 3 more properties that are optional:
* `mdn_url` (string): a URL linking to the property's page on MDN. This URL must omit the localization part of the URL (such as `en-US/`).
* `stacking` (boolean): Whether or not the property creates a stacking context. See [stacking context](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_positioned_layout/Understanding_z-index/Stacking_context) for details.
* `alsoAppliesTo` (enum): To which elements the property also applies to. See the schema for [a list of enums](https://github.com/mdn/data/blob/main/css/properties.schema.json#L253).

### Custom Properties

Custom properties are a special case, since they have variable keys. These keys must be prefixed by two dashes, (e.g. `--brand-color`), and are validated by a regular expression in the [`patternProperties` section of the schema](https://github.com/mdn/data/blob/main/css/properties.schema.json#L472).
5 changes: 5 additions & 0 deletions css/properties.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -468,5 +468,10 @@
"$ref": "#/definitions/mdn_url"
}
}
},
"patternProperties": {
"^--": {
"$ref": "#/definitions/additionalProperties"
}
}
}