diff --git a/css/css-nesting/nested-declarations-cssom.html b/css/css-nesting/nested-declarations-cssom.html
new file mode 100644
index 00000000000000..42e3930fbeb5df
--- /dev/null
+++ b/css/css-nesting/nested-declarations-cssom.html
@@ -0,0 +1,150 @@
+
+
CSS Nesting: CSSNestedDeclarations CSSOM
+
+
+
+
diff --git a/css/css-nesting/nested-declarations-matching.html b/css/css-nesting/nested-declarations-matching.html
new file mode 100644
index 00000000000000..0dc272e1a7ba5b
--- /dev/null
+++ b/css/css-nesting/nested-declarations-matching.html
@@ -0,0 +1,163 @@
+
+
CSS Nesting: CSSNestedDeclarations matching
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/css/css-nesting/nesting-basic.html b/css/css-nesting/nesting-basic.html
index 19ff48e4a29588..9edff4ea1af6a2 100644
--- a/css/css-nesting/nesting-basic.html
+++ b/css/css-nesting/nesting-basic.html
@@ -68,9 +68,9 @@
.test-10 {
& {
- background-color: green;
+ background-color: red;
}
- background-color: red;
+ background-color: green;
}
.test-11 {
diff --git a/css/css-nesting/serialize-group-rules-with-decls.html b/css/css-nesting/serialize-group-rules-with-decls.html
index 7e9aaafbeb894c..e15210c2dd2dca 100644
--- a/css/css-nesting/serialize-group-rules-with-decls.html
+++ b/css/css-nesting/serialize-group-rules-with-decls.html
@@ -35,12 +35,12 @@
assert_becomes(
"div { @media screen { color: red; background-color: green; } }",
- "div {\n @media screen {\n & { color: red; background-color: green; }\n}\n}",
+ "div {\n @media screen {\n color: red; background-color: green;\n}\n}",
"Mixed declarations/rules are on two lines."
);
assert_becomes(
"div {\n @supports selector(&) { color: red; background-color: green; } &:hover { color: navy; } }",
- "div {\n @supports selector(&) {\n & { color: red; background-color: green; }\n}\n &:hover { color: navy; }\n}",
+ "div {\n @supports selector(&) {\n color: red; background-color: green;\n}\n &:hover { color: navy; }\n}",
"Implicit rule is serialized",
);
@@ -62,12 +62,12 @@
);
assert_becomes(
"div { @media screen { color: red; & { color: red; }",
- "div {\n @media screen {\n & { color: red; }\n & { color: red; }\n}\n}",
+ "div {\n @media screen {\n color: red;\n & { color: red; }\n}\n}",
"Implicit like rule after decls"
);
assert_becomes(
"div { @media screen { color: red; & { color: blue; }",
- "div {\n @media screen {\n & { color: red; }\n & { color: blue; }\n}\n}",
+ "div {\n @media screen {\n color: red;\n & { color: blue; }\n}\n}",
"Implicit like rule after decls, missing closing braces"
);
assert_becomes(
diff --git a/css/css-syntax/custom-property-rule-ambiguity.html b/css/css-syntax/custom-property-rule-ambiguity.html
index 04f908acde2e72..a8ac1de2c556ea 100644
--- a/css/css-syntax/custom-property-rule-ambiguity.html
+++ b/css/css-syntax/custom-property-rule-ambiguity.html
@@ -46,11 +46,12 @@
assert_equals(rules.length, 1);
assert_equals(rules[0].selectorText, 'div');
let div = rules[0];
- let x = div.style.getPropertyValue('--x');
- assert_equals(x.trim(), 'hover { }\n .b { }');
let childRules = div.cssRules;
- assert_equals(childRules.length, 1);
+ assert_equals(childRules.length, 2);
assert_equals(childRules[0].selectorText, '& .a');
+ assert_true(childRules[1] instanceof CSSNestedDeclarations)
+ let x = childRules[1].style.getPropertyValue('--x');
+ assert_equals(x.trim(), 'hover { }\n .b { }');
}, 'Nested rule that looks like a custom property declaration');