mirror of
https://github.com/jackyzha0/quartz
synced 2026-11-27 22:14:40 +01:00
fix(styles): the phone/tablet content column is minmax(0, 1fr), and header text wraps, so wide chrome can't widen the page
This commit is contained in:
3 files changed
+20
-6
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@jackyzha0/quartz": patch
|
||||
---
|
||||
|
||||
On phones and tablets, one too-wide item in the header row (a long page title, or an Obsidian theme's styled header) no longer widens the page past the screen. The content column is `minmax(0, 1fr)` instead of `auto` (also in the full-width and minimal frames), and text in the phone header row may break anywhere.
|
||||
+10
-4
@@ -264,6 +264,12 @@ a {
|
||||
flex-direction: row;
|
||||
padding: 0;
|
||||
padding-top: 2rem;
|
||||
// text in the header row (a long page title) may break anywhere, so the row fits the
|
||||
// screen; the buttons keep their size. Links set their own overflow-wrap.
|
||||
& > *,
|
||||
& > * a {
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,7 +361,7 @@ a {
|
||||
|
||||
// Full-width frame: no sidebars, center content spans full width
|
||||
.page[data-frame="full-width"] > #quartz-body {
|
||||
grid-template-columns: auto;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
grid-template-rows: auto auto auto;
|
||||
grid-template-areas:
|
||||
"grid-header"
|
||||
@@ -363,7 +369,7 @@ a {
|
||||
"grid-footer";
|
||||
|
||||
@media all and ($tablet) {
|
||||
grid-template-columns: auto;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
& .center.full-width {
|
||||
@@ -374,14 +380,14 @@ a {
|
||||
|
||||
// Minimal frame: no sidebars, no header/footer chrome, body content only + footer
|
||||
.page[data-frame="minimal"] > #quartz-body {
|
||||
grid-template-columns: auto;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
grid-template-rows: auto auto;
|
||||
grid-template-areas:
|
||||
"grid-center"
|
||||
"grid-footer";
|
||||
|
||||
@media all and ($tablet) {
|
||||
grid-template-columns: auto;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
& .center.minimal {
|
||||
|
||||
@@ -23,9 +23,12 @@ $boldWeight: 700;
|
||||
$semiBoldWeight: 600;
|
||||
$normalWeight: 400;
|
||||
|
||||
// The content column is minmax(0, 1fr), not auto: an auto track grows to its widest item's
|
||||
// min-content, so one wide element (a themed header row, a long unbreakable word) widened the
|
||||
// whole page past the screen instead of overflowing on its own.
|
||||
$mobileGrid: (
|
||||
templateRows: "auto auto auto auto auto",
|
||||
templateColumns: "auto",
|
||||
templateColumns: "minmax(0, 1fr)",
|
||||
rowGap: "5px",
|
||||
columnGap: "5px",
|
||||
templateAreas:
|
||||
@@ -37,7 +40,7 @@ $mobileGrid: (
|
||||
);
|
||||
$tabletGrid: (
|
||||
templateRows: "auto auto auto auto",
|
||||
templateColumns: "#{$sidePanelWidth} auto",
|
||||
templateColumns: "#{$sidePanelWidth} minmax(0, 1fr)",
|
||||
rowGap: "5px",
|
||||
columnGap: "5px",
|
||||
templateAreas:
|
||||
|
||||
Reference in new issue
Block a user