Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## 1.83.5-dev

* Fix a bug in which various Color Level 4 functions weren't allowed in plain
CSS.

* Fix the error message for `@extend` without a selector and possibly other
parsing edge-cases in contexts that allow interpolation.

Expand Down
22 changes: 14 additions & 8 deletions lib/src/parse/css.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,25 @@ import 'scss.dart';
final _disallowedFunctionNames =
globalFunctions.map((function) => function.name).toSet()
..add("if")
..remove("rgb")
..remove("rgba")
..remove("abs")
..remove("alpha")
..remove("color")
..remove("grayscale")
..remove("hsl")
..remove("hsla")
..remove("grayscale")
..remove("hwb")
..remove("invert")
..remove("alpha")
..remove("opacity")
..remove("saturate")
..remove("min")
..remove("lab")
..remove("lch")
..remove("max")
..remove("min")
..remove("oklab")
..remove("oklch")
..remove("opacity")
..remove("rgb")
..remove("rgba")
..remove("round")
..remove("abs");
..remove("saturate");

class CssParser extends ScssParser {
bool get plainCss => true;
Expand Down