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:
karimk123 2022-06-20 13:56:00 +03:00 committed by GitHub
parent a6f8f54cbf
commit a09849752d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -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;

View file

@ -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");
}
}