Skip to content

Instantly share code, notes, and snippets.

@tomhodgins
Created November 22, 2019 23:07
Show Gist options
  • Save tomhodgins/706c7f7d2febd99f158533a0fd908592 to your computer and use it in GitHub Desktop.
Save tomhodgins/706c7f7d2febd99f158533a0fd908592 to your computer and use it in GitHub Desktop.
/* defining something like this */
@--custom-grammar (at-rule: --demo) {
selectors: :--custom();
@--custom-grammar (selector: :--custom()) {
properties: --direction, --depth;
@--custom-grammar (property: --direction) {
value: north | east | south | west;
}
@--custom-grammar (property: --depth) {
value: <dimension>;
}
}
}
/* to let your editor be able to validate/lint a custom CSS construct you have defined to support yourself */
@--demo {
:--custom() {
--direction: west;
--depth: 100in;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment