-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathstyle.css
49 lines (41 loc) · 869 Bytes
/
style.css
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
43
44
45
46
47
48
49
:root {
--width: 300px;
--height: 100px;
--top-color: #f44336;
--bottom-color: #2196F3;
}
.separator {
position: relative;
width: var(--width);
height: var(--height);
}
.separator::before {
position: absolute;
content: '';
display: block;
width: 100%;
height: 100%;
background-color: var(--top-color);
-webkit-mask-image: url(diagonal.svg#top);
-webkit-mask-size: cover;
mask-image: url(diagonal.svg#top);
mask-size: cover;
}
.separator::after {
position: absolute;
content: '';
display: block;
width: 100%;
height: 100%;
background-color: var(--bottom-color);
-webkit-mask-image: url(diagonal.svg#bottom);
-webkit-mask-size: cover;
mask-image: url(diagonal.svg#bottom);
mask-size: cover;
}
.separator.reverse {
transform: rotateY(180deg);
}
.vertical .separator.reverse {
transform: rotateX(180deg);
}