-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 🐛 Alignments settings and body padding on small screens. Fixes #110
- Loading branch information
Showing
8 changed files
with
81 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
/*-------------------------------------------------------------- | ||
# - Alignments | ||
--------------------------------------------------------------*/ | ||
.alignleft, | ||
.alignright, | ||
.aligncenter { | ||
display: block; | ||
} | ||
|
||
.alignleft { | ||
clear: left; | ||
} | ||
|
||
.alignright { | ||
clear: right; | ||
} | ||
|
||
.aligncenter { | ||
clear: both; | ||
margin-right: auto; | ||
margin-left: auto; | ||
display: table; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,87 @@ | ||
// | ||
// Layout | ||
//=============================== | ||
|
||
// Set so the these elements fill | ||
// the vertical space in the window | ||
html, body { | ||
height: 100% | ||
} | ||
.site-content { | ||
flex: 1 0 auto; | ||
} | ||
footer { | ||
flex-shrink: 0;} | ||
|
||
// ## Base Wrap | ||
// | ||
// This wraps all of the content for a page | ||
// | ||
.wp-site-blocks { | ||
height: 100%; | ||
display: flex; | ||
flex-direction: column | ||
flex-direction: column; | ||
} | ||
|
||
// ### Wide and Full Widths | ||
@media screen and (min-width: 782px) { | ||
// | ||
// <main> element: the main content region | ||
// | ||
// We set flex-grow to true so the footer | ||
// is always pushed to the bottom of the window | ||
// | ||
.content-region { | ||
flex: 1 0 auto; | ||
} | ||
|
||
|
||
// | ||
// Utility class | ||
// This sets a padding on layout elements | ||
// when the window width < 74rem | ||
// | ||
.ucsc-layout-row { | ||
max-width: 72rem; | ||
margin: 0 auto; | ||
padding: 0 1rem; | ||
} | ||
|
||
// | ||
// Fixed width content window | ||
// These rules set a fixed width of 72rem | ||
// in the editor and live page window | ||
// while still allowing full-width elements | ||
// with the .alignfull class | ||
// | ||
.is-root-container { | ||
max-width: 72rem; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
|
||
.is-root-container, | ||
.content-region { | ||
padding-left: var(--wp--custom--spacing--baseline); | ||
padding-right: var(--wp--custom--spacing--baseline); | ||
} | ||
|
||
.wp-block-post-content > .alignfull, | ||
.block-editor-block-list__layout.is-root-container>.alignfull { | ||
margin-left: calc(-1 * var(--wp--custom--spacing--baseline)) !important; | ||
margin-right: calc(-1 * var(--wp--custom--spacing--baseline)) !important; | ||
width: calc( 100% + var(--wp--custom--spacing--baseline) + var(--wp--custom--spacing--baseline) ) !important; | ||
} | ||
|
||
@media screen and (min-width: 74rem) { | ||
|
||
.ucsc-layout-row { | ||
padding: 0; | ||
} | ||
|
||
.wp-block-post-content > .alignwide, | ||
.block-editor-block-list__layout.is-root-container > .wp-block[data-align=wide] { | ||
width: calc(45 * var(--wp--custom--spacing--baseline)); | ||
max-width: calc(45 * var(--wp--custom--spacing--baseline)); | ||
margin-right: auto; | ||
margin-left: calc(50% - calc(22.5 * var(--wp--custom--spacing--baseline))) | ||
.is-root-container, | ||
.content-region { | ||
padding-left: 0; | ||
padding-right: 0; | ||
} | ||
|
||
.wp-block-post-content > .alignfull, | ||
.block-editor-block-list__layout.is-root-container > .wp-block[data-align=full] { | ||
width: 100vw; | ||
max-width: 100vw; | ||
max-width: 2020px; | ||
margin-left: calc(50% - 50vw); | ||
margin-right: auto; | ||
.block-editor-block-list__layout.is-root-container > .alignfull { | ||
width: 100vw !important; | ||
max-width: 100vw !important; | ||
margin-left: calc(50% - 50vw) !important; | ||
margin-right: auto !important; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,6 @@ | |
|
||
clear: both; | ||
margin-top: 3rem; | ||
flex-shrink: 0; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters