Created
November 22, 2019 23:07
-
-
Save tomhodgins/706c7f7d2febd99f158533a0fd908592 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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