Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CSS Nesting] Add WPT for each nested at-rule #13358

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -16,18 +16,49 @@
}
}

@media (min-width: 50px) {
.test-6 > div {
background-color: green;
}
}

@supports (display: grid) {
.test-10 {
background-color: green;
}
}

@layer {
.test-11 {
background-color: green !important;
}
}

@scope (.test-12) {
:scope {
background-color: green;
}
}

div {
container-type: inline-size;
}
@container (width >= 0px) {
.test-13 {
background-color: green;
}
}

body * + * {
margin-top: 8px;
}
</style>
<body>
<p>Tests pass if <strong>block is green</strong></p>
<div class="test test-5"><div></div></div>
<div class="test test-6"><div></div></div>
<div class="test test-10"><div></div></div>
<div class="test test-11"><div></div></div>
<div class="test"><div class="test-12"></div></div>
<div class="test"><div class="test-13"></div></div>
</body>
Expand Up @@ -16,18 +16,49 @@
}
}

@media (min-width: 50px) {
.test-6 > div {
background-color: green;
}
}

@supports (display: grid) {
.test-10 {
background-color: green;
}
}

@layer {
.test-11 {
background-color: green !important;
}
}

@scope (.test-12) {
:scope {
background-color: green;
}
}

div {
container-type: inline-size;
}
@container (width >= 0px) {
.test-13 {
background-color: green;
}
}

body * + * {
margin-top: 8px;
}
</style>
<body>
<p>Tests pass if <strong>block is green</strong></p>
<div class="test test-5"><div></div></div>
<div class="test test-6"><div></div></div>
<div class="test test-10"><div></div></div>
<div class="test test-11"><div></div></div>
<div class="test"><div class="test-12"></div></div>
<div class="test"><div class="test-13"></div></div>
</body>
Expand Up @@ -19,6 +19,12 @@
}
}

.test-6 {
@media (min-width: 50px) {
background-color: green;
}
}

.test-10 {
@supports (display: grid) {
& {
Expand All @@ -27,12 +33,43 @@
}
}

.test-11 {
@layer {
& {
background-color: green !important;
}
}
}

.test-12 {
@scope (.test-12) {
:scope {
background-color: green;
}
}
}

div {
container-type: inline-size;
}
.test-13 {
@container (width >= 0px) {
& {
background-color: green;
}
}
}

body * + * {
margin-top: 8px;
}
</style>
<body>
<p>Tests pass if <strong>block is green</strong></p>
<div class="test test-5"><div></div></div>
<div class="test test-10"><div></div></div>
<div class="test test-5"></div>
<div class="test test-6"></div>
<div class="test test-10"></div>
<div class="test test-11"></div>
<div class="test test-12"></div>
<div class="test"><div class="test-13"></div></div>
</body>