Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CSS] Make CSS a good base syntax for extensions #3717

Merged
merged 29 commits into from
Apr 30, 2023
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
98d3286
[CSS] Fix translate function arguments highlighting
deathaxe Apr 16, 2023
d5bf391
[CSS] Fix comment
deathaxe Apr 16, 2023
bb5196f
Merge branch 'pr/css/fix-tranform-functions' into preview/css
deathaxe Apr 18, 2023
59a7b7a
[CSS] Convert contexts to named contexts
deathaxe Apr 15, 2023
2cbb5c8
[CSS] Normalize property-name contexts
deathaxe Apr 15, 2023
283788c
[CSS] Add support for identifier interpolation
deathaxe Apr 15, 2023
3ba534b
[CSS] Add brackets-end context
deathaxe Apr 15, 2023
3ccdb06
[CSS] Add variables for selector boundaries
deathaxe Apr 15, 2023
d49dbbd
[CSS] Refactor property-name contexts
deathaxe Apr 15, 2023
6d94ec0
[CSS] Optimize identifier pattern performance
deathaxe Apr 18, 2023
fbda8a0
[CSS] Add named contexts for builtin functions
deathaxe Apr 15, 2023
db7364e
[CSS] Rename all ...-list-content contexts to -list-body
deathaxe Apr 19, 2023
6fc0601
[CSS] Remove comment
deathaxe Apr 22, 2023
bceeddb
[CSS] Allow any valid value in unknown functions
deathaxe Apr 22, 2023
e8f5d22
[CSS] Introduce value-prototype context
deathaxe Apr 24, 2023
9273abc
[CSS] No function arguments prototype in selector arguments
deathaxe Apr 25, 2023
cc07ecf
[CSS] Tweak function-arguments-prototype
deathaxe Apr 26, 2023
03fa203
[CSS] Split illegal-groups from var() contexts
deathaxe Apr 26, 2023
9659c5f
[CSS] Consistently scope `none` everywhere
deathaxe Apr 27, 2023
15e7d0e
[CSS] Fix "0" length constant
deathaxe Apr 27, 2023
ec7d17f
[CSS] Add interpolation support for layer names
deathaxe Apr 28, 2023
3998b26
[CSS] Add interpolation support to qualified attr names
deathaxe Apr 28, 2023
85244b8
[CSS] rename all ...-block-content contexts to -block-body
deathaxe Apr 28, 2023
d0915d6
[CSS] rename all ...-string-content contexts to -string-body
deathaxe Apr 29, 2023
ca36534
[CSS] Fix direction constants pattern
deathaxe Apr 29, 2023
4a6e4a9
[CSS] Apply -body -end -content context naming scheme to selectors
deathaxe Apr 29, 2023
3ceeca3
[CSS] Rename comments-content context to block-comment-body
deathaxe Apr 29, 2023
1b51640
[CSS] Rename at-rule-...-content contexts
deathaxe Apr 29, 2023
2b2a9ec
[CSS] Reorganize string contexts
deathaxe Apr 29, 2023
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
Prev Previous commit
Next Next commit
[CSS] Add brackets-end context
This commit adds named contexts for certain context-end patterns to

1. reduce some pattern duplication.
2. give inheriting syntaxes a chance to modify context bailouts more
   individually.

This commit does not have any effect on how CSS is highlighted.
  • Loading branch information
deathaxe committed Apr 22, 2023
commit 3ba534bfdbe0eac8c97f61bed755a5412917ad2e
22 changes: 13 additions & 9 deletions CSS/CSS.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -1190,9 +1190,7 @@ contexts:
- include: attribute-selector-end

attribute-selector-end:
- match: \]
scope: punctuation.section.brackets.end.css
pop: 1
- include: brackets-end
- include: selector-end
- include: comments
- match: \S
Expand Down Expand Up @@ -1382,9 +1380,7 @@ contexts:

property-list-content:
- meta_scope: meta.property-list.css meta.block.css
- match: \}
scope: punctuation.section.block.end.css
pop: 1
- include: block-end
- include: rule-list-body

rule-list-body:
Expand Down Expand Up @@ -3039,9 +3035,7 @@ contexts:
line-names-content:
- meta_include_prototype: false
- meta_scope: meta.line-names.css meta.brackets.css
- match: \]
scope: punctuation.section.brackets.end.css
pop: 1
- include: brackets-end
- match: '{{ident_begin}}'
push: line-name-content
- include: terminator-pop
Expand Down Expand Up @@ -3201,11 +3195,21 @@ contexts:
- match: ','
scope: punctuation.separator.sequence.css

block-end:
- match: \}
scope: punctuation.section.block.end.css
pop: 1

block-end2:
- match: \}
scope: punctuation.section.block.end.css
pop: 2

brackets-end:
- match: \]
scope: punctuation.section.brackets.end.css
pop: 1

group-end:
- match: \)
scope: punctuation.section.group.end.css
Expand Down