fix(css-parser, formatter): rules inside media
MODIFY
internal/ast/css/media/CSSMediaQueryList.ts
internal/ast/css/media/CSSMediaQueryList.ts
-import {CSSMediaQuery, NodeBaseWithComments} from "@internal/ast";
+import {CSSBlock, CSSMediaQuery, NodeBaseWithComments} from "@internal/ast";
import {createBuilder} from "../../utils";
export interface CSSMediaQueryList extends NodeBaseWithComments {
readonly type: "CSSMediaQueryList";
- readonly value: CSSMediaQuery[];
+ readonly prelude: CSSMediaQuery[];
+ readonly block: CSSBlock;
}
export const cssMediaQueryList = createBuilder<CSSMediaQueryList>(
@@ -11,7 +12,8 @@ export const cssMediaQueryList = createBuilder<CSSMediaQueryList>(
{
bindingKeys: {},
visitorKeys: {
- value: true,
+ prelude: true,
+ block: true,
},
},
);

MODIFY
internal/css-parser/parser/media/index.ts
internal/css-parser/parser/media/index.ts
@@ -16,6 +16,7 @@ import {
import {descriptions} from "@internal/diagnostics";
import {parseMediaCondition} from "@internal/css-parser/parser/media/comparison";
import {AND, NOT} from "@internal/css-parser/utils";
+import {parseComplexBlock} from "@internal/css-parser/parser/block";
function tryParseConditionWithoutOr(
parser: CSSParser,
@@ -194,10 +195,6 @@ function parseMedia(parser: CSSParser): CSSMediaQuery | undefined {
}
}
- // } else if (token.type === "LeftParen") {
-
- // }
-
return undefined;
}
@@ -227,12 +224,16 @@ export function parseMediaList(parser: CSSParser): CSSMediaQueryList | undefined
list.push(media);
}
}
-
+ const block = parseComplexBlock(parser);
+ if (block) {
return parser.finishNode(
start,
{
type: "CSSMediaQueryList",
- value: list,
+ prelude: list,
+ block,
},
);
}
+ return undefined;
+}

MODIFY
internal/css-parser/parser/rules.ts
internal/css-parser/parser/rules.ts
@@ -106,10 +106,8 @@ export function parseAtRule(
break;
}
if (previousToken.value === "media") {
- const value = parseMediaList(parser);
- if (value) {
- prelude.push(value);
- }
+ block = parseMediaList(parser);
+ break;
}
if (previousToken.value === "keyframes") {
block = parseKeyframe(parser);

MODIFY
internal/css-parser/test-fixtures/invalid/media/feature-value-missing/input.test.md
internal/css-parser/test-fixtures/invalid/media/feature-value-missing/input.test.md
@@ -9,9 +9,9 @@ CSSRoot {
body: [
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
value: CSSMediaType {
value: "screen"
@@ -20,14 +20,13 @@ CSSRoot {
loc: SourceLocation invalid/media/feature-value-missing/input.css 1:6-1:31
}
]
- loc: SourceLocation invalid/media/feature-value-missing/input.css 1:6-1:32
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation invalid/media/feature-value-missing/input.css 1:32-1:34
}
+ loc: SourceLocation invalid/media/feature-value-missing/input.css 1:6-1:34
+ }
loc: SourceLocation invalid/media/feature-value-missing/input.css 1:0-1:34
}
]

MODIFY
internal/css-parser/test-fixtures/invalid/media/feature/input.test.md
internal/css-parser/test-fixtures/invalid/media/feature/input.test.md
@@ -9,9 +9,9 @@ CSSRoot {
body: [
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
value: CSSMediaType {
value: "screen"
@@ -20,14 +20,13 @@ CSSRoot {
loc: SourceLocation invalid/media/feature/input.css 1:6-1:18
}
]
- loc: SourceLocation invalid/media/feature/input.css 1:6-1:18
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation invalid/media/feature/input.css 1:18-1:20
}
+ loc: SourceLocation invalid/media/feature/input.css 1:6-1:20
+ }
loc: SourceLocation invalid/media/feature/input.css 1:0-1:20
}
]

