Skip to content

Commit ee3a3f7

Browse files
committed
Merge pull request sublimehq#236 from poke/master
[CSS] Add support for custom HTML tags
2 parents f18d0b9 + dc44769 commit ee3a3f7

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CSS/CSS.sublime-syntax

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,8 @@ contexts:
640640
pop: true
641641
- match: '\b(a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdi|bdo|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|content|data|datalist|dd|del|details|dfn|dir|dialog|div|dl|dt|element|em|embed|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|isindex|kbd|keygen|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|rp|rt|rtc|s|samp|script|section|select|shadow|small|source|span|strike|strong|style|sub|summary|sup|svg|table|tbody|td|template|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video|wbr)\b'
642642
scope: entity.name.tag.css
643+
- match: '\b([a-z_][a-z0-9:_]*-[a-z0-9:_-]+)\b'
644+
scope: entity.name.tag.custom.css
643645
- match: '(\.)[a-zA-Z0-9_-]+'
644646
scope: entity.other.attribute-name.class.css
645647
captures:

CSS/syntax_test_css.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,9 @@
3535
/* ^ support.function.misc.css */
3636
/* ^ constant.other.color.hsl-value.css */
3737
}
38+
39+
html > div > span > custom-tag {}
40+
/* ^ entity.name.tag.css */
41+
/* ^^^ entity.name.tag.css */
42+
/* ^^^^ entity.name.tag.css */
43+
/* ^^^^^^^^^^ entity.name.tag.custom.css */

0 commit comments

Comments
 (0)