| 1 |
/* ------------------------------------------------------------------- |
| 2 |
Microtip |
| 3 |
|
| 4 |
Modern, lightweight css-only tooltips |
| 5 |
Just 1kb minified and gzipped |
| 6 |
|
| 7 |
@author Ghosh |
| 8 |
@package Microtip |
| 9 |
|
| 10 |
---------------------------------------------------------------------- |
| 11 |
1. Base Styles |
| 12 |
2. Direction Modifiers |
| 13 |
3. Position Modifiers |
| 14 |
--------------------------------------------------------------------*/ |
| 15 |
|
| 16 |
|
| 17 |
/* ------------------------------------------------ |
| 18 |
[1] Base Styles |
| 19 |
-------------------------------------------------*/ |
| 20 |
[class*="elementor-widget-usk-"]*="elementor-widget-usk-""] { |
| 21 |
[aria-label]][role~="tooltip"]~="tooltip""] { |
| 22 |
position: relative; |
| 23 |
} |
| 24 |
|
| 25 |
[aria-label]][role~="tooltip"]~="tooltip""]::before, |
| 26 |
[aria-label]][role~="tooltip"]~="tooltip""]::after { |
| 27 |
transform: translate3d(0, 0, 0); |
| 28 |
-webkit-backface-visibility: hidden; |
| 29 |
backface-visibility: hidden; |
| 30 |
will-change: transform; |
| 31 |
opacity: 0; |
| 32 |
pointer-events: none; |
| 33 |
transition: all var(--microtip-transition-duration, .18s) var(--microtip-transition-easing, ease-in-out) var(--microtip-transition-delay, 0s); |
| 34 |
position: absolute; |
| 35 |
box-sizing: border-box; |
| 36 |
z-index: 10; |
| 37 |
transform-origin: top; |
| 38 |
line-height: 1; |
| 39 |
} |
| 40 |
|
| 41 |
[aria-label]][role~="tooltip"]~="tooltip""]::before { |
| 42 |
background-size: 100% auto !important; |
| 43 |
content: ""; |
| 44 |
} |
| 45 |
|
| 46 |
[aria-label]][role~="tooltip"]~="tooltip""]::after { |
| 47 |
background-color: var(--usk-microtip-bg, #282828); |
| 48 |
border-radius: 4px; |
| 49 |
color: var(--usk-microtip-color, #ffffff); |
| 50 |
content: attr(aria-label); |
| 51 |
font-size: var(--microtip-font-size, 13px); |
| 52 |
font-weight: var(--microtip-font-weight, normal); |
| 53 |
text-transform: capitalize; |
| 54 |
padding: 10px 15px; |
| 55 |
white-space: nowrap; |
| 56 |
box-sizing: content-box; |
| 57 |
} |
| 58 |
|
| 59 |
[aria-label]][role~="tooltip"]~="tooltip""]:hover::before, |
| 60 |
[aria-label]][role~="tooltip"]~="tooltip""]:hover::after, |
| 61 |
[aria-label]][role~="tooltip"]~="tooltip""]:focus::before, |
| 62 |
[aria-label]][role~="tooltip"]~="tooltip""]:focus::after { |
| 63 |
opacity: 1; |
| 64 |
pointer-events: auto; |
| 65 |
} |
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
/* ------------------------------------------------ |
| 70 |
[2] Position Modifiers |
| 71 |
-------------------------------------------------*/ |
| 72 |
|
| 73 |
[role~="tooltip"]~="tooltip""][data-microtip-position|="top"]|="top""]::before { |
| 74 |
background-color: var(--usk-microtip-bg, #282828); |
| 75 |
-webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20transform%3D%22rotate%280%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E"); |
| 76 |
mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20transform%3D%22rotate%280%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E"); |
| 77 |
-webkit-mask-repeat: no-repeat; |
| 78 |
mask-repeat: no-repeat; |
| 79 |
-webkit-mask-size: 100% auto; |
| 80 |
mask-size: 100% auto; |
| 81 |
height: 6px; |
| 82 |
width: 18px; |
| 83 |
margin-bottom: 6px; |
| 84 |
} |
| 85 |
|
| 86 |
[role~="tooltip"]~="tooltip""][data-microtip-position|="top"]|="top""]::after { |
| 87 |
margin-bottom: 11px; |
| 88 |
} |
| 89 |
|
| 90 |
[role~="tooltip"]~="tooltip""][data-microtip-position|="top"]|="top""]::before { |
| 91 |
transform: translate3d(-50%, 0, 0); |
| 92 |
bottom: 100%; |
| 93 |
left: 50%; |
| 94 |
} |
| 95 |
|
| 96 |
[role~="tooltip"]~="tooltip""][data-microtip-position|="top"]|="top""]:hover::before { |
| 97 |
transform: translate3d(-50%, -5px, 0); |
| 98 |
} |
| 99 |
|
| 100 |
[role~="tooltip"]~="tooltip""][data-microtip-position|="top"]|="top""]::after { |
| 101 |
transform: translate3d(-50%, 0, 0); |
| 102 |
bottom: 100%; |
| 103 |
left: 50%; |
| 104 |
} |
| 105 |
|
| 106 |
[role~="tooltip"]~="tooltip""][data-microtip-position="top"]="top""]:hover::after { |
| 107 |
transform: translate3d(-50%, -5px, 0); |
| 108 |
} |
| 109 |
|
| 110 |
/* ------------------------------------------------ |
| 111 |
[2.1] Top Left |
| 112 |
-------------------------------------------------*/ |
| 113 |
[role~="tooltip"]~="tooltip""][data-microtip-position="top-left"]="top-left""]::after { |
| 114 |
transform: translate3d(calc(-100% + 16px), 0, 0); |
| 115 |
bottom: 100%; |
| 116 |
} |
| 117 |
|
| 118 |
[role~="tooltip"]~="tooltip""][data-microtip-position="top-left"]="top-left""]:hover::after { |
| 119 |
transform: translate3d(calc(-100% + 16px), -5px, 0); |
| 120 |
} |
| 121 |
|
| 122 |
|
| 123 |
/* ------------------------------------------------ |
| 124 |
[2.2] Top Right |
| 125 |
-------------------------------------------------*/ |
| 126 |
[role~="tooltip"]~="tooltip""][data-microtip-position="top-right"]="top-right""]::after { |
| 127 |
transform: translate3d(calc(+0% - 16px), 0, 0); |
| 128 |
bottom: 100%; |
| 129 |
} |
| 130 |
|
| 131 |
[role~="tooltip"]~="tooltip""][data-microtip-position="top-right"]="top-right""]:hover::after { |
| 132 |
transform: translate3d(calc(+0% - 16px), -5px, 0); |
| 133 |
} |
| 134 |
|
| 135 |
|
| 136 |
/* ------------------------------------------------ |
| 137 |
[2.3] Bottom |
| 138 |
-------------------------------------------------*/ |
| 139 |
[role~="tooltip"]~="tooltip""][data-microtip-position|="bottom"]|="bottom""]::before { |
| 140 |
background-color: var(--usk-microtip-bg, #282828); |
| 141 |
-webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20transform%3D%22rotate%28180%2018%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E"); |
| 142 |
mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20transform%3D%22rotate%28180%2018%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E"); |
| 143 |
-webkit-mask-repeat: no-repeat; |
| 144 |
mask-repeat: no-repeat; |
| 145 |
-webkit-mask-size: 100% auto; |
| 146 |
mask-size: 100% auto; |
| 147 |
height: 6px; |
| 148 |
width: 18px; |
| 149 |
margin-top: 5px; |
| 150 |
margin-bottom: 0; |
| 151 |
} |
| 152 |
|
| 153 |
[role~="tooltip"]~="tooltip""][data-microtip-position|="bottom"]|="bottom""]::after { |
| 154 |
margin-top: 11px; |
| 155 |
} |
| 156 |
|
| 157 |
[role~="tooltip"]~="tooltip""][data-microtip-position|="bottom"]|="bottom""]::before { |
| 158 |
transform: translate3d(-50%, -10px, 0); |
| 159 |
bottom: auto; |
| 160 |
left: 50%; |
| 161 |
top: 100%; |
| 162 |
} |
| 163 |
|
| 164 |
[role~="tooltip"]~="tooltip""][data-microtip-position|="bottom"]|="bottom""]:hover::before { |
| 165 |
transform: translate3d(-50%, 0, 0); |
| 166 |
} |
| 167 |
|
| 168 |
[role~="tooltip"]~="tooltip""][data-microtip-position|="bottom"]|="bottom""]::after { |
| 169 |
transform: translate3d(-50%, -10px, 0); |
| 170 |
top: 100%; |
| 171 |
left: 50%; |
| 172 |
} |
| 173 |
|
| 174 |
[role~="tooltip"]~="tooltip""][data-microtip-position="bottom"]="bottom""]:hover::after { |
| 175 |
transform: translate3d(-50%, 0, 0); |
| 176 |
} |
| 177 |
|
| 178 |
|
| 179 |
/* ------------------------------------------------ |
| 180 |
[2.4] Bottom Left |
| 181 |
-------------------------------------------------*/ |
| 182 |
[role~="tooltip"]~="tooltip""][data-microtip-position="bottom-left"]="bottom-left""]::after { |
| 183 |
transform: translate3d(calc(-100% + 16px), -10px, 0); |
| 184 |
top: 100%; |
| 185 |
} |
| 186 |
|
| 187 |
[role~="tooltip"]~="tooltip""][data-microtip-position="bottom-left"]="bottom-left""]:hover::after { |
| 188 |
transform: translate3d(calc(-100% + 16px), 0, 0); |
| 189 |
} |
| 190 |
|
| 191 |
|
| 192 |
/* ------------------------------------------------ |
| 193 |
[2.5] Bottom Right |
| 194 |
-------------------------------------------------*/ |
| 195 |
[role~="tooltip"]~="tooltip""][data-microtip-position="bottom-right"]="bottom-right""]::after { |
| 196 |
transform: translate3d(calc(+0% - 16px), -10px, 0); |
| 197 |
top: 100%; |
| 198 |
} |
| 199 |
|
| 200 |
[role~="tooltip"]~="tooltip""][data-microtip-position="bottom-right"]="bottom-right""]:hover::after { |
| 201 |
transform: translate3d(calc(+0% - 16px), 0, 0); |
| 202 |
} |
| 203 |
|
| 204 |
|
| 205 |
/* ------------------------------------------------ |
| 206 |
[2.6] Left |
| 207 |
-------------------------------------------------*/ |
| 208 |
[role~="tooltip"]~="tooltip""][data-microtip-position="left"]="left""]::before, |
| 209 |
[role~="tooltip"]~="tooltip""][data-microtip-position="left"]="left""]::after { |
| 210 |
bottom: auto; |
| 211 |
left: auto; |
| 212 |
right: 100%; |
| 213 |
top: 50%; |
| 214 |
transform: translate3d(2px, -50%, 0); |
| 215 |
line-height: 1.4; |
| 216 |
} |
| 217 |
|
| 218 |
[role~="tooltip"]~="tooltip""][data-microtip-position="left"]="left""]::before { |
| 219 |
background-color: var(--usk-microtip-bg, #282828); |
| 220 |
-webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20transform%3D%22rotate%28-90%2018%2018%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E"); |
| 221 |
mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20transform%3D%22rotate%28-90%2018%2018%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E"); |
| 222 |
-webkit-mask-repeat: no-repeat; |
| 223 |
mask-repeat: no-repeat; |
| 224 |
-webkit-mask-size: 100% auto; |
| 225 |
mask-size: 100% auto; |
| 226 |
height: 18px; |
| 227 |
width: 6px; |
| 228 |
margin-right: 5px; |
| 229 |
margin-bottom: 0; |
| 230 |
|
| 231 |
} |
| 232 |
|
| 233 |
[role~="tooltip"]~="tooltip""][data-microtip-position="left"]="left""]::after { |
| 234 |
margin-right: 10px; |
| 235 |
} |
| 236 |
|
| 237 |
[role~="tooltip"]~="tooltip""][data-microtip-position="left"]="left""]:hover::before, |
| 238 |
[role~="tooltip"]~="tooltip""][data-microtip-position="left"]="left""]:hover::after { |
| 239 |
transform: translate3d(0, -50%, 0); |
| 240 |
} |
| 241 |
|
| 242 |
|
| 243 |
/* ------------------------------------------------ |
| 244 |
[2.7] Right |
| 245 |
-------------------------------------------------*/ |
| 246 |
[role~="tooltip"]~="tooltip""][data-microtip-position="right"]="right""]::before, |
| 247 |
[role~="tooltip"]~="tooltip""][data-microtip-position="right"]="right""]::after { |
| 248 |
bottom: auto; |
| 249 |
left: 100%; |
| 250 |
top: 50%; |
| 251 |
transform: translate3d(-2px, -50%, 0); |
| 252 |
} |
| 253 |
|
| 254 |
[role~="tooltip"]~="tooltip""][data-microtip-position="right"]="right""]::before { |
| 255 |
background-color: var(--usk-microtip-bg, #282828); |
| 256 |
-webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20transform%3D%22rotate%2890%206%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E"); |
| 257 |
mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20transform%3D%22rotate%2890%206%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E"); |
| 258 |
-webkit-mask-repeat: no-repeat; |
| 259 |
mask-repeat: no-repeat; |
| 260 |
-webkit-mask-size: 100% auto; |
| 261 |
mask-size: 100% auto; |
| 262 |
height: 18px; |
| 263 |
width: 6px; |
| 264 |
margin-bottom: 0; |
| 265 |
margin-left: 5px; |
| 266 |
} |
| 267 |
|
| 268 |
[role~="tooltip"]~="tooltip""][data-microtip-position="right"]="right""]::after { |
| 269 |
margin-left: 11px; |
| 270 |
} |
| 271 |
|
| 272 |
[role~="tooltip"]~="tooltip""][data-microtip-position="right"]="right""]:hover::before, |
| 273 |
[role~="tooltip"]~="tooltip""][data-microtip-position="right"]="right""]:hover::after { |
| 274 |
transform: translate3d(0, -50%, 0); |
| 275 |
} |
| 276 |
|
| 277 |
/* ------------------------------------------------ |
| 278 |
[3] Size |
| 279 |
-------------------------------------------------*/ |
| 280 |
[role~="tooltip"]~="tooltip""][data-microtip-size="small"]="small""]::after { |
| 281 |
white-space: initial; |
| 282 |
width: 80px; |
| 283 |
} |
| 284 |
|
| 285 |
[role~="tooltip"]~="tooltip""][data-microtip-size="medium"]="medium""]::after { |
| 286 |
white-space: initial; |
| 287 |
width: 150px; |
| 288 |
} |
| 289 |
|
| 290 |
[role~="tooltip"]~="tooltip""][data-microtip-size="large"]="large""]::after { |
| 291 |
white-space: initial; |
| 292 |
width: 260px; |
| 293 |
} |
| 294 |
} |