Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE html>
<html>
<head>
<title>CSS Mixins: Declarations directly in mixin</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
@mixin --m1() {
color: green;
}
div {
color: red;
@apply --m1;
}
</style>
</head>
<body>
<div><div class="cls" 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>