Spaces:
Configuration error
Configuration error
File size: 2,962 Bytes
a7060a0 | 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 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | .tooltip {
--transition-delay: 150ms;
--animation-duration: 100ms;
--animation-curve: cubic-bezier(0.21, 1.04, 0.68, 1);
--animation-start: -10px;
--pointer-size: 10px;
--offset-x: var(--spacing-base);
top: -1000px;
left: -1000px;
color: var(--color-neutral-inverted-content);
display: none;
z-index: 99999;
padding: 4px 10px;
font-size: 14px;
line-height: 24px;
position: absolute;
pointer-events: none;
background-color: var(--color-neutral-inverted-background);
border-radius: 3px;
white-space: normal;
overflow-wrap: anywhere;
max-width: 250px;
&::before {
left: 50%;
bottom: 0;
content: "";
width: var(--pointer-size);
height: var(--pointer-size);
display: block;
position: absolute;
background-color: inherit;
transform: translate(-50%, 50%) rotate(45deg);
}
&.before-appear,
&.before-disappear {
transition:
opacity var(--animation-duration) var(--animation-curve) var(--transition-delay),
transform var(--animation-duration) var(--animation-curve) var(--transition-delay);
}
&.before-appear {
opacity: 0;
display: flex;
transform: translate3d(0, var(--animation-start), 0);
}
&.appear {
opacity: 1;
transform: translate3d(0, 0, 0);
}
&.visible {
opacity: 1;
display: flex;
}
&.before-disappear {
opacity: 1;
display: flex;
transform: translate3d(0, 0, 0);
}
&.disappear {
opacity: 0;
transform: translate3d(0, var(--animation-start), 0);
}
&_align {
&_top-center {
--animation-start: -10px;
&::before {
bottom: 0;
transform: translate(-50%, 50%) rotate(45deg);
}
}
&_bottom-center {
--animation-start: 10px;
&::before {
top: 0;
transform: translate(-50%, -50%) rotate(45deg);
}
}
&_bottom-left {
margin-left: calc(-1 * (var(--offset-x) - var(--pointer-size) / 2));
--animation-start: 10px;
&::before {
top: 0;
left: 24px;
transform: translate(-50%, -50%) rotate(45deg);
}
}
&_top-left {
margin-left: calc(-1 * (var(--offset-x) - var(--pointer-size) / 2));
--animation-start: -10px;
&::before {
bottom: 0;
left: 24px;
transform: translate(-50%, 50%) rotate(45deg);
}
}
&_top-right {
margin-left: calc(var(--offset-x) - (var(--pointer-size) / 2));
--animation-start: -10px;
&::before {
left: initial;
bottom: 0;
right: 18px;
transform: translate(-50%, 50%) rotate(45deg);
}
}
&_bottom-right {
margin-left: calc(var(--offset-x) - (var(--pointer-size) / 2));
--animation-start: 10px;
&::before {
left: initial;
top: 0;
right: var(--offset-x);
transform: translate(-50%, -50%) rotate(45deg);
}
}
}
}
.wrapper {
display: contents;
}
|