File tree Expand file tree Collapse file tree 3 files changed +9
-15
lines changed Expand file tree Collapse file tree 3 files changed +9
-15
lines changed Original file line number Diff line number Diff line change 7
7
parsing associated with it. It is now parsed like any other unknown plain CSS
8
8
at-rule, where Sass features are only allowed within ` #{} ` interpolation.
9
9
10
+ * ** Breaking change:** A variable definition may now only have a single
11
+ ` !global ` flag or ` !default ` flag, or one of each.
12
+
10
13
### Bogus Combinators
11
14
12
15
* ** Breaking change:** Selectors with more than one combinator in a row, such as
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ enum Deprecation {
15
15
// DO NOT EDIT. This section was generated from the language repo.
16
16
// See tool/grind/generate_deprecations.dart for details.
17
17
//
18
- // Checksum: f9088047deb7019c0d619480b54cea07a65abbb4
18
+ // Checksum: d1c9c01ca8d2b69e39b7371d774c9c86349efdef
19
19
20
20
/// Deprecation for passing a string directly to meta.call().
21
21
callString ('call-string' ,
@@ -70,6 +70,7 @@ enum Deprecation {
70
70
/// Deprecation for using !default or !global multiple times for one variable.
71
71
duplicateVarFlags ('duplicate-var-flags' ,
72
72
deprecatedIn: '1.62.0' ,
73
+ obsoleteIn: '2.0.0' ,
73
74
description:
74
75
'Using !default or !global multiple times for one variable.' ),
75
76
Original file line number Diff line number Diff line change @@ -255,13 +255,8 @@ abstract class StylesheetParser extends Parser {
255
255
switch (identifier ()) {
256
256
case 'default' :
257
257
if (guarded) {
258
- warnings.add ((
259
- deprecation: Deprecation .duplicateVarFlags,
260
- message:
261
- '!default should only be written once for each variable.\n '
262
- 'This will be an error in Dart Sass 2.0.0.' ,
263
- span: scanner.spanFrom (flagStart),
264
- ));
258
+ error ('Only one !default is allowed per declaration.' ,
259
+ scanner.spanFrom (flagStart));
265
260
}
266
261
guarded = true ;
267
262
@@ -272,13 +267,8 @@ abstract class StylesheetParser extends Parser {
272
267
scanner.spanFrom (flagStart),
273
268
);
274
269
} else if (global) {
275
- warnings.add ((
276
- deprecation: Deprecation .duplicateVarFlags,
277
- message:
278
- '!global should only be written once for each variable.\n '
279
- 'This will be an error in Dart Sass 2.0.0.' ,
280
- span: scanner.spanFrom (flagStart),
281
- ));
270
+ error ('Only one !global is allowed per declaration.' ,
271
+ scanner.spanFrom (flagStart));
282
272
}
283
273
global = true ;
284
274
You can’t perform that action at this time.
0 commit comments