Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-mixins/mixins-including-mixins.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<title>CSS Mixins: Mixins depending on other mixins</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
@mixin --m1() {
&.a {
@apply --m2;
}
}
.c {
@apply --m1;
}
@mixin --m2() {
&.b {
color: green;
}
}
</style>
</head>
<body>
<div><div class="a b c" id="target">This text should be green.</div></div>
<script>
test(() => {
let target = document.getElementById('target');
assert_equals(getComputedStyle(target).color, 'rgb(0, 128, 0)');
});
</script>
</body>
</html>