|
5 | 5 | // DO NOT EDIT. This file was generated from async_evaluate.dart.
|
6 | 6 | // See tool/grind/synchronize.dart for details.
|
7 | 7 | //
|
8 |
| -// Checksum: 116b8079719577ac6e4dad4aebe403282136e611 |
| 8 | +// Checksum: ebf292c26dcfdd7f61fd70ce3dc9e0be2b6708b3 |
9 | 9 | //
|
10 | 10 | // ignore_for_file: unused_import
|
11 | 11 |
|
@@ -1187,6 +1187,22 @@ final class _EvaluateVisitor
|
1187 | 1187 | node.span);
|
1188 | 1188 | }
|
1189 | 1189 |
|
| 1190 | + if (_parent.parent!.children.last case var sibling |
| 1191 | + when _parent != sibling) { |
| 1192 | + _warn( |
| 1193 | + "Sass's behavior for declarations that appear after nested\n" |
| 1194 | + "rules will be changing to match the behavior specified by CSS in an " |
| 1195 | + "upcoming\n" |
| 1196 | + "version. To keep the existing behavior, move the declaration above " |
| 1197 | + "the nested\n" |
| 1198 | + "rule. To opt into the new behavior, wrap the declaration in `& " |
| 1199 | + "{}`.\n" |
| 1200 | + "\n" |
| 1201 | + "More info: https://sass-lang.com/d/mixed-decls", |
| 1202 | + MultiSpan(node.span, 'declaration', {sibling.span: 'nested rule'}), |
| 1203 | + Deprecation.mixedDecls); |
| 1204 | + } |
| 1205 | + |
1190 | 1206 | var name = _interpolationToValue(node.name, warnForColor: true);
|
1191 | 1207 | if (_declarationName case var declarationName?) {
|
1192 | 1208 | name = CssValue("$declarationName-${name.value}", name.span);
|
@@ -2055,8 +2071,20 @@ final class _EvaluateVisitor
|
2055 | 2071 | scopeWhen: node.hasDeclarations);
|
2056 | 2072 | _atRootExcludingStyleRule = oldAtRootExcludingStyleRule;
|
2057 | 2073 |
|
| 2074 | + _warnForBogusCombinators(rule); |
| 2075 | + |
| 2076 | + if (_styleRule == null && _parent.children.isNotEmpty) { |
| 2077 | + var lastChild = _parent.children.last; |
| 2078 | + lastChild.isGroupEnd = true; |
| 2079 | + } |
| 2080 | + |
| 2081 | + return null; |
| 2082 | + } |
| 2083 | + |
| 2084 | + /// Emits deprecation warnings for any bogus combinators in [rule]. |
| 2085 | + void _warnForBogusCombinators(CssStyleRule rule) { |
2058 | 2086 | if (!rule.isInvisibleOtherThanBogusCombinators) {
|
2059 |
| - for (var complex in parsedSelector.components) { |
| 2087 | + for (var complex in rule.selector.components) { |
2060 | 2088 | if (!complex.isBogus) continue;
|
2061 | 2089 |
|
2062 | 2090 | if (complex.isUseless) {
|
@@ -2100,13 +2128,6 @@ final class _EvaluateVisitor
|
2100 | 2128 | }
|
2101 | 2129 | }
|
2102 | 2130 | }
|
2103 |
| - |
2104 |
| - if (_styleRule == null && _parent.children.isNotEmpty) { |
2105 |
| - var lastChild = _parent.children.last; |
2106 |
| - lastChild.isGroupEnd = true; |
2107 |
| - } |
2108 |
| - |
2109 |
| - return null; |
2110 | 2131 | }
|
2111 | 2132 |
|
2112 | 2133 | Value? visitSupportsRule(SupportsRule node) {
|
|
0 commit comments