feat(webui): add reading text size preferences (#6325)
* feat(webui): add reading text size preferences * fix(webui): align loading skeletons with reading typography
This commit is contained in:
1 parent
816c9221a0
commit
282839cc65
48 files changed
+662
-120
No files matched your search
+52
-4
@@ -59,6 +59,11 @@
|
||||
--radius-pill: 9999px;
|
||||
--corner-shape: superellipse(1.5);
|
||||
--content-column-width: 49.5rem;
|
||||
--reading-size-wide: 18px;
|
||||
--reading-size-narrow: 16px;
|
||||
--text-reading-size: var(--reading-size-wide);
|
||||
--text-code-size: calc(var(--text-reading-size) * 0.875);
|
||||
--text-code-dense-size: calc(var(--text-reading-size) * 0.75);
|
||||
--sidebar: 40 8% 96.8%;
|
||||
--sidebar-foreground: 0 0% 3.9%;
|
||||
--sidebar-content: 240 3% 30%;
|
||||
@@ -74,6 +79,22 @@
|
||||
--scrollbar-thumb-hover: hsl(var(--muted-foreground) / 0.42);
|
||||
}
|
||||
|
||||
:root[data-reading-text-size="small"] {
|
||||
--reading-size-wide: 16px;
|
||||
--reading-size-narrow: 15px;
|
||||
}
|
||||
|
||||
:root[data-reading-text-size="large"] {
|
||||
--reading-size-wide: 20px;
|
||||
--reading-size-narrow: 18px;
|
||||
}
|
||||
|
||||
@media (max-width: 639px) {
|
||||
:root {
|
||||
--text-reading-size: var(--reading-size-narrow);
|
||||
}
|
||||
}
|
||||
|
||||
.dark {
|
||||
color-scheme: dark;
|
||||
--background: 0 0% 19%;
|
||||
@@ -392,7 +413,35 @@
|
||||
--tw-prose-headings: hsl(var(--foreground));
|
||||
--tw-prose-bold: hsl(var(--foreground));
|
||||
--tw-prose-lead: hsl(var(--foreground));
|
||||
line-height: var(--cjk-line-height);
|
||||
@apply text-reading;
|
||||
}
|
||||
|
||||
.markdown-content :is(h1, h2, h3, h4, h5, h6) {
|
||||
font-weight: 600;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.markdown-content h1 { font-size: 1.5em; }
|
||||
.markdown-content h2 { font-size: 1.25em; }
|
||||
.markdown-content h3 { font-size: 1.125em; }
|
||||
.markdown-content :is(h4, h5, h6) { font-size: 1em; }
|
||||
.markdown-content strong { font-weight: 600; }
|
||||
.markdown-content :is(th, td) {
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
.markdown-content blockquote {
|
||||
font-size: 1em;
|
||||
line-height: inherit;
|
||||
}
|
||||
.markdown-content summary {
|
||||
font-size: 1em;
|
||||
font-weight: 600;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.markdown-inline-code {
|
||||
font-size: 0.875em;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.markdown-content .contains-task-list {
|
||||
@@ -948,12 +997,11 @@
|
||||
}
|
||||
|
||||
[data-user-text-bubble] > .message-block-menu-trigger {
|
||||
/* The first text line is 28px tall, with py-2 around the bubble. */
|
||||
top: calc((1rem + 28px - var(--message-block-control-size)) / 2);
|
||||
top: calc((1rem + var(--text-reading-size) * var(--cjk-line-height) - var(--message-block-control-size)) / 2);
|
||||
}
|
||||
|
||||
[data-user-text-bubble] > .message-block-hover-time {
|
||||
top: calc((1rem + 28px + var(--message-block-control-size)) / 2);
|
||||
top: calc((1rem + var(--text-reading-size) * var(--cjk-line-height) + var(--message-block-control-size)) / 2);
|
||||
}
|
||||
|
||||
[data-context-block-active] .message-block-menu-trigger,
|
||||
|
||||
Reference in new issue
Block a user