Skip to content

Commit

Permalink
Add all CSS length units in known compatibilities (#1868)
Browse files Browse the repository at this point in the history
This allows more validation of wrong computations in first-class calc.
  • Loading branch information
stof committed Jan 30, 2023
1 parent 499965a commit 5a521b8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 1.57.2
## 1.58.0

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

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

* Add the relative length units from CSS Values 4 and CSS Contain 3 as known
units to validate bad computation in `calc`.

## 1.57.1

* No user-visible changes.
Expand Down
7 changes: 5 additions & 2 deletions lib/src/value/number/single_unit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ import '../number.dart';
/// sets in this list.
const _knownCompatibilities = [
{
"em", "ex", "ch", "rem", "vw", "vh", "vmin", "vmax", "cm", "mm", "q", //
"in", "pt", "pc", "px"
"em", "rem", "ex", "rex", "cap", "rcap", "ch", "rch", "ic", "ric", "lh", //
"rlh", "vw", "lvw", "svw", "dvw", "vh", "lvh", "svh", "dvh", "vi", "lvi", //
"svi", "dvi", "vb", "lvb", "svb", "dvb", "vmin", "lvmin", "svmin", //
"dvmin", "vmax", "lvmax", "svmax", "dvmax", "cqw", "cqh", "cqi", "cqb", //
"cqmin", "cqmax", "cm", "mm", "q", "in", "pt", "pc", "px"
},
{"deg", "grad", "rad", "turn"},
{"s", "ms"},
Expand Down
2 changes: 1 addition & 1 deletion pkg/sass_api/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ environment:
sdk: ">=2.17.0 <3.0.0"

dependencies:
sass: 1.57.2
sass: 1.58.0

dev_dependencies:
dartdoc: ^5.0.0
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sass
version: 1.57.2-dev
version: 1.58.0-dev
description: A Sass implementation in Dart.
homepage: https://github.com/sass/dart-sass

Expand Down

0 comments on commit 5a521b8

Please sign in to comment.