Skip to content

Commit 5a521b8

Browse files
authored
Add all CSS length units in known compatibilities (#1868)
This allows more validation of wrong computations in first-class calc.
1 parent 499965a commit 5a521b8

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 1.57.2
1+
## 1.58.0
22

33
* Remove sourcemap comments from Sass sources. The generated sourcemap comment
44
for the compiled CSS output remains unaffected.
@@ -16,6 +16,9 @@
1616

1717
* Fix a crash when a selector ends in an escaped backslash.
1818

19+
* Add the relative length units from CSS Values 4 and CSS Contain 3 as known
20+
units to validate bad computation in `calc`.
21+
1922
## 1.57.1
2023

2124
* No user-visible changes.

lib/src/value/number/single_unit.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ import '../number.dart';
1818
/// sets in this list.
1919
const _knownCompatibilities = [
2020
{
21-
"em", "ex", "ch", "rem", "vw", "vh", "vmin", "vmax", "cm", "mm", "q", //
22-
"in", "pt", "pc", "px"
21+
"em", "rem", "ex", "rex", "cap", "rcap", "ch", "rch", "ic", "ric", "lh", //
22+
"rlh", "vw", "lvw", "svw", "dvw", "vh", "lvh", "svh", "dvh", "vi", "lvi", //
23+
"svi", "dvi", "vb", "lvb", "svb", "dvb", "vmin", "lvmin", "svmin", //
24+
"dvmin", "vmax", "lvmax", "svmax", "dvmax", "cqw", "cqh", "cqi", "cqb", //
25+
"cqmin", "cqmax", "cm", "mm", "q", "in", "pt", "pc", "px"
2326
},
2427
{"deg", "grad", "rad", "turn"},
2528
{"s", "ms"},

pkg/sass_api/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ environment:
1010
sdk: ">=2.17.0 <3.0.0"
1111

1212
dependencies:
13-
sass: 1.57.2
13+
sass: 1.58.0
1414

1515
dev_dependencies:
1616
dartdoc: ^5.0.0

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sass
2-
version: 1.57.2-dev
2+
version: 1.58.0-dev
33
description: A Sass implementation in Dart.
44
homepage: https://github.com/sass/dart-sass
55

0 commit comments

Comments
 (0)