-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Expand file tree
/
Copy pathbasic.html
More file actions
42 lines (42 loc) · 998 Bytes
/
basic.html
File metadata and controls
42 lines (42 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html>
<head>
<title>CSS Mixins: Basic test</title>
<link rel="help" href="https://drafts.csswg.org/css-mixins-1/#defining-mixins">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
@mixin --m1() {
.cls {
color: green;
}
}
@mixin invalid-name() {
.cls {
color: red;
}
}
@mixin missing-argument-list {
.cls {
color: red;
}
}
@mixin --empty() {}
div {
@apply --m1;
@apply invalid-name;
@apply missing-argument-list;
@apply --empty;
}
</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>