-
Notifications
You must be signed in to change notification settings - Fork 0
/
diascii.css
75 lines (63 loc) · 1.77 KB
/
diascii.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
diascii {
/* Scale div's size. Without scaling, each character in the diagram
represents a 1px box. Scaling to 10px x 22px to make it close to
monospace size. */
--diascii-scale-x: 10;
--diascii-scale-y: 22;
/* Scale the gap between two crossing arrows that do not intersect */
--diascii-scale-arrow-gap: 2;
/* Minimal arrow head size, in pixels */
--diascii-min-arrow-head: 5;
position: relative;
display: block;
overflow: visible;
margin:0 auto;
}
diascii.DIASCII_DEBUG {
background-size: calc(var(--diascii-scale-x) * 1px) calc(var(--diascii-scale-y) * 1px);
background-image:
linear-gradient(to right, rgba(0, 0, 0, 0.2) 1px, transparent 1px),
linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 1px, transparent 1px);
}
diascii div.DIASCII_BOX {
position:absolute;
}
diascii span.DIASCII_TEXT {
font-size: calc(var(--diascii-scale-y) * 0.7 * 1px);
font-weight: 500;
width: 100%;
}
diascii svg.DIASCII_ARROW {
display: block;
position: absolute;
overflow: visible;
}
diasciis svg.DIASCII_ARROW marker {
stroke: none;
}
diascii svg.DIASCII_ARROW path {
fill: none;
}
diascii span.DIASCII_TEXT, diascii span.DIASCII_ID {
position:absolute;
align-items: center;
text-align: center;
transform: translate(-50%, -50%);
}
diascii span.DIASCII_ID,
diascii span.DIASCII_CLASS0 {
display:none;
position:absolute;
left:50%;
transform: translate(-50%, -40%);
}
diascii div.DIASCII_BOX span.DIASCII_TEXT_COLONS,
diascii div.DIASCII_BOX span.DIASCII_ALIGN_CENTERISH {
top:50%!important;
left:50%!important;
}
diascii div.DIASCII_BOX span.DIASCII_ALIGN_RIGHT:not(.DIASCII_ALIGN_CENTERISH) {
right:-5px!important;
left:unset!important;
width:unset!important;
}