Skip to content

Commit

Permalink
[CSS] Add missing length units (sublimehq#3370)
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe authored May 6, 2022
1 parent cd77bb4 commit faa4b2c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CSS/CSS.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ variables:

# Units
# https://www.w3.org/TR/css3-values/#lengths
# https://developer.mozilla.org/en-US/docs/Web/CSS/length
units: |-
(?x:
%
Expand All @@ -62,8 +63,8 @@ variables:
| {{resolution_units}}
| {{viewport_percentage_lengths}}
)
font_relative_lengths: (?i:em|ex|ch|rem)\b
viewport_percentage_lengths: (?i:vw|vh|vmin|vmax)\b
font_relative_lengths: (?i:cap|ch|em|ex|ic|lh|rem|rlh)\b
viewport_percentage_lengths: (?i:vh|vw|vi|vb|vmin|vmax)\b
absolute_lengths: (?i:cm|mm|q|in|pt|pc|px|fr)\b
angle_units: (?i:deg|grad|rad|turn)\b
duration_units: (?i:s|ms)\b
Expand Down
8 changes: 8 additions & 0 deletions CSS/syntax_test_css.css
Original file line number Diff line number Diff line change
Expand Up @@ -1513,6 +1513,14 @@
/* ^ punctuation.separator.decimal.css */
/* ^ punctuation.separator.decimal.css */
/* ^^^ meta.number.float.decimal.css constant.numeric.suffix.css */
top: 0.9cap;
/* ^^^^^^ meta.number.float.decimal.css */
/* ^^^ constant.numeric.value.css */
/* ^^^ constant.numeric.suffix.css */
top: 0.9rlh;
/* ^^^^^^ meta.number.float.decimal.css */
/* ^^^ constant.numeric.value.css */
/* ^^^ constant.numeric.suffix.css */
}

.test-properties {
Expand Down

0 comments on commit faa4b2c

Please sign in to comment.