File tree Expand file tree Collapse file tree 3 files changed +33
-0
lines changed
Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -324,6 +324,23 @@ contexts:
324324
325325# ##[ CSS STRING CONSTANTS ]####################################################
326326
327+ font-family-names :
328+ # replace CSS context to add interpolation support
329+ - match : ' {{ident_begin}}'
330+ push : font-family-name-body
331+
332+ font-family-name-body :
333+ - meta_include_prototype : false
334+ - meta_scope : meta.string.css string.unquoted.css
335+ - include : less-string-interpolations
336+ # allow unquoted space separated font names
337+ - match : (?!\s+{{ident_start}}){{break}}
338+ pop : 1
339+ # function call ahead, skip font name
340+ - match : (?=\s+{{ident}}\()
341+ pop : 1
342+ - match : ' {{unicode}}'
343+
327344 language-ranges :
328345 # replace CSS context to add interpolation support
329346 - match : ' {{lang_range_begin}}'
Original file line number Diff line number Diff line change 24972497 font: sans serif;
24982498/* ^^^^^^^^^^ meta.string.css string.unquoted.css */
24992499
2500+ font: san\73 -\73 erif;
2501+ /* ^^^^^^^^^^^^^^^^ meta.string.css string.unquoted.css */
2502+
2503+ font: sans serif var(--name);
2504+ /* ^^^^^^^^^^ meta.string.css string.unquoted.css */
2505+ /* ^^^^^^^^^^^ meta.function-call */
2506+
25002507 font: inherit;
25012508/* ^^^^^^^ support - string */
25022509
Original file line number Diff line number Diff line change @@ -797,6 +797,15 @@ custom-@{element}-selector {}
797797// ^^^^^ variable.other.less
798798// ^^^ support.constant.color.w3c.standard.css
799799// ^ punctuation.section.group.end.css
800+
801+ font : san\73 - \73 erif;
802+ // ^^^^^^^^^^^^^^^^ meta.string.css string.unquoted.css
803+
804+ font : sans @{serif} var (--name );
805+ // ^^^^^ meta.string.css string.unquoted.css
806+ // ^^^^^^^^ meta.string.css meta.interpolation.less
807+ // ^ - meta.string - meta.interpolation
808+ // ^^^^^^^^^^^ meta.function-call
800809}
801810
802811// =============================================================================
You can’t perform that action at this time.
0 commit comments