Skip to content

Commit

Permalink
style(typing test): align mini progress with the words, not the conte…
Browse files Browse the repository at this point in the history
…nt width
  • Loading branch information
Miodec committed Apr 26, 2024
1 parent ed9ec67 commit 155c348
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/src/html/pages/test.html
Expand Up @@ -104,7 +104,7 @@
<div id="timerNumber" class="timerMain">
<div>60</div>
</div>
<div id="miniTimerAndLiveWpm" class="timerMain">
<div id="miniTimerAndLiveWpm" class="full-width-padding timerMain">
<div class="time hidden">1:00</div>
<div class="wpm hidden">60</div>
<div class="acc hidden">100%</div>
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/styles/test.scss
Expand Up @@ -1144,11 +1144,10 @@
height: 0;
margin-left: 0.25em;
display: flex;
position: absolute;
margin-top: -1.25em;
color: black;

div {
margin-top: -1.25em;
font-size: 1em;
line-height: 1em;
}
Expand Down
14 changes: 12 additions & 2 deletions frontend/src/ts/test/test-ui.ts
Expand Up @@ -1530,9 +1530,19 @@ ConfigEvent.subscribe((key, value) => {
}
if (key === "tapeMode") {
if (value === "off") {
$("#typingTest").css("max-width", "70ch");
$("#typingTest").css({
"max-width": "70ch%",
});
$("#miniTimerAndLiveWpm").css({
"grid-column": "full-width-padding",
});
} else {
$("#typingTest").css("max-width", "100%");
$("#typingTest").css({
"max-width": "100%",
});
$("#miniTimerAndLiveWpm").css({
"grid-column": "content",
});
}
}
});

0 comments on commit 155c348

Please sign in to comment.