mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-21 07:46:15 +08:00
Adjusted Caps warning position (#3148) karimk123 miodec
* Adjusted Caps warning position the caps warning div was blocking the test modes text so i moved it up a little. * animating based on the focus state instead to always stay at the correct distance from the content below Co-authored-by: Miodec <bartnikjack@gmail.com>
This commit is contained in:
parent
a6f8f54cbf
commit
a09849752d
|
@ -485,9 +485,14 @@
|
|||
padding: 1rem;
|
||||
border-radius: var(--roundness);
|
||||
/* margin-top: 1rem; */
|
||||
transition: 0.25s;
|
||||
transition: 0.125s;
|
||||
z-index: 999;
|
||||
pointer-events: none;
|
||||
top: -2.5rem;
|
||||
|
||||
&.focus {
|
||||
top: 0rem;
|
||||
}
|
||||
|
||||
i {
|
||||
margin-right: 0.5rem;
|
||||
|
|
|
@ -13,6 +13,7 @@ export function set(foc: boolean, withCursor = false): void {
|
|||
if (!withCursor) $("body").css("cursor", "none");
|
||||
$("#middle").addClass("focus");
|
||||
$("#bannerCenter").addClass("focus");
|
||||
$("#capsWarning").addClass("focus");
|
||||
} else if (!foc && state) {
|
||||
state = false;
|
||||
Caret.startAnimation();
|
||||
|
@ -21,6 +22,7 @@ export function set(foc: boolean, withCursor = false): void {
|
|||
$("body").css("cursor", "default");
|
||||
$("#middle").removeClass("focus");
|
||||
$("#bannerCenter").removeClass("focus");
|
||||
$("#capsWarning").removeClass("focus");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue