mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-26 17:09:28 +08:00
fix(panel): make font-scale visibly resize all tables/charts and raise readable base sizes
- Raise base typography tokens (data tables to 12.5px, body/titles to 13px) above CJK 12px floor and widen lg (1.14x) / xl (1.28x) scale steps - Replace 19 hardcoded px font-size rules across tables, charts, tooltips, heatmaps, and monthly bars with scalable --fs-* tokens - Bind [data-font-scale] directly in CSS and mirror onto Shadow DOM overlay panels without colliding with :host defaults - Convert rigid control/row pixel heights to scalable min-heights and scale floating panel base widths on lg/xl
This commit is contained in:
@@ -166,8 +166,8 @@
|
||||
.cons-row-title {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
min-height: calc(20px * var(--ui-font-scale, 1));
|
||||
line-height: 1.3;
|
||||
font-size: var(--fs-base);
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
@@ -177,16 +177,16 @@
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
height: 20px;
|
||||
min-height: calc(20px * var(--ui-font-scale, 1));
|
||||
}
|
||||
|
||||
.cons-share-pill {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 20px;
|
||||
line-height: 1;
|
||||
padding: 0 6px;
|
||||
min-height: calc(20px * var(--ui-font-scale, 1));
|
||||
line-height: 1.2;
|
||||
padding: 1px 6px;
|
||||
font-size: var(--fs-base);
|
||||
font-weight: 600;
|
||||
color: var(--metric-ok);
|
||||
@@ -199,8 +199,8 @@
|
||||
.cons-row-tok {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 20px;
|
||||
line-height: 1;
|
||||
min-height: calc(20px * var(--ui-font-scale, 1));
|
||||
line-height: 1.25;
|
||||
font-size: var(--fs-base);
|
||||
font-weight: 500;
|
||||
color: var(--text-secondary);
|
||||
@@ -209,8 +209,8 @@
|
||||
.cons-row-cost {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 20px;
|
||||
line-height: 1;
|
||||
min-height: calc(20px * var(--ui-font-scale, 1));
|
||||
line-height: 1.25;
|
||||
font-size: var(--fs-base);
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
@@ -287,7 +287,7 @@
|
||||
top: 2px;
|
||||
left: var(--peak-x, 50%);
|
||||
transform: translateX(-50%);
|
||||
font-size: 10px;
|
||||
font-size: var(--fs-xs);
|
||||
font-weight: 600;
|
||||
padding: 1px 6px;
|
||||
color: var(--text-primary);
|
||||
@@ -306,7 +306,7 @@
|
||||
transform: translateX(var(--tip-shift, -50%));
|
||||
width: max-content;
|
||||
min-width: 152px;
|
||||
max-width: min(300px, calc(100% - 8px));
|
||||
max-width: min(320px, calc(100% - 8px));
|
||||
padding: 5px 9px;
|
||||
background: var(--surface-panel);
|
||||
border: 1px solid var(--border-strong);
|
||||
@@ -324,7 +324,7 @@
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
font-size: 10.5px;
|
||||
font-size: var(--fs-sm);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
}
|
||||
|
||||
.trend-tip-calls {
|
||||
font-size: 10px;
|
||||
font-size: var(--fs-xs);
|
||||
color: var(--text-muted);
|
||||
white-space: nowrap;
|
||||
max-width: 190px;
|
||||
@@ -352,7 +352,7 @@
|
||||
}
|
||||
|
||||
.trend-tip-tokens {
|
||||
font-size: 12px;
|
||||
font-size: var(--fs-base);
|
||||
font-weight: 700;
|
||||
color: var(--accent-primary);
|
||||
white-space: nowrap;
|
||||
@@ -360,7 +360,7 @@
|
||||
}
|
||||
|
||||
.trend-tip-cost {
|
||||
font-size: 11px;
|
||||
font-size: var(--fs-md);
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
white-space: nowrap;
|
||||
@@ -368,7 +368,7 @@
|
||||
}
|
||||
|
||||
.trend-tip-sub {
|
||||
font-size: 10px;
|
||||
font-size: var(--fs-xs);
|
||||
color: var(--text-secondary);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
@@ -391,7 +391,7 @@
|
||||
.trend-x-axis {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 18px;
|
||||
min-height: calc(18px * var(--ui-font-scale, 1));
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@@ -400,10 +400,10 @@
|
||||
top: 0;
|
||||
left: var(--tick-x, 0%);
|
||||
transform: translateX(-50%);
|
||||
font-size: 10px;
|
||||
font-size: var(--fs-xs);
|
||||
color: var(--text-muted);
|
||||
white-space: nowrap;
|
||||
line-height: 16px;
|
||||
line-height: 1.35;
|
||||
cursor: pointer;
|
||||
transition: color var(--dur-instant) var(--ease-fast);
|
||||
}
|
||||
@@ -455,21 +455,21 @@
|
||||
|
||||
.trend-hm-weekdays {
|
||||
display: grid;
|
||||
grid-template-rows: 15px repeat(7, var(--hm-cell));
|
||||
grid-template-rows: calc(15px * var(--ui-font-scale, 1)) repeat(7, var(--hm-cell));
|
||||
row-gap: var(--hm-gap);
|
||||
width: 14px;
|
||||
width: calc(15px * var(--ui-font-scale, 1));
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.trend-hm-month-spacer {
|
||||
height: 15px;
|
||||
height: calc(15px * var(--ui-font-scale, 1));
|
||||
}
|
||||
|
||||
.trend-hm-wday {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
font-size: 9px;
|
||||
font-size: var(--fs-2xs);
|
||||
line-height: 1;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
@@ -490,7 +490,7 @@
|
||||
|
||||
.trend-hm-months {
|
||||
position: relative;
|
||||
height: 15px;
|
||||
height: calc(15px * var(--ui-font-scale, 1));
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -498,8 +498,8 @@
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: calc(var(--hm-col, 0) * (var(--hm-cell) + var(--hm-gap)));
|
||||
font-size: 9.5px;
|
||||
line-height: 14px;
|
||||
font-size: var(--fs-2xs);
|
||||
line-height: 1.25;
|
||||
color: var(--text-muted);
|
||||
white-space: nowrap;
|
||||
pointer-events: none;
|
||||
@@ -564,7 +564,7 @@
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
font-size: 10px;
|
||||
font-size: var(--fs-xs);
|
||||
color: var(--text-muted);
|
||||
min-height: 16px;
|
||||
}
|
||||
@@ -581,7 +581,7 @@
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
flex-shrink: 0;
|
||||
font-size: 9.5px;
|
||||
font-size: var(--fs-2xs);
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
@@ -642,7 +642,7 @@
|
||||
}
|
||||
|
||||
.month-cost {
|
||||
font-size: 9.5px;
|
||||
font-size: var(--fs-2xs);
|
||||
color: var(--text-secondary);
|
||||
min-height: 14px;
|
||||
white-space: nowrap;
|
||||
@@ -686,7 +686,7 @@
|
||||
}
|
||||
|
||||
.month-label {
|
||||
font-size: 10px;
|
||||
font-size: var(--fs-xs);
|
||||
color: var(--text-secondary);
|
||||
padding: 1px 3px;
|
||||
border-radius: var(--radius-xs);
|
||||
@@ -700,7 +700,7 @@
|
||||
}
|
||||
|
||||
.month-tok {
|
||||
font-size: 9px;
|
||||
font-size: var(--fs-2xs);
|
||||
color: var(--text-muted);
|
||||
min-height: 12px;
|
||||
white-space: nowrap;
|
||||
|
||||
Reference in New Issue
Block a user