fix(calc-02): tighten calculator layout and panel styling
Wrap the display and control buttons in a shared display block so the stack and button panels align as a single unit. Reduce corner radii and adjust gaps/padding across the calculator to better fit the updated portrait and desktop layouts.
This commit is contained in:
+43
-17
@@ -53,9 +53,8 @@ body {
|
|||||||
width: min(100vw - 24px, 1120px);
|
width: min(100vw - 24px, 1120px);
|
||||||
height: min(100vh - 24px, 900px);
|
height: min(100vh - 24px, 900px);
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: clamp(10px, 1.4vw, 18px);
|
|
||||||
padding: clamp(12px, 1.8vw, 18px);
|
padding: clamp(12px, 1.8vw, 18px);
|
||||||
border-radius: 28px;
|
border-radius: 8px;
|
||||||
background: linear-gradient(180deg, var(--panel2), var(--panel));
|
background: linear-gradient(180deg, var(--panel2), var(--panel));
|
||||||
border: 1px solid var(--edge);
|
border: 1px solid var(--edge);
|
||||||
box-shadow: 0 26px 70px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
|
box-shadow: 0 26px 70px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
|
||||||
@@ -64,28 +63,39 @@ body {
|
|||||||
align-content: start;
|
align-content: start;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"display functions"
|
"display functions"
|
||||||
"buttons functions"
|
"display functions"
|
||||||
"keypad functions"
|
"keypad functions"
|
||||||
"keypad trigo";
|
"keypad trigo";
|
||||||
|
row-gap: 0;
|
||||||
|
column-gap: clamp(10px, 1.4vw, 18px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.display-block,
|
||||||
.display-panel,
|
.display-panel,
|
||||||
.display-buttons-panel,
|
.display-buttons-panel,
|
||||||
.keypad-panel,
|
.keypad-panel,
|
||||||
.functions-panel,
|
.functions-panel,
|
||||||
.trigo-panel,
|
.trigo-panel,
|
||||||
.status-line {
|
.status-line {
|
||||||
border-radius: 18px;
|
border-radius: 8px;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.06);
|
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||||
background: rgba(6, 10, 16, 0.16);
|
background: rgba(6, 10, 16, 0.16);
|
||||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.display-panel {
|
.display-block {
|
||||||
grid-area: display;
|
grid-area: display;
|
||||||
|
display: grid;
|
||||||
|
gap: 0;
|
||||||
|
align-self: start;
|
||||||
|
justify-items: stretch;
|
||||||
|
grid-template-rows: auto auto;
|
||||||
|
row-gap: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.display-panel {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
padding: clamp(12px, 1.5vw, 16px);
|
padding: clamp(12px, 1.5vw, 16px);
|
||||||
padding-bottom: clamp(4px, 0.6vw, 8px);
|
padding-bottom: clamp(4px, 0.6vw, 8px);
|
||||||
background: linear-gradient(180deg, var(--display), var(--display2));
|
background: linear-gradient(180deg, var(--display), var(--display2));
|
||||||
@@ -95,10 +105,18 @@ body {
|
|||||||
height: auto;
|
height: auto;
|
||||||
min-height: clamp(112px, 18vw, 124px);
|
min-height: clamp(112px, 18vw, 124px);
|
||||||
max-height: none;
|
max-height: none;
|
||||||
align-self: start;
|
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.display-frame {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.display-buttons-panel {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.display-grid {
|
.display-grid {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: grid;
|
display: grid;
|
||||||
@@ -131,7 +149,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.display-buttons-panel {
|
.display-buttons-panel {
|
||||||
grid-area: buttons;
|
width: 100%;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||||
@@ -168,9 +186,10 @@ body {
|
|||||||
display: grid;
|
display: grid;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
border-radius: 14px;
|
border-radius: 8px;
|
||||||
background: rgba(18, 24, 33, 0.98);
|
background: rgba(18, 24, 33, 0.98);
|
||||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||||
|
|
||||||
box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
|
box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -207,6 +226,7 @@ body {
|
|||||||
align-self: start;
|
align-self: start;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
|
padding-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.trigo-panel {
|
.trigo-panel {
|
||||||
@@ -215,6 +235,7 @@ body {
|
|||||||
align-self: start;
|
align-self: start;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
|
padding-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-bar {
|
.status-bar {
|
||||||
@@ -276,8 +297,9 @@ body {
|
|||||||
|
|
||||||
button {
|
button {
|
||||||
border: 1px solid rgba(14, 18, 25, 0.85);
|
border: 1px solid rgba(14, 18, 25, 0.85);
|
||||||
border-radius: 12px;
|
border-radius: 8px;
|
||||||
padding: 10px 8px;
|
padding: 10px 8px;
|
||||||
|
|
||||||
font: inherit;
|
font: inherit;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: var(--btnText);
|
color: var(--btnText);
|
||||||
@@ -396,10 +418,10 @@ button:active {
|
|||||||
height: auto;
|
height: auto;
|
||||||
min-height: calc(100vh - 16px);
|
min-height: calc(100vh - 16px);
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
grid-template-rows: minmax(160px, auto) auto minmax(220px, auto) auto auto;
|
grid-template-rows: minmax(160px, auto) auto auto auto;
|
||||||
|
row-gap: 6px;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"display"
|
"display"
|
||||||
"buttons"
|
|
||||||
"keypad"
|
"keypad"
|
||||||
"functions"
|
"functions"
|
||||||
"trigo";
|
"trigo";
|
||||||
@@ -409,6 +431,10 @@ button:active {
|
|||||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||||
grid-template-rows: repeat(2, auto);
|
grid-template-rows: repeat(2, auto);
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
padding-top: 4px;
|
||||||
|
padding-bottom: 4px;
|
||||||
|
align-content: start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.keypad-grid {
|
.keypad-grid {
|
||||||
@@ -417,7 +443,7 @@ button:active {
|
|||||||
|
|
||||||
.functions-grid,
|
.functions-grid,
|
||||||
.trigo-grid {
|
.trigo-grid {
|
||||||
grid-auto-rows: minmax(0, 1fr);
|
grid-auto-rows: minmax(0, auto);
|
||||||
grid-template-rows: repeat(2, minmax(0, 1fr));
|
grid-template-rows: repeat(2, minmax(0, 1fr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -430,9 +456,9 @@ button:active {
|
|||||||
.calculator {
|
.calculator {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: calc(100vh - 16px);
|
min-height: calc(100vh - 16px);
|
||||||
border-radius: 20px;
|
border-radius: 8px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
gap: 10px;
|
gap: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.display-panel {
|
.display-panel {
|
||||||
@@ -451,7 +477,7 @@ button:active {
|
|||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
border-radius: 10px;
|
border-radius: 8px;
|
||||||
padding: 8px 6px;
|
padding: 8px 6px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<main class="app-shell">
|
<main class="app-shell">
|
||||||
<section class="calculator calculator-portrait" aria-label="HP48GX style RPN calculator">
|
<section class="calculator calculator-portrait" aria-label="HP48GX style RPN calculator">
|
||||||
|
<div class="display-block">
|
||||||
<div class="display-panel">
|
<div class="display-panel">
|
||||||
<div class="status-bar" id="statusLine" aria-live="polite"></div>
|
<div class="status-bar" id="statusLine" aria-live="polite"></div>
|
||||||
<div class="display-frame">
|
<div class="display-frame">
|
||||||
@@ -30,6 +31,7 @@
|
|||||||
<button id="downButton" class="display-button">↓</button>
|
<button id="downButton" class="display-button">↓</button>
|
||||||
<button id="rightButton" class="display-button">→</button>
|
<button id="rightButton" class="display-button">→</button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="keypad-panel">
|
<div class="keypad-panel">
|
||||||
<div class="keypad-grid" id="keypadGrid"></div>
|
<div class="keypad-grid" id="keypadGrid"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user