mirror of
https://github.com/danog/dart-sass.git
synced 2025-01-22 05:41:14 +01:00
Forbid functions and mixins in control directives.
This commit is contained in:
parent
7ccccbc2ba
commit
ce36eb5b10
@ -14,6 +14,8 @@
|
||||
|
||||
* Properly handle `@for` rules where each bound has a different unit.
|
||||
|
||||
* Forbid mixins and functions from being defined in control directives.
|
||||
|
||||
## 1.0.0-alpha.6
|
||||
|
||||
* Allow `var()` to be passed to `rgb()`, `rgba()`, `hsl()`, and `hsla()`.
|
||||
|
@ -550,6 +550,11 @@ abstract class StylesheetParser extends Parser {
|
||||
"Mixins may not contain function declarations.",
|
||||
scanner.spanFrom(start),
|
||||
scanner.string);
|
||||
} else if (_inControlDirective) {
|
||||
throw new StringScannerException(
|
||||
"Functions may not be declared in control directives.",
|
||||
scanner.spanFrom(start),
|
||||
scanner.string);
|
||||
}
|
||||
|
||||
whitespace();
|
||||
@ -767,6 +772,11 @@ abstract class StylesheetParser extends Parser {
|
||||
"Mixins may not contain mixin declarations.",
|
||||
scanner.spanFrom(start),
|
||||
scanner.string);
|
||||
} else if (_inControlDirective) {
|
||||
throw new StringScannerException(
|
||||
"Mixins may not be declared in control directives.",
|
||||
scanner.spanFrom(start),
|
||||
scanner.string);
|
||||
}
|
||||
|
||||
whitespace();
|
||||
|
Loading…
x
Reference in New Issue
Block a user