-
Notifications
You must be signed in to change notification settings - Fork 1
/
schemascii_example.css
59 lines (57 loc) · 1.45 KB
/
schemascii_example.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
50
51
52
53
54
55
56
57
58
59
svg.schemascii {
background: black;
& .wire polyline {
stroke: var(--sch-color, blue);
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
transition-duration: 0.2s;
fill: transparent;
}
& .wire circle {
fill: var(--sch-color, blue);
transition-duration: 0.2s;
}
& :is(.wire, .component):hover {
--sch-color: lime;
}
& .component :is(polyline, path, line, polygon, rect, circle):not(.filled) {
stroke: var(--sch-color, red);
stroke-width: 2;
stroke-linecap: round;
transition-duration: 0.2s;
fill: transparent;
}
& .component :is(polyline, path, line, polygon, rect, circle).filled {
fill: var(--sch-color, red);
stroke: none;
transition-duration: 0.2s;
}
& .component .plus :is(polyline, path, line) {
stroke-width: 1;
}
& .component polygon {
fill: var(--sch-color, red);
}
& .component text {
fill: white;
transition-duration: 0.2s;
}
& .component:hover text {
font-weight: bold;
}
& .component tspan:is(.cmp-value, .part-num) {
opacity: 50%;
}
}
@media all and (prefers-color-scheme: light) {
svg.schemascii {
background: white;
& .component text {
fill: black;
}
& :is(.wire, .component):hover {
--sch-color: lime;
}
}
}