Skip to content

Commit

Permalink
Tweak property and selector variables
Browse files Browse the repository at this point in the history
As of ST4149 `&` is part of selector_start in CSS and doesn't need to be
explicitly added by Less.

Variable `selector_begin` is maintained only for backward compatibility
with some unreleased revisions of core CSS.

Variable `property_or_selector_begin` as adjusted to match CSS
(as of sublimehq/Packages#3898) and is maintained
for backward compatibility with ST builds which do not ship that PR.
  • Loading branch information
deathaxe committed Feb 24, 2024
1 parent f8129a3 commit c65ee9f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Syntaxes/Less.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ variables:

ident_start: (?:{{nmstart}}|@+{)

selector_begin: (?={{selector_start}}|&|@+{)
property_or_selector_begin: (?={{ident_begin}}|{{selector_start}})

selector_begin: (?={{selector_start}}|@+{) # for backward compatibility only
selector_end: (?=[;{}])

tag_name_begin: (?=[[:alpha:]]|@+{)

property_or_selector_begin: (?={{selector_start}}|[-&]|{{ident_start}})

# Less variables

at_rules: |-
Expand Down

0 comments on commit c65ee9f

Please sign in to comment.