Skip to content

Commit

Permalink
Merge pull request #138 from qmd-lab/jimjam-slam/issue135-Increase-mo…
Browse files Browse the repository at this point in the history
…bile-breakpoint-for-sidebar-layouts

Issue 135: increase mobile breakpoint for sidebar layouts
  • Loading branch information
jimjam-slam authored Nov 22, 2024
2 parents f2ef21a + 8748669 commit 2af8d66
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 14 deletions.
39 changes: 30 additions & 9 deletions _extensions/closeread/closeread.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 34 additions & 4 deletions _extensions/closeread/closeread.scss
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@
}


/* mobile sizing (bootstrap: xs) is always overlay-center */
/* mobile sizing is always overlay-center */

// (switch to mobile sizing from overlay layouts at bootstrap xs)
@media (max-width: 575.98px) {
.cr-section.sidebar-left,
.cr-section.sidebar-right,
.cr-section.overlay-left,
.cr-section.overlay-right,
.cr-section.overlay-center {
Expand All @@ -159,6 +159,36 @@
z-index: 1;
margin-inline: auto;
background-color: transparent;
max-width: var(--cr-narrative-overlay-max-width);
min-width: var(--cr-narrative-overlay-min-width);

.narrative {
background-color: var(--cr-narrative-background-color-overlay);
color: var(--cr-narrative-text-color-overlay);
padding: 0.3em 0.5em;
border-radius: var(--cr-narrative-border-radius);
}
}

.sticky-col {
grid-column: 1;
}
}
}

// (sidebar layouts switch to overlay-center at a wider breakpoint: sm)
@media (max-width: 767.98px) {
.cr-section.sidebar-left,
.cr-section.sidebar-right {
grid-template-columns: 1fr;

.narrative-col {
grid-column: 1;
z-index: 1;
margin-inline: auto;
background-color: transparent;
max-width: var(--cr-narrative-overlay-max-width);
min-width: var(--cr-narrative-overlay-min-width);

.narrative {
background-color: var(--cr-narrative-background-color-overlay);
Expand All @@ -174,7 +204,7 @@
}
}

// layouts for wider-than-mobile sizing
/* desktop sizing */

// overlay layouts use one column...
.overlay-left,
Expand Down
2 changes: 1 addition & 1 deletion docs/gallery/examples/auden-poem/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ format:
narrative-text-color-sidebar: white
narrative-font-family: 'Georgia, "Times New Roman", Times, serif'
narrative-font-size: 1.25rem
narrative-sidebar-width: minmax(400px, 1fr)
narrative-sidebar-width: minmax(320px, 1fr)
narrative-border-radius: 5px
narrative-background-color-overlay: "#111111dd"
narrative-background-color-sidebar: "#111111"
Expand Down
1 change: 1 addition & 0 deletions docs/gallery/examples/minards-map/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ format:
narrative-background-color-overlay: transparent
narrative-background-color-sidebar: transparent
section-background-color: transparent
narrative-sidebar-width: minmax(320px, 1fr)
narrative-text-color-overlay: black
narrative-font-family: 'et-book, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif'
---
Expand Down

0 comments on commit 2af8d66

Please sign in to comment.