@thalassic/themes 22.15.1 → 22.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
--tls-tooltip-box-shadow: 0 2px 8px -1px var(--color-shade-30);
|
|
5
5
|
--tls-tooltip-padding: var(--spacing-3);
|
|
6
6
|
--tls-tooltip-border-radius: 8px;
|
|
7
|
+
--tls-tooltip-arrow-width: 12px;
|
|
8
|
+
--tls-tooltip-arrow-height: 6px;
|
|
9
|
+
// Keeps an edge-aligned arrow clear of the rounded corner it sits next to.
|
|
10
|
+
--tls-tooltip-arrow-inset: 8px;
|
|
7
11
|
|
|
8
12
|
padding: var(--tls-tooltip-padding);
|
|
9
13
|
|
|
@@ -15,4 +19,93 @@
|
|
|
15
19
|
box-shadow: var(--tls-tooltip-box-shadow);
|
|
16
20
|
|
|
17
21
|
@include mixins.panel-open;
|
|
22
|
+
|
|
23
|
+
// The arrow protrudes past the bubble into the gap the tooltip offset leaves, so it never
|
|
24
|
+
// takes a pointer the anchor below it should get.
|
|
25
|
+
&--arrow {
|
|
26
|
+
position: relative;
|
|
27
|
+
|
|
28
|
+
&::before {
|
|
29
|
+
content: '';
|
|
30
|
+
|
|
31
|
+
position: absolute;
|
|
32
|
+
|
|
33
|
+
background-color: var(--tls-tooltip-color);
|
|
34
|
+
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&--arrow-top,
|
|
40
|
+
&--arrow-bottom {
|
|
41
|
+
&::before {
|
|
42
|
+
width: var(--tls-tooltip-arrow-width);
|
|
43
|
+
height: var(--tls-tooltip-arrow-height);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.tls-tooltip--arrow-align-start::before {
|
|
47
|
+
inset-inline-start: var(--tls-tooltip-arrow-inset);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&.tls-tooltip--arrow-align-center::before {
|
|
51
|
+
inset-inline-start: calc(50% - var(--tls-tooltip-arrow-width) / 2);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.tls-tooltip--arrow-align-end::before {
|
|
55
|
+
inset-inline-end: var(--tls-tooltip-arrow-inset);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&--arrow-start,
|
|
60
|
+
&--arrow-end {
|
|
61
|
+
&::before {
|
|
62
|
+
width: var(--tls-tooltip-arrow-height);
|
|
63
|
+
height: var(--tls-tooltip-arrow-width);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&.tls-tooltip--arrow-align-start::before {
|
|
67
|
+
inset-block-start: var(--tls-tooltip-arrow-inset);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&.tls-tooltip--arrow-align-center::before {
|
|
71
|
+
inset-block-start: calc(50% - var(--tls-tooltip-arrow-width) / 2);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&.tls-tooltip--arrow-align-end::before {
|
|
75
|
+
inset-block-end: var(--tls-tooltip-arrow-inset);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// `clip-path` has no logical form, so the two inline-axis arrows are mirrored by hand.
|
|
80
|
+
&--arrow-top::before {
|
|
81
|
+
inset-block-end: 100%;
|
|
82
|
+
|
|
83
|
+
clip-path: polygon(50% 0, 100% 100%, 0 100%);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&--arrow-bottom::before {
|
|
87
|
+
inset-block-start: 100%;
|
|
88
|
+
|
|
89
|
+
clip-path: polygon(0 0, 100% 0, 50% 100%);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&--arrow-start::before {
|
|
93
|
+
inset-inline-end: 100%;
|
|
94
|
+
|
|
95
|
+
clip-path: polygon(0 50%, 100% 0, 100% 100%);
|
|
96
|
+
|
|
97
|
+
:root[dir='rtl'] & {
|
|
98
|
+
clip-path: polygon(100% 50%, 0 0, 0 100%);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&--arrow-end::before {
|
|
103
|
+
inset-inline-start: 100%;
|
|
104
|
+
|
|
105
|
+
clip-path: polygon(100% 50%, 0 0, 0 100%);
|
|
106
|
+
|
|
107
|
+
:root[dir='rtl'] & {
|
|
108
|
+
clip-path: polygon(0 50%, 100% 0, 100% 100%);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
18
111
|
}
|