refactor(calc-02): simplify calculator layout structure

Move the display and button panels into a single wrapper and rely on
viewport-height sizing with hidden page overflow to keep the calculator
contained. Also trim redundant panel-specific layout rules and styling.
This commit is contained in:
2026-05-16 21:41:47 +02:00
parent 208db58fe7
commit 813fae1b61
2 changed files with 28 additions and 72 deletions
+6 -52
View File
@@ -32,6 +32,7 @@
html, body {
margin: 0;
min-height: 100%;
overflow-y: hidden;
}
body {
@@ -52,62 +53,22 @@ body {
.calculator {
width: 100%;
max-width: 460px;
height: 100%;
max-height: 100%;
display: grid;
height: 100vh;
max-height: 100vh;
padding: 8px;
border-radius: 8px;
background: var(--panel);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
grid-template-columns: 1fr;
grid-template-rows: auto auto auto auto auto;
gap: 6px;
justify-content: stretch;
align-content: start;
overflow-y: auto;
}
.calculator > .display-block {
grid-row: 1;
}
.calculator > .display-buttons-panel {
grid-row: 2;
}
.calculator > .keypad-panel {
grid-row: 3;
}
.calculator > .functions-panel {
grid-row: 4;
}
.calculator > .trigo-panel {
grid-row: 5;
}
.display-buttons-panel,
.keypad-panel,
.functions-panel,
.trigo-panel {
align-self: start;
justify-self: stretch;
}
.keypad-panel,
.functions-panel,
.trigo-panel {
overflow: auto;
min-height: 0;
}
.calculator > .trigo-panel {
margin-top: 0;
scrollbar-width: thin;
scrollbar-color: rgba(46, 105, 135, 1);
}
.display-block,
.display-panel,
.display-buttons-panel,
.keypad-panel,
.functions-panel,
.trigo-panel {
@@ -117,13 +78,6 @@ body {
box-shadow: none;
}
.display-buttons-panel {
border-radius: 8px;
border: 1px solid rgba(255, 255, 255, 0.06);
background: rgba(6, 10, 16, 0.16);
box-shadow: none;
}
.display-block {
display: grid;
gap: 0;