From faa4b2c030f2b4abee77b4aa8ff07599322d7d2d Mon Sep 17 00:00:00 2001 From: deathaxe Date: Fri, 6 May 2022 17:01:43 +0200 Subject: [PATCH] [CSS] Add missing length units (#3370) see: https://developer.mozilla.org/en-US/docs/Web/CSS/length --- CSS/CSS.sublime-syntax | 5 +++-- CSS/syntax_test_css.css | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CSS/CSS.sublime-syntax b/CSS/CSS.sublime-syntax index bd6329b840..c07a652f88 100644 --- a/CSS/CSS.sublime-syntax +++ b/CSS/CSS.sublime-syntax @@ -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: % @@ -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 diff --git a/CSS/syntax_test_css.css b/CSS/syntax_test_css.css index 56a0ee6694..2169bfa515 100644 --- a/CSS/syntax_test_css.css +++ b/CSS/syntax_test_css.css @@ -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 {