Skip to content

Commit ab884f1

Browse files
committed
Fix caret scaling and size support for all carets
1 parent c432e94 commit ab884f1

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

public/css/style.scss

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ a:hover {
299299
}
300300

301301
#caret {
302-
width: 2px;
303302
height: 1.5rem;
304303
background: var(--caret-color);
305304
animation-name: caretFlash;
@@ -309,6 +308,11 @@ a:hover {
309308
position: absolute;
310309
border-radius: var(--roundness);
311310
// transition: 0.05s;
311+
transform-origin: top left;
312+
}
313+
314+
#caret.default{
315+
width: 2px;
312316
}
313317

314318
#caret.block{
@@ -325,24 +329,25 @@ a:hover {
325329

326330
#caret.underline{
327331
height: 2px;
328-
width: .7em;
329-
margin-top: 1.2em;
330-
padding-left: .5em;
332+
width: 0.8em;
333+
margin-top: 1.3em;
334+
margin-left: 0.3em;
331335
}
332336

337+
#caret.underline.size125{margin-top: 1.8em;}
338+
#caret.underline.size15{margin-top: 2.1em;}
339+
#caret.underline.size2{margin-top: 2.7em;}
340+
333341
#caret.size125{
334-
height: 2rem;
335-
width: 2px;
342+
transform: scale(1.25);
336343
}
337344

338345
#caret.size15{
339-
height: 2.25rem;
340-
width: 3px;
346+
transform: scale(1.45);
341347
}
342348

343349
#caret.size2{
344-
height: 3rem;
345-
width: 4px;
350+
transform: scale(1.9);
346351
}
347352

348353
@keyframes caretFlash {

0 commit comments

Comments
 (0)