MODIFY
internal/css-parser/test-fixtures/invalid/media/type/input.test.md
internal/css-parser/test-fixtures/invalid/media/type/input.test.md
@@ -9,17 +9,16 @@ CSSRoot {
body: [
CSSAtRule {
name: "media"
- prelude: [
- CSSMediaQueryList {
- value: []
- loc: SourceLocation invalid/media/type/input.css 1:6-1:11
- }
- ]
+ prelude: []
+ block: CSSMediaQueryList {
+ prelude: []
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation invalid/media/type/input.css 1:11-1:13
}
+ loc: SourceLocation invalid/media/type/input.css 1:6-1:13
+ }
loc: SourceLocation invalid/media/type/input.css 1:0-1:13
}
]

MODIFY
internal/css-parser/test-fixtures/media/condition/input.css
internal/css-parser/test-fixtures/media/condition/input.css
@media (min-width: 800px) and (min-width: 800px) and (min-width: 800px) and (min-width: 800px) {}
@media not (min-width: 800px) {}
@media (min-width: 800px) and (min-width: 800px) or (min-width: 800px) {}
+@media (min-width: 800px) and (min-width: 800px) or (min-width: 800px) {
+ a {
+
+ }
+ .style {
+
+ }
+}

MODIFY
internal/css-parser/test-fixtures/media/condition/input.test.md
internal/css-parser/test-fixtures/media/condition/input.test.md
@@ -9,9 +9,9 @@ CSSRoot {
body: [
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
value: CSSMediaCondition {
value: [
@@ -42,21 +42,20 @@ CSSRoot {
loc: SourceLocation media/condition/input.css 1:6-1:26
}
]
- loc: SourceLocation media/condition/input.css 1:6-1:26
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation media/condition/input.css 1:26-1:28
}
+ loc: SourceLocation media/condition/input.css 1:6-1:28
+ }
loc: SourceLocation media/condition/input.css 1:0-1:28
}
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
value: CSSMediaCondition {
value: [
@@ -135,21 +134,20 @@ CSSRoot {
loc: SourceLocation media/condition/input.css 2:6-2:72
}
]
- loc: SourceLocation media/condition/input.css 2:6-2:72
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation media/condition/input.css 2:72-2:74
}
+ loc: SourceLocation media/condition/input.css 2:6-2:74
+ }
loc: SourceLocation media/condition/input.css 2:0-2:74
}
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
value: CSSMediaCondition {
value: [
@@ -252,21 +250,20 @@ CSSRoot {
loc: SourceLocation media/condition/input.css 3:6-3:95
}
]
- loc: SourceLocation media/condition/input.css 3:6-3:95
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation media/condition/input.css 3:95-3:97
}
+ loc: SourceLocation media/condition/input.css 3:6-3:97
+ }
loc: SourceLocation media/condition/input.css 3:0-3:97
}
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
value: CSSMediaCondition {
value: CSSMediaNot {
@@ -298,21 +295,20 @@ CSSRoot {
loc: SourceLocation media/condition/input.css 4:6-4:29
}
]
- loc: SourceLocation media/condition/input.css 4:6-4:30
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation media/condition/input.css 4:30-4:32
}
+ loc: SourceLocation media/condition/input.css 4:6-4:32
+ }
loc: SourceLocation media/condition/input.css 4:0-4:32
}
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
value: CSSMediaCondition {
value: [
@@ -391,21 +387,151 @@ CSSRoot {
loc: SourceLocation media/condition/input.css 5:6-5:71
}
]
- loc: SourceLocation media/condition/input.css 5:6-5:71
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation media/condition/input.css 5:71-5:73
}
+ loc: SourceLocation media/condition/input.css 5:6-5:73
+ }
loc: SourceLocation media/condition/input.css 5:0-5:73
}
+ CSSAtRule {
+ name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
+ prelude: [
+ CSSMediaQuery {
+ value: CSSMediaCondition {
+ value: [
+ CSSMediaInParens {
+ value: CSSMediaFeature {
+ value: CSSMediaFeaturePlain {
+ name: CSSMediaFeatureName {
+ value: "min-width"
+ loc: SourceLocation media/condition/input.css 6:8-6:17
+ }
+ value: CSSMediaFeatureValue {
+ value: CSSDimension {
+ value: 800
+ unit: "px"
+ loc: SourceLocation media/condition/input.css 6:19-6:24
+ }
+ loc: SourceLocation media/condition/input.css 6:19-6:24
+ }
+ loc: SourceLocation media/condition/input.css 6:8-6:24
+ }
+ loc: SourceLocation media/condition/input.css 6:8-6:24
+ }
+ loc: SourceLocation media/condition/input.css 6:7-6:25
+ }
+ CSSMediaAnd {
+ value: CSSMediaInParens {
+ value: CSSMediaFeature {
+ value: CSSMediaFeaturePlain {
+ name: CSSMediaFeatureName {
+ value: "min-width"
+ loc: SourceLocation media/condition/input.css 6:31-6:40
+ }
+ value: CSSMediaFeatureValue {
+ value: CSSDimension {
+ value: 800
+ unit: "px"
+ loc: SourceLocation media/condition/input.css 6:42-6:47
+ }
+ loc: SourceLocation media/condition/input.css 6:42-6:47
+ }
+ loc: SourceLocation media/condition/input.css 6:31-6:47
+ }
+ loc: SourceLocation media/condition/input.css 6:31-6:47
+ }
+ loc: SourceLocation media/condition/input.css 6:30-6:48
+ }
+ loc: SourceLocation media/condition/input.css 6:26-6:48
+ }
+ CSSMediaOr {
+ value: CSSMediaInParens {
+ value: CSSMediaFeature {
+ value: CSSMediaFeaturePlain {
+ name: CSSMediaFeatureName {
+ value: "min-width"
+ loc: SourceLocation media/condition/input.css 6:53-6:62
+ }
+ value: CSSMediaFeatureValue {
+ value: CSSDimension {
+ value: 800
+ unit: "px"
+ loc: SourceLocation media/condition/input.css 6:64-6:69
+ }
+ loc: SourceLocation media/condition/input.css 6:64-6:69
+ }
+ loc: SourceLocation media/condition/input.css 6:53-6:69
+ }
+ loc: SourceLocation media/condition/input.css 6:53-6:69
+ }
+ loc: SourceLocation media/condition/input.css 6:52-6:70
+ }
+ loc: SourceLocation media/condition/input.css 6:49-6:70
+ }
+ ]
+ loc: SourceLocation media/condition/input.css 6:7-6:71
+ }
+ loc: SourceLocation media/condition/input.css 6:6-6:71
+ }
+ ]
+ block: CSSBlock {
+ value: [
+ CSSRule {
+ prelude: [
+ CSSSelector {
+ patterns: [
+ CSSTypeSelector {
+ value: "a"
+ loc: SourceLocation media/condition/input.css 7:1-7:2
+ }
+ ]
+ loc: SourceLocation media/condition/input.css 7:1-7:3
+ }
+ ]
+ block: CSSBlock {
+ value: []
+ startingTokenValue: "{"
+ loc: SourceLocation media/condition/input.css 7:3-9:2
+ }
+ loc: SourceLocation media/condition/input.css 7:1-9:2
+ }
+ CSSRule {
+ prelude: [
+ CSSSelector {
+ patterns: [
+ CSSClassSelector {
+ value: "style"
+ loc: SourceLocation media/condition/input.css 10:1-10:7
+ }
+ ]
+ loc: SourceLocation media/condition/input.css 10:1-10:8
+ }
+ ]
+ block: CSSBlock {
+ value: []
+ startingTokenValue: "{"
+ loc: SourceLocation media/condition/input.css 10:8-12:2
+ }
+ loc: SourceLocation media/condition/input.css 10:1-12:2
+ }
+ ]
+ startingTokenValue: "{"
+ loc: SourceLocation media/condition/input.css 6:71-13:1
+ }
+ loc: SourceLocation media/condition/input.css 6:6-13:1
+ }
+ loc: SourceLocation media/condition/input.css 6:0-13:1
+ }
]
comments: []
corrupt: false
diagnostics: []
path: RelativePath<media/condition/input.css>
- loc: SourceLocation media/condition/input.css 1:0-5:73
+ loc: SourceLocation media/condition/input.css 1:0-13:1
}
```

MODIFY
internal/css-parser/test-fixtures/media/feature/input.test.md
internal/css-parser/test-fixtures/media/feature/input.test.md
@@ -9,9 +9,9 @@ CSSRoot {
body: [
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
value: CSSMediaType {
value: "screen"
@@ -35,21 +35,20 @@ CSSRoot {
loc: SourceLocation media/feature/input.css 1:6-1:26
}
]
- loc: SourceLocation media/feature/input.css 1:6-1:26
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation media/feature/input.css 1:26-1:28
}
+ loc: SourceLocation media/feature/input.css 1:6-1:28
+ }
loc: SourceLocation media/feature/input.css 1:0-1:28
}
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
condition: "only"
value: CSSMediaType {
@@ -74,21 +73,20 @@ CSSRoot {
loc: SourceLocation media/feature/input.css 2:6-2:31
}
]
- loc: SourceLocation media/feature/input.css 2:6-2:31
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation media/feature/input.css 2:31-2:33
}
+ loc: SourceLocation media/feature/input.css 2:6-2:33
+ }
loc: SourceLocation media/feature/input.css 2:0-2:33
}
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
condition: "only"
value: CSSMediaType {
@@ -124,21 +122,20 @@ CSSRoot {
loc: SourceLocation media/feature/input.css 3:6-3:42
}
]
- loc: SourceLocation media/feature/input.css 3:6-3:42
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation media/feature/input.css 3:42-3:44
}
+ loc: SourceLocation media/feature/input.css 3:6-3:44
+ }
loc: SourceLocation media/feature/input.css 3:0-3:44
}
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
value: CSSMediaType {
value: "screen"
@@ -173,21 +170,20 @@ CSSRoot {
loc: SourceLocation media/feature/input.css 4:6-4:61
}
]
- loc: SourceLocation media/feature/input.css 4:6-4:61
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation media/feature/input.css 4:61-4:63
}
+ loc: SourceLocation media/feature/input.css 4:6-4:63
+ }
loc: SourceLocation media/feature/input.css 4:0-4:63
}
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
value: CSSMediaType {
value: "screen"
@@ -270,21 +266,20 @@ CSSRoot {
loc: SourceLocation media/feature/input.css 5:6-5:83
}
]
- loc: SourceLocation media/feature/input.css 5:6-5:83
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation media/feature/input.css 5:83-5:85
}
+ loc: SourceLocation media/feature/input.css 5:6-5:85
+ }
loc: SourceLocation media/feature/input.css 5:0-5:85
}
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
value: CSSMediaType {
value: "screen"
@@ -391,14 +386,13 @@ CSSRoot {
loc: SourceLocation media/feature/input.css 6:6-6:105
}
]
- loc: SourceLocation media/feature/input.css 6:6-6:105
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation media/feature/input.css 6:105-6:107
}
+ loc: SourceLocation media/feature/input.css 6:6-6:107
+ }
loc: SourceLocation media/feature/input.css 6:0-6:107
}
]

MODIFY
internal/css-parser/test-fixtures/media/type/input.test.md
internal/css-parser/test-fixtures/media/type/input.test.md
@@ -9,9 +9,9 @@ CSSRoot {
body: [
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
value: CSSMediaType {
value: "screen"
@@ -20,21 +20,20 @@ CSSRoot {
loc: SourceLocation media/type/input.css 1:6-1:14
}
]
- loc: SourceLocation media/type/input.css 1:6-1:14
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation media/type/input.css 1:14-1:16
}
+ loc: SourceLocation media/type/input.css 1:6-1:16
+ }
loc: SourceLocation media/type/input.css 1:0-1:16
}
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
condition: "not"
value: CSSMediaType {
@@ -44,21 +43,20 @@ CSSRoot {
loc: SourceLocation media/type/input.css 2:6-2:18
}
]
- loc: SourceLocation media/type/input.css 2:6-2:18
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation media/type/input.css 2:18-2:20
}
+ loc: SourceLocation media/type/input.css 2:6-2:20
+ }
loc: SourceLocation media/type/input.css 2:0-2:20
}
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
condition: "only"
value: CSSMediaType {
@@ -68,21 +66,20 @@ CSSRoot {
loc: SourceLocation media/type/input.css 3:6-3:19
}
]
- loc: SourceLocation media/type/input.css 3:6-3:19
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation media/type/input.css 3:19-3:21
}
+ loc: SourceLocation media/type/input.css 3:6-3:21
+ }
loc: SourceLocation media/type/input.css 3:0-3:21
}
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
value: CSSMediaType {
value: "print"
@@ -98,21 +95,20 @@ CSSRoot {
loc: SourceLocation media/type/input.css 4:14-4:21
}
]
- loc: SourceLocation media/type/input.css 4:6-4:21
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation media/type/input.css 4:21-4:23
}
+ loc: SourceLocation media/type/input.css 4:6-4:23
+ }
loc: SourceLocation media/type/input.css 4:0-4:23
}
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
value: CSSMediaType {
value: "screen"
@@ -135,21 +131,20 @@ CSSRoot {
loc: SourceLocation media/type/input.css 5:20-5:26
}
]
- loc: SourceLocation media/type/input.css 5:6-5:26
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation media/type/input.css 5:26-5:28
}
+ loc: SourceLocation media/type/input.css 5:6-5:28
+ }
loc: SourceLocation media/type/input.css 5:0-5:28
}
CSSAtRule {
name: "media"
+ prelude: []
+ block: CSSMediaQueryList {
prelude: [
- CSSMediaQueryList {
- value: [
CSSMediaQuery {
condition: "only"
value: CSSMediaType {
@@ -175,14 +170,13 @@ CSSRoot {
loc: SourceLocation media/type/input.css 6:29-6:40
}
]
- loc: SourceLocation media/type/input.css 6:6-6:40
- }
- ]
block: CSSBlock {
value: []
startingTokenValue: "{"
loc: SourceLocation media/type/input.css 6:40-6:42
}
+ loc: SourceLocation media/type/input.css 6:6-6:42
+ }
loc: SourceLocation media/type/input.css 6:0-6:42
}
]

MODIFY
internal/formatter/builders/css/media/CSSMediaQueryList.ts
internal/formatter/builders/css/media/CSSMediaQueryList.ts
@@ -5,8 +5,10 @@ export default function CSSMediaQueryList(
builder: Builder,
node: CSSMediaQueryList,
): Token {
- return concat(
- node.value.map((child, index) => {
+ const tokens: Token[] = [];
+
+ tokens.push(
+ ...node.prelude.map((child, index) => {
const tokens: Token[] = [];
if (index > 0) {
tokens.push(",", space);
@@ -15,4 +17,6 @@ export default function CSSMediaQueryList(
return concat(tokens);
}),
);
+ tokens.push(builder.tokenize(node.block, node));
+ return concat(tokens);
}

MODIFY
internal/formatter/test-fixtures/css/media/condition/input.css
internal/formatter/test-fixtures/css/media/condition/input.css
@media (min-width: 800px) and (min-width: 800px) and (min-width: 800px) and (min-width: 800px) {}
@media not (min-width: 800px) {}
@media (min-width: 800px) and (min-width: 800px) or (min-width: 800px) {}
+@media (min-width: 800px) and (min-width: 800px) or (min-width: 800px) {
+ a {
+
+ }
+ .style {
+
+ }
+}

MODIFY
internal/formatter/test-fixtures/css/media/condition/input.test.md
internal/formatter/test-fixtures/css/media/condition/input.test.md
@media (min-width: 800px) and (min-width: 800px) and (min-width: 800px) and (min-width: 800px) {}
@media not (min-width: 800px) {}
@media (min-width: 800px) and (min-width: 800px) or (min-width: 800px) {}
+@media (min-width: 800px) and (min-width: 800px) or (min-width: 800px) {
+ a {
+
+ }
+ .style {
+
+ }
+}
```
@media (min-width: 800px) and (min-width: 800px) or (min-width: 800px) {
}
+@media (min-width: 800px) and (min-width: 800px) or (min-width: 800px) {
+ a {
+ }
+ .style {
+ }
+}
+
```

fix(css-parser, formatter): rules inside media (#1464)