Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 135: increase mobile breakpoint for sidebar layouts #138

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading