chore(ui): normalise text size and spacing (#1656)

This commit is contained in:
Alex
2026-06-07 08:46:25 +01:00
committed by GitHub
parent 2675c4a04a
commit 349f046062
180 changed files with 4555 additions and 4466 deletions
@@ -26,7 +26,7 @@
background-color: var(--surface-page);
.layout-main {
--mobile-topbar-height: 3.5rem;
--mobile-topbar-height: 3.0625rem;
box-sizing: border-box;
padding:
@@ -42,7 +42,7 @@
--sidebar-shell-padding-inline-end: var(--space-4);
--sidebar-header-padding-block: var(--space-2);
--sidebar-header-gap-after: var(--space-3);
--sidebar-row-min-height: 3rem;
--sidebar-row-min-height: 2.625rem;
--sidebar-row-padding-block: var(--space-3);
--sidebar-row-padding-inline-start: var(--space-3);
--sidebar-row-padding-inline-end: var(--space-3);
@@ -52,10 +52,10 @@
--sidebar-group-gap: var(--space-4);
--sidebar-section-spacing-before: var(--space-4);
--sidebar-section-spacing-after: var(--space-1);
--sidebar-section-min-height: 2rem;
--sidebar-section-min-height: 1.75rem;
--sidebar-section-inline-start: var(--space-3);
--sidebar-section-inline-end: var(--space-3);
--sidebar-section-font-size: var(--text-base);
--sidebar-section-font-size: var(--app-text-base);
--sidebar-section-font-weight: 600;
position: fixed;
@@ -125,7 +125,7 @@
.layout-wrapper {
.layout-sidebar {
width: fit-content;
max-width: calc(100dvw - 1rem);
max-width: calc(100dvw - 0.875rem);
border-right: 1px solid var(--border-color);
padding:
calc(var(--space-3) + env(safe-area-inset-top))
@@ -14,7 +14,7 @@
--sidebar-header-padding-inline-start: var(--space-2);
--sidebar-header-padding-inline-end: var(--space-1);
--sidebar-header-gap-after: var(--space-2);
--sidebar-row-min-height: 2.25rem;
--sidebar-row-min-height: 1.9688rem;
--sidebar-row-padding-block: var(--space-2);
--sidebar-row-padding-inline-start: var(--space-2);
--sidebar-row-padding-inline-end: var(--space-1);
@@ -25,10 +25,10 @@
--sidebar-group-gap: var(--space-3);
--sidebar-section-spacing-before: var(--space-3);
--sidebar-section-spacing-after: var(--space-1);
--sidebar-section-min-height: 1.25rem;
--sidebar-section-min-height: 1.0938rem;
--sidebar-section-inline-start: var(--space-2);
--sidebar-section-inline-end: var(--space-3);
--sidebar-section-font-size: var(--text-xs);
--sidebar-section-font-size: var(--app-text-xs);
--sidebar-section-font-weight: 500;
--sidebar-focus-ring: inset 0 0 0 1px color-mix(in srgb, var(--color-primary) 50%, transparent);
@@ -98,7 +98,7 @@ body.layout-resizing-cursor {
padding: var(--space-2) var(--space-3);
border-radius: var(--radius-sm);
color: var(--color-text);
font-size: var(--text-base);
font-size: var(--app-text-base);
cursor: pointer;
&:hover {
@@ -157,7 +157,7 @@ body.layout-resizing-cursor {
display: block;
width: 100%;
height: 1px;
margin: 0 0.4rem;
margin: 0 0.35rem;
background-color: var(--color-border);
}
+13 -12
View File
@@ -20,6 +20,7 @@ body {
background-color: var(--color-app);
color: var(--color-text);
font-family: var(--font-family), serif;
font-size: var(--app-text-base);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@@ -62,7 +63,7 @@ h3,
h4,
h5,
h6 {
margin: 1.5rem 0 1rem;
margin: 1.3125rem 0 0.875rem;
color: var(--color-text-strong);
font-weight: 500;
line-height: 1.2;
@@ -74,31 +75,31 @@ h6 {
}
h1 {
font-size: 2.5rem;
font-size: var(--text-4xl);
}
h2 {
font-size: 2rem;
font-size: var(--text-3xl);
}
h3 {
font-size: 1.75rem;
font-size: var(--text-2xl);
}
h4 {
font-size: 1.5rem;
font-size: var(--text-xl);
}
h5 {
font-size: 1.25rem;
font-size: var(--text-lg);
}
h6 {
font-size: 1rem;
font-size: var(--text-sm);
}
p {
margin: 0 0 1rem;
margin: 0 0 0.875rem;
color: var(--color-text);
line-height: 1.5;
overflow-wrap: break-word;
@@ -113,20 +114,20 @@ p.p-secondary {
}
mark {
padding: 0.25rem 0.4rem;
padding: 0.2188rem 0.35rem;
border-radius: var(--radius-lg);
background: #fff8e1;
font-family: monospace;
}
blockquote {
margin: 1rem 0;
padding: 0 2rem;
margin: 0.875rem 0;
padding: 0 1.75rem;
border-left: 4px solid #90a4ae;
}
hr {
margin: 1rem 0;
margin: 0.875rem 0;
border-top: solid var(--color-border);
border-width: 1px 0 0;
}
+2 -2
View File
@@ -25,7 +25,7 @@
background-clip: padding-box;
color: var(--app-button-color);
font: inherit;
font-size: var(--text-base);
font-size: var(--app-text-base);
font-weight: 500;
line-height: 1;
text-decoration: none;
@@ -91,7 +91,7 @@
--app-button-padding-x: var(--control-padding-x-sm);
--app-button-icon-size: var(--control-icon-size-sm);
font-size: var(--text-sm);
font-size: var(--app-text-sm);
}
.app-button-icon {
+24 -29
View File
@@ -32,22 +32,21 @@
--control-primary-border-hover: color-mix(in srgb, var(--primary-color) 45%, var(--control-primary-bg));
--control-focus-border: color-mix(in srgb, var(--primary-color) 50%, var(--control-bg));
--control-focus-ring-color: color-mix(in srgb, var(--primary-color) 50%, transparent);
--control-height: 2.625rem;
--control-height-sm: 2.25rem;
--control-padding-x: 0.75rem;
--control-padding-x-sm: 0.875rem;
--control-icon-size: 1rem;
--control-icon-size-sm: 0.875rem;
--control-gap: 0.5rem;
--control-height: 2.2969rem;
--control-height-sm: 1.9688rem;
--control-padding-x: 0.6563rem;
--control-padding-x-sm: 0.7656rem;
--control-icon-size: 0.875rem;
--control-icon-size-sm: 0.7656rem;
--control-gap: 0.4375rem;
--control-radius: var(--radius-md);
--control-disabled-opacity: 0.5;
--danger-color: var(--color-danger);
--danger-hover-color: var(--color-danger-hover);
--warning-color: var(--color-warning);
--info-color: var(--color-info);
--focus-ring: 0 0 0 0.2rem color-mix(in srgb, var(--primary-color) 40%, transparent);
--font-family: -apple-system, "BlinkMacSystemFont", "Segoe UI", "Roboto", "Helvetica", "Arial", sans-serif;
--font-size-root: 14px;
--focus-ring: 0 0 0 0.175rem color-mix(in srgb, var(--primary-color) 40%, transparent);
--font-family: var(--font-sans);
--page-content-gap: var(--space-4);
--page-gutter-block: var(--space-5);
--page-gutter-inline: var(--space-5);
@@ -58,16 +57,12 @@
--radius-sm: 4px;
--shadow-overlay: 0 30px 80px -20px rgb(0 0 0 / 70%), 0 10px 30px -10px rgb(0 0 0 / 50%);
--shadow-sm: 0 2px 4px rgb(0 0 0 / 25%);
--space-1: 0.25rem;
--space-2: 0.5rem;
--space-3: 0.75rem;
--space-4: 1rem;
--space-5: 1.25rem;
--space-6: 1.5rem;
--text-base: 1rem;
--text-lg: 1.125rem;
--text-sm: 0.875rem;
--text-xs: 0.75rem;
--space-1: 0.2188rem;
--space-2: 0.4375rem;
--space-3: 0.6563rem;
--space-4: 0.875rem;
--space-5: 1.0938rem;
--space-6: 1.3125rem;
--transition-base: 0.2s ease;
--transition-fast: 0.15s ease;
--book-type-pdf-color: var(--color-red-600);
@@ -93,10 +88,10 @@
@mixin sidebar-fixed-overlay {
position: fixed !important;
top: var(--sidebar-popover-top, 0.75rem) !important;
top: var(--sidebar-popover-top, 0.6563rem) !important;
bottom: auto !important;
left: var(--sidebar-popover-left, calc(var(--sidebar-width, 225px) + 0.5rem)) !important;
max-height: var(--sidebar-popover-max-height, calc(100vh - 1rem)) !important;
left: var(--sidebar-popover-left, calc(var(--sidebar-width, 225px) + 0.4375rem)) !important;
max-height: var(--sidebar-popover-max-height, calc(100vh - 0.875rem)) !important;
margin: 0 !important;
overflow: auto !important;
transform: none !important;
@@ -174,7 +169,7 @@
}
.p-toast {
top: 4rem !important;
top: 3.5rem !important;
}
.p-inputchips,
@@ -189,7 +184,7 @@
}
.chart-info-tooltip.p-tooltip {
--p-tooltip-max-width: 25rem;
--p-tooltip-max-width: 21.875rem;
}
.progress-incomplete .p-progressbar-value {
@@ -221,11 +216,11 @@
}
.custom-button-padding .p-button {
padding-block: 0.25rem !important;
padding-block: 0.2188rem !important;
}
.book-details-dialog .p-dialog-header {
padding: 1rem 1.25rem !important;
padding: 0.875rem 1.0938rem !important;
}
.sidebar-flyout-popover.p-popover {
@@ -239,7 +234,7 @@
@media (width <= 991px) {
.sidebar-flyout-popover.p-popover {
max-width: calc(100vw - 1rem) !important;
max-width: calc(100vw - 0.875rem) !important;
}
}
@@ -267,7 +262,7 @@
.p-menu-item-link,
.p-tieredmenu-item-content > .p-tieredmenu-item-link,
.p-tieredmenu-item-link {
min-height: 3rem !important;
min-height: 2.625rem !important;
padding: var(--space-3) var(--space-4) !important;
gap: var(--space-3) !important;
}
@@ -29,11 +29,11 @@
}
> .app-button {
--app-button-padding-x: 1rem;
--app-button-padding-x: 0.875rem;
}
> .app-button-icon {
width: calc(var(--app-button-height) + 0.375rem);
width: calc(var(--app-button-height) + 0.3281rem);
}
> .app-button-primary {
+17 -17
View File
@@ -18,7 +18,7 @@
@media #{variables.$mobile-shell-media-query} {
.cdk-overlay-backdrop.command-palette-backdrop {
top: 3.5rem;
top: 3.0625rem;
}
}
@@ -73,7 +73,7 @@
flex-shrink: 0;
width: var(--control-icon-size);
height: var(--control-icon-size);
font-size: var(--text-base);
font-size: var(--app-text-base);
color: var(--color-surface-500);
}
@@ -96,7 +96,7 @@
.sidebar-notification-popover,
.user-account-popover {
max-width: calc(100vw - 1rem);
max-width: calc(100vw - 0.875rem);
overflow: hidden;
border: 1px solid var(--color-border);
border-radius: var(--control-radius);
@@ -114,16 +114,16 @@
.user-account-popover {
display: flex;
flex-direction: column;
width: min(17.5rem, calc(100vw - 1rem));
width: min(15.3125rem, calc(100vw - 0.875rem));
}
.user-account-popover-header {
display: flex;
flex-direction: column;
gap: 0.5rem;
gap: 0.4375rem;
box-sizing: border-box;
width: 100%;
padding: 0.75rem;
padding: 0.6563rem;
border-bottom: 1px solid var(--color-border);
}
@@ -131,17 +131,17 @@
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
gap: 0.4375rem;
width: 100%;
}
.user-account-popover-header h2 {
display: flex;
align-items: baseline;
gap: 0.5rem;
gap: 0.4375rem;
min-width: 0;
margin: 0;
font-size: var(--text-lg);
font-size: var(--app-text-lg);
font-weight: 600;
line-height: 1.15;
white-space: nowrap;
@@ -152,7 +152,7 @@
overflow: hidden;
text-overflow: ellipsis;
color: var(--color-text-secondary);
font-size: var(--text-xs);
font-size: var(--app-text-xs);
font-weight: 500;
}
@@ -161,14 +161,14 @@
align-items: center;
justify-content: center;
flex: 0 0 auto;
width: 2rem;
height: 2rem;
width: 1.75rem;
height: 1.75rem;
padding: 0;
border: 0;
border-radius: 8px;
background: transparent;
color: var(--color-surface-500);
font-size: var(--text-base);
font-size: var(--app-text-base);
cursor: pointer;
transition:
background-color var(--transition-fast),
@@ -186,14 +186,14 @@
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 0.5rem;
gap: 0.4375rem;
}
.user-account-popover-body {
display: flex;
flex-direction: column;
gap: 0.25rem;
padding: 0.375rem;
gap: 0.2188rem;
padding: 0.3281rem;
}
.user-account-popover .user-account-popover-action {
@@ -202,7 +202,7 @@
}
.user-account-popover-footer {
padding: 0.375rem;
padding: 0.3281rem;
border-top: 1px solid var(--color-border);
}
+19 -19
View File
@@ -41,7 +41,7 @@ app-tabs {
border: 0;
background: none;
color: var(--color-text-secondary);
font-size: 0.9375rem;
font-size: 0.8203rem;
font-weight: 500;
line-height: 1;
white-space: nowrap;
@@ -83,11 +83,11 @@ app-tabs {
app-tabs.placement-below {
display: flex;
align-items: flex-start;
height: var(--app-tabs-row-height, 3.5rem);
padding: 0.25rem 2rem 0;
height: var(--app-tabs-row-height, 3.0625rem);
padding: 0.2188rem 1.75rem 0;
@media (width <= 767px) {
padding: 0.25rem 1rem 0;
padding: 0.2188rem 0.875rem 0;
}
}
@@ -100,29 +100,29 @@ app-tabs.variant-underline {
align-items: stretch;
width: 100%;
height: 100%;
gap: 1.5rem;
padding: 0 2rem;
gap: 1.3125rem;
padding: 0 1.75rem;
&::after {
content: "";
position: absolute;
right: 2rem;
right: 1.75rem;
bottom: 0;
left: 2rem;
left: 1.75rem;
height: 1px;
background: var(--app-tabs-divider);
pointer-events: none;
}
@media (width <= 767px) {
gap: 1rem;
padding: 0 1rem;
gap: 0.875rem;
padding: 0 0.875rem;
overflow-x: auto;
scrollbar-width: none;
&::after {
right: 1rem;
left: 1rem;
right: 0.875rem;
left: 0.875rem;
}
&::-webkit-scrollbar {
@@ -132,13 +132,13 @@ app-tabs.variant-underline {
}
.app-tab {
min-width: 5rem;
padding: 0 1rem;
min-width: 4.375rem;
padding: 0 0.875rem;
@media (width <= 767px) {
flex: 1 1 0;
min-width: 4rem;
padding: 0 0.875rem;
min-width: 3.5rem;
padding: 0 0.7656rem;
}
&[aria-selected="true"] {
@@ -173,7 +173,7 @@ app-tabs.variant-underline {
app-tabs.variant-segmented {
.app-tabs {
gap: 0.125rem;
gap: 0.1094rem;
padding: var(--space-1);
border-radius: var(--radius-lg);
background: var(--control-bg);
@@ -189,8 +189,8 @@ app-tabs.variant-segmented {
}
.app-tab {
height: 2rem;
padding: 0 1rem;
height: 1.75rem;
padding: 0 0.875rem;
border-radius: var(--control-radius);
&:hover:not([aria-selected="true"]) {
+15
View File
@@ -6,6 +6,13 @@
@custom-variant dark (&:where(.dark, .dark *));
@theme static {
--font-sans: -apple-system, "BlinkMacSystemFont", "Segoe UI", "Roboto", "Helvetica", "Arial", sans-serif;
--text-app-xs: 0.6563rem;
--text-app-sm: 0.7656rem;
--text-app-base: 0.875rem;
--text-app-lg: 0.9844rem;
--color-primary-50: var(--color-orange-50);
--color-primary-100: var(--color-orange-100);
--color-primary-200: var(--color-orange-200);
@@ -56,6 +63,14 @@
--color-logo-bookmark: #FF2126;
}
:root {
--font-size-root: 16px;
--app-text-xs: var(--text-app-xs);
--app-text-sm: var(--text-app-sm);
--app-text-base: var(--text-app-base);
--app-text-lg: var(--text-app-lg);
}
[data-app-theme] {
--color-surface-150: color-mix(in srgb, var(--color-surface-100) 70%, var(--color-surface-200));
--color-app: color-mix(in srgb, var(--color-surface-150), var(--color-primary-200) var(--app-primary-tint, 0%));
+1 -1
View File
@@ -21,7 +21,7 @@
background-clip: padding-box;
color: var(--app-text-field-color);
font: inherit;
font-size: var(--text-base);
font-size: var(--app-text-base);
line-height: 1.5;
transition:
background var(--transition-fast),
+5 -5
View File
@@ -51,13 +51,13 @@
flex-shrink: 0;
height: 1px;
min-height: 1px;
margin: 0.25rem 0;
margin: 0.2188rem 0;
background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}
.chart-info-icon {
color: var(--color-text-muted);
font-size: 0.9rem;
font-size: 0.7875rem;
cursor: help;
transition: color var(--transition-base);
@@ -96,17 +96,17 @@
.browser-grid-options {
display: flex;
gap: 0.5rem;
gap: 0.4375rem;
}
.browser-grid-option-btn {
flex: 1;
padding: 0.25rem 0.5rem;
padding: 0.2188rem 0.4375rem;
border: 1px solid var(--p-content-border-color);
border-radius: 6px;
background-color: var(--color-card);
color: var(--color-text);
font-size: 1rem;
font-size: var(--app-text-base);
font-weight: 600;
cursor: pointer;
transition: all 0.15s ease;