From 386e2939403711cf2d78b99b2be4e9bbea304bbb Mon Sep 17 00:00:00 2001 From: WP Git Updater Bot Date: Thu, 1 Apr 2021 13:39:57 +0000 Subject: [PATCH] chore(themes): Update twentytwentyone from 1.1 to 1.2 --- .../twentytwentyone/assets/css/ie-editor.css | 785 +- themes/twentytwentyone/assets/css/ie.css | 1105 +- .../assets/css/style-dark-mode-rtl.css | 7 - .../assets/css/style-dark-mode.css | 223 +- .../assets/css/style-editor.css | 578 +- .../assets/js/customize-helpers.js | 70 +- .../assets/js/customize-preview.js | 124 +- .../assets/js/dark-mode-toggler.js | 13 +- themes/twentytwentyone/assets/js/editor.js | 76 +- .../assets/js/palette-colorpicker.js | 106 +- themes/twentytwentyone/assets/js/polyfills.js | 84 +- .../assets/js/primary-navigation.js | 368 +- .../assets/js/skip-link-focus-fix.js | 66 +- .../assets/sass/01-settings/file-header.scss | 36 +- .../assets/sass/01-settings/fonts.scss | 2 +- .../assets/sass/01-settings/global.scss | 498 +- .../assets/sass/02-tools/functions.scss | 356 +- .../assets/sass/02-tools/mixins.scss | 173 +- .../assets/sass/03-generic/breakpoints.scss | 434 +- .../assets/sass/03-generic/clearings.scss | 50 +- .../assets/sass/03-generic/normalize.scss | 700 +- .../assets/sass/03-generic/reset.scss | 150 +- .../sass/03-generic/vertical-margins.scss | 344 +- .../assets/sass/04-elements/blockquote.scss | 162 +- .../assets/sass/04-elements/forms-editor.scss | 24 +- .../assets/sass/04-elements/forms.scss | 658 +- .../assets/sass/04-elements/links.scss | 145 +- .../assets/sass/04-elements/media.scss | 92 +- .../assets/sass/04-elements/misc.scss | 34 +- .../assets/sass/05-blocks/_config.scss | 14 +- .../assets/sass/05-blocks/audio/_style.scss | 14 +- .../assets/sass/05-blocks/blocks-editor.scss | 70 +- .../assets/sass/05-blocks/blocks.scss | 74 +- .../assets/sass/05-blocks/button/_editor.scss | 259 +- .../assets/sass/05-blocks/button/_style.scss | 256 +- .../assets/sass/05-blocks/code/_editor.scss | 27 +- .../assets/sass/05-blocks/code/_style.scss | 29 +- .../sass/05-blocks/columns/_editor.scss | 136 +- .../assets/sass/05-blocks/columns/_style.scss | 210 +- .../assets/sass/05-blocks/cover/_editor.scss | 149 +- .../assets/sass/05-blocks/cover/_style.scss | 227 +- .../assets/sass/05-blocks/file/_editor.scss | 49 +- .../assets/sass/05-blocks/file/_style.scss | 37 +- .../sass/05-blocks/gallery/_editor.scss | 20 +- .../assets/sass/05-blocks/gallery/_style.scss | 66 +- .../assets/sass/05-blocks/group/_editor.scss | 90 +- .../assets/sass/05-blocks/group/_style.scss | 140 +- .../sass/05-blocks/heading/_editor.scss | 162 +- .../assets/sass/05-blocks/heading/_style.scss | 130 +- .../assets/sass/05-blocks/html/_editor.scss | 12 +- .../assets/sass/05-blocks/image/_editor.scss | 40 +- .../assets/sass/05-blocks/image/_style.scss | 132 +- .../05-blocks/latest-comments/_editor.scss | 6 +- .../05-blocks/latest-comments/_style.scss | 70 +- .../sass/05-blocks/latest-posts/_editor.scss | 288 +- .../sass/05-blocks/latest-posts/_style.scss | 338 +- .../assets/sass/05-blocks/legacy/_editor.scss | 84 +- .../assets/sass/05-blocks/legacy/_style.scss | 110 +- .../assets/sass/05-blocks/list/_editor.scss | 64 +- .../assets/sass/05-blocks/list/_style.scss | 78 +- .../sass/05-blocks/media-text/_editor.scss | 36 +- .../sass/05-blocks/media-text/_style.scss | 106 +- .../sass/05-blocks/navigation/_editor.scss | 90 +- .../sass/05-blocks/navigation/_style.scss | 256 +- .../sass/05-blocks/paragraph/_editor.scss | 14 +- .../sass/05-blocks/paragraph/_style.scss | 28 +- .../sass/05-blocks/preformatted/_editor.scss | 12 +- .../sass/05-blocks/preformatted/_style.scss | 8 +- .../sass/05-blocks/pullquote/_editor.scss | 212 +- .../sass/05-blocks/pullquote/_style.scss | 220 +- .../assets/sass/05-blocks/quote/_editor.scss | 300 +- .../assets/sass/05-blocks/quote/_style.scss | 276 +- .../assets/sass/05-blocks/rss/_editor.scss | 218 +- .../assets/sass/05-blocks/rss/_style.scss | 218 +- .../assets/sass/05-blocks/search/_editor.scss | 297 +- .../assets/sass/05-blocks/search/_style.scss | 290 +- .../sass/05-blocks/separator/_editor.scss | 96 +- .../sass/05-blocks/separator/_style.scss | 120 +- .../sass/05-blocks/social-icons/_editor.scss | 40 +- .../sass/05-blocks/social-icons/_style.scss | 37 +- .../assets/sass/05-blocks/spacer/_style.scss | 26 +- .../assets/sass/05-blocks/table/_editor.scss | 178 +- .../assets/sass/05-blocks/table/_style.scss | 198 +- .../sass/05-blocks/tag-clould/_editor.scss | 12 +- .../sass/05-blocks/tag-clould/_style.scss | 14 +- .../sass/05-blocks/utilities/_editor.scss | 280 +- .../sass/05-blocks/utilities/_font-sizes.scss | 106 +- .../sass/05-blocks/utilities/_style.scss | 320 +- .../assets/sass/05-blocks/verse/_editor.scss | 8 +- .../assets/sass/05-blocks/verse/_style.scss | 6 +- .../assets/sass/05-blocks/video/_style.scss | 32 +- .../assets/sass/06-components/404.scss | 8 +- .../assets/sass/06-components/archives.scss | 136 +- .../assets/sass/06-components/comments.scss | 584 +- .../assets/sass/06-components/editor.scss | 88 +- .../assets/sass/06-components/entry.scss | 420 +- .../sass/06-components/footer-navigation.scss | 146 +- .../assets/sass/06-components/footer.scss | 148 +- .../assets/sass/06-components/header.scss | 416 +- .../assets/sass/06-components/navigation.scss | 1063 +- .../assets/sass/06-components/pagination.scss | 486 +- .../sass/06-components/posts-and-pages.scss | 48 +- .../assets/sass/06-components/search.scss | 6 +- .../assets/sass/06-components/single.scss | 34 +- .../assets/sass/06-components/widgets.scss | 259 +- .../assets/sass/07-utilities/a11y.scss | 96 +- .../sass/07-utilities/color-palette.scss | 425 +- .../assets/sass/07-utilities/ie.scss | 106 +- .../assets/sass/07-utilities/measure.scss | 44 +- .../assets/sass/07-utilities/print.scss | 368 +- .../assets/sass/style-dark-mode.scss | 209 +- .../assets/sass/style-editor.scss | 42 +- themes/twentytwentyone/assets/sass/style.scss | 244 +- .../class-twenty-twenty-one-dark-mode.php | 824 +- themes/twentytwentyone/comments.php | 2 +- themes/twentytwentyone/image.php | 4 +- themes/twentytwentyone/inc/block-patterns.php | 4 +- .../twentytwentyone/inc/starter-content.php | 4 +- .../inc/template-functions.php | 4 + themes/twentytwentyone/inc/template-tags.php | 20 +- themes/twentytwentyone/package-lock.json | 9190 +++++++++-------- themes/twentytwentyone/package.json | 135 +- themes/twentytwentyone/postcss.config.js | 25 +- themes/twentytwentyone/readme.txt | 213 +- themes/twentytwentyone/search.php | 4 +- themes/twentytwentyone/single.php | 2 +- themes/twentytwentyone/style-rtl.css | 645 +- themes/twentytwentyone/style.css | 645 +- .../template-parts/content/content-none.php | 6 +- .../template-parts/content/content-page.php | 6 +- .../template-parts/content/content-single.php | 4 +- .../template-parts/content/content.php | 2 +- .../template-parts/header/site-branding.php | 2 +- .../template-parts/header/site-header.php | 2 +- .../template-parts/header/site-nav.php | 72 +- .../template-parts/post/author-bio.php | 19 +- 136 files changed, 16260 insertions(+), 15848 deletions(-) diff --git a/themes/twentytwentyone/assets/css/ie-editor.css b/themes/twentytwentyone/assets/css/ie-editor.css index 64d1e1b6..968c53af 100644 --- a/themes/twentytwentyone/assets/css/ie-editor.css +++ b/themes/twentytwentyone/assets/css/ie-editor.css @@ -149,15 +149,11 @@ blockquote p { blockquote cite { font-weight: normal; - color: #28303d; - font-size: 1rem; letter-spacing: normal; } blockquote footer { font-weight: normal; - color: #28303d; - font-size: 1rem; letter-spacing: normal; } @@ -239,9 +235,9 @@ blockquote footer { } img { - display: block; height: auto; max-width: 100%; + vertical-align: middle; } /* Classic editor images */ @@ -355,11 +351,13 @@ a:hover { } .is-dark-theme .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) { - color: #d1e4dd; + background: #000; + color: #fff; + text-decoration: none; } .is-dark-theme .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) .meta-nav { - color: #d1e4dd; + color: #fff; } .has-background-white .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) { @@ -383,44 +381,56 @@ a:hover { background-color: #f1f1f1; } -.site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) img { - outline: 2px dotted #28303d; -} - -.has-background .has-link-color a { - color: #28303d; +.site a:focus:not(.wp-block-button__link):not(.wp-block-file__button).custom-logo-link { + background: none; } -.has-background.has-link-color a { - color: #28303d; +.site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) img { + outline: 2px dotted #28303d; } .wp-block-button__link { - line-height: 1.5; - color: #d1e4dd; + border: 3px solid transparent; + border-radius: 0; cursor: pointer; font-weight: 500; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 1.25rem; - background-color: #39414d; - border-radius: 0; - border: 3px solid #39414d; - text-decoration: none; + line-height: 1.5; padding: 15px 30px; + text-decoration: none; } -.wp-block-button__link:focus { - background: transparent; - outline-offset: -6px; - outline: 2px dotted currentColor; +.wp-block-button__link:not(:hover):not(:active):not(.has-text-color) { + color: #d1e4dd; } -.is-dark-theme .wp-block-button__link:focus { - color: #39414d; +.has-background .wp-block-button__link:not(:hover):not(:active):not(.has-text-color) { + color: #28303d; } -.wp-block-button__link:focus:not(.has-background) { - color: #39414d; +.has-background .wp-block-button__link:not(:hover):not(:active):not(.has-text-color).has-background { + color: #28303d; +} + +.wp-block-button__link:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; +} + +.has-background .wp-block-button__link:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; +} + +.wp-block-button__link:hover, +.wp-block-button__link:active { + background-color: transparent; + border-color: currentColor; + color: inherit; +} + +.wp-block-button__link:focus { + outline-offset: -6px; + outline: 2px dotted currentColor; } .wp-block-button__link:disabled { @@ -445,105 +455,93 @@ a:hover { margin-bottom: 30px; } -.wp-block-button:not(.is-style-outline) .wp-block-button__link:active { - color: #39414d !important; - background: transparent !important; - border-color: #39414d; -} - -.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { - color: #39414d !important; - background: transparent !important; - border-color: #39414d; -} - -.wp-block-button.is-style-outline .wp-block-button__link { - color: #39414d; - background: transparent; - border: 3px solid currentColor; - padding: 15px 30px; -} - -.wp-block-button.is-style-outline .wp-block-button__link:active { - background-color: #39414d; +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(:hover):not(:active):not(.has-text-color) { color: #d1e4dd; - border-color: #39414d; } -.wp-block-button.is-style-outline .wp-block-button__link:hover { - background-color: #39414d; +.has-background .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(:hover):not(:active):not(.has-text-color) { color: #d1e4dd; - border-color: #39414d; } -.wp-block-button.is-style-outline .wp-block-button__link.has-background { - border-color: #39414d; -} - -.wp-block-button.is-style-outline .wp-block-button__link.has-background:active { - background-color: #39414d !important; +.has-background .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(:hover):not(:active):not(.has-text-color).has-background { + color: #28303d; } -.wp-block-button.is-style-outline .wp-block-button__link.has-background:hover { - background-color: #39414d !important; +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; } -.wp-block-button.is-style-outline .wp-block-button__link.has-background:not(.has-text-color) { - color: #28303d; +.has-background .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; } -.wp-block-button.is-style-outline .wp-block-button__link.has-background.has-gray-background-color:not(.has-text-color) { - color: #fff; +.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover, +.wp-block-button:not(.is-style-outline) .wp-block-button__link:active { + border-color: currentColor !important; + background-color: transparent !important; + color: inherit !important; } -.wp-block-button.is-style-outline .wp-block-button__link.has-background.has-dark-gray-background-color:not(.has-text-color) { - color: #fff; +.wp-block-button:not(.is-style-outline) .wp-block-button__link:focus { + outline-offset: inherit; + outline: inherit; } -.wp-block-button.is-style-outline .wp-block-button__link.has-background.has-black-background-color:not(.has-text-color) { - color: #fff; +.wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active):not(.has-text-color), +.wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active):not(.has-background), +.wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active).has-background { + border-color: currentColor; } -.is-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-background.has-white-background-color { +.wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active):not(.has-text-color) { color: #28303d; } -.is-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-background.has-green-background-color { +.has-background .wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active):not(.has-text-color) { color: #28303d; } -.is-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-background.has-blue-background-color { - color: #28303d; +.has-background .wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active).has-background:not(.has-text-color) { + color: inherit; } -.is-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-background.has-purple-background-color { - color: #28303d; +.wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active):not(.has-background) { + background-color: transparent; } -.is-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-background.has-red-background-color { - color: #28303d; +.wp-block-button.is-style-outline .wp-block-button__link:hover { + background-color: #28303d !important; + border-color: transparent !important; + color: #d1e4dd !important; } -.is-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-background.has-orange-background-color { - color: #28303d; +.wp-block-button.is-style-outline .wp-block-button__link:active { + background-color: #28303d !important; + border-color: transparent !important; + color: #d1e4dd !important; } -.is-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-background.has-yellow-background-color { - color: #28303d; +.has-background .wp-block-button.is-style-outline .wp-block-button__link:hover { + background-color: #28303d !important; + color: #d1e4dd !important; } -.wp-block-button.is-style-outline .wp-block-button__link.has-text-color { - border-color: currentColor; +.has-background .wp-block-button.is-style-outline .wp-block-button__link:active { + background-color: #28303d !important; + color: #d1e4dd !important; } -.wp-block-button.is-style-outline .wp-block-button__link.has-text-color:active { +.has-text-color .wp-block-button.is-style-outline .wp-block-button__link:hover { color: #d1e4dd !important; - border-color: #39414d; } -.wp-block-button.is-style-outline .wp-block-button__link.has-text-color:hover { +.has-text-color .wp-block-button.is-style-outline .wp-block-button__link:active { color: #d1e4dd !important; - border-color: #39414d; +} + +.wp-block-button.is-style-outline .wp-block-button__link:focus { + outline-offset: inherit; + outline: inherit; } .wp-block-button.is-style-squared { @@ -556,7 +554,6 @@ a:hover { } .wp-block-code code { - font-size: 1rem; white-space: pre !important; overflow-x: auto; } @@ -712,12 +709,6 @@ a:hover { font-size: 3rem; } } -@media only screen and (min-width: 652px) { - - .wp-block-cover h2 { - font-size: 3rem; - } -} .wp-block-cover-image h2 { font-size: 2.25rem; @@ -733,12 +724,6 @@ a:hover { font-size: 3rem; } } -@media only screen and (min-width: 652px) { - - .wp-block-cover-image h2 { - font-size: 3rem; - } -} .wp-block-cover h2.has-text-align-left, .wp-block-cover-image h2.has-text-align-left { @@ -763,6 +748,11 @@ a:hover { border: 3px solid #28303d; } +.wp-block-cover[class*=-background-color][class] .wp-block-cover__inner-container, +.wp-block-cover-image[class*=-background-color][class] .wp-block-cover__inner-container { + background-color: unset; +} + .wp-block-columns:not(.alignwide):not(.alignfull) { clear: both; } @@ -902,32 +892,48 @@ a:hover { } .wp-block-file .wp-block-file__button { - line-height: 1.5; - color: #d1e4dd; + border: 3px solid transparent; + border-radius: 0; cursor: pointer; font-weight: 500; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 1.25rem; - background-color: #39414d; - border-radius: 0; - border: 3px solid #39414d; - text-decoration: none; + line-height: 1.5; padding: 15px 30px; + text-decoration: none; display: inline-block; } -.wp-block-file .wp-block-file__button:focus { - background: transparent; - outline-offset: -6px; - outline: 2px dotted currentColor; +.wp-block-file .wp-block-file__button:not(:hover):not(:active):not(.has-text-color) { + color: #d1e4dd; } -.is-dark-theme .wp-block-file .wp-block-file__button:focus { - color: #39414d; +.has-background .wp-block-file .wp-block-file__button:not(:hover):not(:active):not(.has-text-color) { + color: #28303d; } -.wp-block-file .wp-block-file__button:focus:not(.has-background) { - color: #39414d; +.has-background .wp-block-file .wp-block-file__button:not(:hover):not(:active):not(.has-text-color).has-background { + color: #28303d; +} + +.wp-block-file .wp-block-file__button:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; +} + +.has-background .wp-block-file .wp-block-file__button:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; +} + +.wp-block-file .wp-block-file__button:hover, +.wp-block-file .wp-block-file__button:active { + background-color: transparent; + border-color: currentColor; + color: inherit; +} + +.wp-block-file .wp-block-file__button:focus { + outline-offset: -6px; + outline: 2px dotted currentColor; } .wp-block-file .wp-block-file__button:disabled { @@ -936,9 +942,9 @@ a:hover { color: #39414d; } -.wp-block-file .wp-block-file__button:hover { - color: #39414d; - background: transparent; +.wp-block-file .wp-block-file__button:focus { + outline-offset: inherit; + outline: inherit; } .wp-block-gallery figcaption { @@ -1181,75 +1187,75 @@ h6 strong { } .wp-block-heading h1[style*="--wp--typography--line-height"] { - line-height: --global--line-height-body; + line-height: 1.7; } h1[style*="--wp--typography--line-height"] { - line-height: --global--line-height-body; + line-height: 1.7; } .h1[style*="--wp--typography--line-height"] { - line-height: --global--line-height-body; + line-height: 1.7; } .wp-block-heading h2[style*="--wp--typography--line-height"] { - line-height: --global--line-height-body; + line-height: 1.7; } h2[style*="--wp--typography--line-height"] { - line-height: --global--line-height-body; + line-height: 1.7; } .h2[style*="--wp--typography--line-height"] { - line-height: --global--line-height-body; + line-height: 1.7; } .wp-block-heading h3[style*="--wp--typography--line-height"] { - line-height: --global--line-height-body; + line-height: 1.7; } h3[style*="--wp--typography--line-height"] { - line-height: --global--line-height-body; + line-height: 1.7; } .h3[style*="--wp--typography--line-height"] { - line-height: --global--line-height-body; + line-height: 1.7; } .wp-block-heading h4[style*="--wp--typography--line-height"] { - line-height: --global--line-height-body; + line-height: 1.7; } h4[style*="--wp--typography--line-height"] { - line-height: --global--line-height-body; + line-height: 1.7; } .h4[style*="--wp--typography--line-height"] { - line-height: --global--line-height-body; + line-height: 1.7; } .wp-block-heading h5[style*="--wp--typography--line-height"] { - line-height: --global--line-height-body; + line-height: 1.7; } h5[style*="--wp--typography--line-height"] { - line-height: --global--line-height-body; + line-height: 1.7; } .h5[style*="--wp--typography--line-height"] { - line-height: --global--line-height-body; + line-height: 1.7; } .wp-block-heading h6[style*="--wp--typography--line-height"] { - line-height: --global--line-height-body; + line-height: 1.7; } h6[style*="--wp--typography--line-height"] { - line-height: --global--line-height-body; + line-height: 1.7; } .h6[style*="--wp--typography--line-height"] { - line-height: --global--line-height-body; + line-height: 1.7; } .wp-block-heading h1 { @@ -1304,13 +1310,6 @@ h1 { } } -@media only screen and (min-width: 652px) { - - .wp-block-heading h2 { - font-size: 3rem; - } -} - h2 { font-size: 2.25rem; letter-spacing: normal; @@ -1324,13 +1323,6 @@ h2 { } } -@media only screen and (min-width: 652px) { - - h2 { - font-size: 3rem; - } -} - .h2 { font-size: 2.25rem; letter-spacing: normal; @@ -1344,13 +1336,6 @@ h2 { } } -@media only screen and (min-width: 652px) { - - .h2 { - font-size: 3rem; - } -} - .wp-block-heading h3 { font-size: 2rem; letter-spacing: normal; @@ -1788,7 +1773,7 @@ dt { } p { - line-height: --global--line-height-body; + line-height: 1.7; } p.has-background { @@ -2290,7 +2275,7 @@ pre.wp-block-preformatted { margin-bottom: 10px; } -.wp-block-search .wp-block-search__input { +.wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper { border: 3px solid #39414d; border-radius: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; @@ -2301,361 +2286,156 @@ pre.wp-block-preformatted { padding: 10px; } -.is-dark-theme .wp-block-search .wp-block-search__input { - background: rgba(255, 255, 255, 0.9); -} - -.is-dark-theme .has-background.has-white-background-color .wp-block-search .wp-block-search__input { - border-color: #28303d; -} - -.is-dark-theme .has-background.has-green-background-color .wp-block-search .wp-block-search__input { - border-color: #28303d; -} - -.is-dark-theme .has-background.has-blue-background-color .wp-block-search .wp-block-search__input { - border-color: #28303d; -} - -.is-dark-theme .has-background.has-purple-background-color .wp-block-search .wp-block-search__input { - border-color: #28303d; -} - -.is-dark-theme .has-background.has-red-background-color .wp-block-search .wp-block-search__input { - border-color: #28303d; -} - -.is-dark-theme .has-background.has-orange-background-color .wp-block-search .wp-block-search__input { - border-color: #28303d; +.wp-block-search .wp-block-search__input { + border: 3px solid #39414d; + border-radius: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + font-size: 1.125rem; + line-height: 1.7; + max-width: inherit; + margin-right: -3px; + padding: 10px; } -.is-dark-theme .has-background.has-yellow-background-color .wp-block-search .wp-block-search__input { - border-color: #28303d; +.is-dark-theme .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper { + background: rgba(255, 255, 255, 0.9); } -.has-background.has-gray-background-color .wp-block-search .wp-block-search__input { - border-color: #fff; +.is-dark-theme .wp-block-search .wp-block-search__input { + background: rgba(255, 255, 255, 0.9); } -.has-background.has-dark-gray-background-color .wp-block-search .wp-block-search__input { - border-color: #fff; +.has-background .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper { + border-color: #28303d !important; } -.has-background.has-black-background-color .wp-block-search .wp-block-search__input { - border-color: #fff; +.has-background .wp-block-search .wp-block-search__input { + border-color: #28303d !important; } -.wp-block-search .wp-block-search__button { - line-height: 1.5; - color: #d1e4dd; +.wp-block-search .wp-block-search__button.wp-block-search__button { + border: 3px solid transparent; + border-radius: 0; cursor: pointer; font-weight: 500; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 1.25rem; - background-color: #39414d; - border-radius: 0; - border: 3px solid #39414d; - text-decoration: none; + line-height: 1.5; padding: 15px 30px; + text-decoration: none; box-shadow: none; margin-left: 0; - background-color: transparent; - color: #39414d; -} - -.wp-block-search .wp-block-search__button:focus { - background: transparent; - outline-offset: -6px; - outline: 2px dotted currentColor; } -.is-dark-theme .wp-block-search .wp-block-search__button:focus { - color: #39414d; -} - -.wp-block-search .wp-block-search__button:focus:not(.has-background) { - color: #39414d; -} - -.wp-block-search .wp-block-search__button:disabled { - background-color: rgba(255, 255, 255, 0.5); - border-color: rgba(255, 255, 255, 0.5); - color: #39414d; -} - -.wp-block-search .wp-block-search__button:hover { +.wp-block-search .wp-block-search__button.wp-block-search__button:not(:hover):not(:active):not(.has-text-color) { color: #d1e4dd; - background-color: #39414d; } -.wp-block-search .wp-block-search__button.has-icon { - padding: 30px 15px; +.has-background .wp-block-search .wp-block-search__button.wp-block-search__button:not(:hover):not(:active):not(.has-text-color) { + color: #28303d; } -.wp-block-search .wp-block-search__button.has-icon svg { - width: 40px; - height: 40px; +.has-background .wp-block-search .wp-block-search__button.wp-block-search__button:not(:hover):not(:active):not(.has-text-color).has-background { + color: #28303d; } -.has-background.has-gray-background-color .wp-block-search .wp-block-search__button { - color: #fff; - border-color: currentColor; +.wp-block-search .wp-block-search__button.wp-block-search__button:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; } -.has-background.has-dark-gray-background-color .wp-block-search .wp-block-search__button { - color: #fff; - border-color: currentColor; +.has-background .wp-block-search .wp-block-search__button.wp-block-search__button:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; } -.has-background.has-black-background-color .wp-block-search .wp-block-search__button { - color: #fff; +.wp-block-search .wp-block-search__button.wp-block-search__button:hover, +.wp-block-search .wp-block-search__button.wp-block-search__button:active { + background-color: transparent; border-color: currentColor; + color: inherit; } -.has-background.has-gray-background-color .wp-block-search .wp-block-search__button:hover { - color: #fff; - background-color: #39414d; - border-color: #fff; -} - -.has-background.has-dark-gray-background-color .wp-block-search .wp-block-search__button:hover { - color: #fff; - background-color: #39414d; - border-color: #fff; -} - -.has-background.has-black-background-color .wp-block-search .wp-block-search__button:hover { - color: #fff; - background-color: #39414d; - border-color: #fff; -} - -.is-dark-theme .has-background.has-gray-background-color .wp-block-search .wp-block-search__button:hover { - color: #d1e4dd; - background-color: #39414d; -} - -.is-dark-theme .has-background.has-dark-gray-background-color .wp-block-search .wp-block-search__button:hover { - color: #d1e4dd; - background-color: #39414d; -} - -.is-dark-theme .has-background.has-black-background-color .wp-block-search .wp-block-search__button:hover { - color: #d1e4dd; - background-color: #39414d; +.wp-block-search .wp-block-search__button.wp-block-search__button:focus { + outline-offset: -6px; + outline: 2px dotted currentColor; } -.has-background.has-white-background-color .wp-block-search .wp-block-search__button:hover { - color: #fff; - background-color: #39414d; - border-color: #39414d; +.wp-block-search .wp-block-search__button.wp-block-search__button:disabled { + background-color: rgba(255, 255, 255, 0.5); + border-color: rgba(255, 255, 255, 0.5); + color: #39414d; } -.has-background.has-green-background-color .wp-block-search .wp-block-search__button:hover { - color: #fff; - background-color: #39414d; - border-color: #39414d; +.wp-block-search .wp-block-search__button.wp-block-search__button.has-icon { + padding: 6px 15px; + display: inherit; } -.has-background.has-blue-background-color .wp-block-search .wp-block-search__button:hover { - color: #fff; - background-color: #39414d; - border-color: #39414d; +.wp-block-search .wp-block-search__button.wp-block-search__button.has-icon svg { + width: 40px; + height: 40px; } -.has-background.has-purple-background-color .wp-block-search .wp-block-search__button:hover { - color: #fff; - background-color: #39414d; - border-color: #39414d; +.has-background .wp-block-search .wp-block-search__button.wp-block-search__button:hover { + background-color: #d1e4dd !important; + color: #28303d !important; } -.has-background.has-red-background-color .wp-block-search .wp-block-search__button:hover { - color: #fff; - background-color: #39414d; - border-color: #39414d; +.has-background .wp-block-search .wp-block-search__button.wp-block-search__button:active { + background-color: #d1e4dd !important; + color: #28303d !important; } -.has-background.has-orange-background-color .wp-block-search .wp-block-search__button:hover { - color: #fff; - background-color: #39414d; - border-color: #39414d; +.has-text-color .wp-block-search .wp-block-search__button.wp-block-search__button:hover { + color: #28303d !important; } -.has-background.has-yellow-background-color .wp-block-search .wp-block-search__button:hover { - color: #fff; - background-color: #39414d; - border-color: #39414d; +.has-text-color .wp-block-search .wp-block-search__button.wp-block-search__button:active { + color: #28303d !important; } -.is-dark-theme .has-background.has-white-background-color .wp-block-search .wp-block-search__button { - color: #28303d; - border-color: currentColor; +.wp-block-search .wp-block-search__button.wp-block-search__button:focus { + outline-offset: inherit; + outline: inherit; } -.is-dark-theme .has-background.has-green-background-color .wp-block-search .wp-block-search__button { - color: #28303d; - border-color: currentColor; +.wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper { + padding: 3px; } -.is-dark-theme .has-background.has-blue-background-color .wp-block-search .wp-block-search__button { - color: #28303d; - border-color: currentColor; +.wp-block-search.wp-block-search__button-inside .wp-block-search__input { + border: none; } -.is-dark-theme .has-background.has-purple-background-color .wp-block-search .wp-block-search__button { +.wp-block-search.wp-block-search__button-inside.wp-block-search__text-button .wp-block-search__button:hover { color: #28303d; - border-color: currentColor; } -.is-dark-theme .has-background.has-red-background-color .wp-block-search .wp-block-search__button { +.wp-block-search.wp-block-search__button-inside.wp-block-search__icon-button .wp-block-search__button:hover { color: #28303d; - border-color: currentColor; } -.is-dark-theme .has-background.has-orange-background-color .wp-block-search .wp-block-search__button { +.is-dark-theme .wp-block-search.wp-block-search__button-inside.wp-block-search__text-button .wp-block-search__button { color: #28303d; - border-color: currentColor; } -.is-dark-theme .has-background.has-yellow-background-color .wp-block-search .wp-block-search__button { +.is-dark-theme .wp-block-search.wp-block-search__button-inside.wp-block-search__icon-button .wp-block-search__button { color: #28303d; - border-color: currentColor; -} - -.is-dark-theme .has-background.has-white-background-color .wp-block-search .wp-block-search__button:hover { - color: #fff; - background-color: #d1e4dd; - border-color: #d1e4dd; } -.is-dark-theme .has-background.has-green-background-color .wp-block-search .wp-block-search__button:hover { - color: #fff; - background-color: #d1e4dd; - border-color: #d1e4dd; -} - -.is-dark-theme .has-background.has-blue-background-color .wp-block-search .wp-block-search__button:hover { - color: #fff; - background-color: #d1e4dd; - border-color: #d1e4dd; -} - -.is-dark-theme .has-background.has-purple-background-color .wp-block-search .wp-block-search__button:hover { - color: #fff; - background-color: #d1e4dd; - border-color: #d1e4dd; -} - -.is-dark-theme .has-background.has-red-background-color .wp-block-search .wp-block-search__button:hover { +.is-dark-theme .wp-block-search.wp-block-search__button-inside.wp-block-search__text-button .wp-block-search__button:hover { + background-color: #28303d; color: #fff; - background-color: #d1e4dd; - border-color: #d1e4dd; } -.is-dark-theme .has-background.has-orange-background-color .wp-block-search .wp-block-search__button:hover { - color: #fff; - background-color: #d1e4dd; - border-color: #d1e4dd; -} - -.is-dark-theme .has-background.has-yellow-background-color .wp-block-search .wp-block-search__button:hover { +.is-dark-theme .wp-block-search.wp-block-search__button-inside.wp-block-search__icon-button .wp-block-search__button:hover { + background-color: #28303d; color: #fff; - background-color: #d1e4dd; - border-color: #d1e4dd; -} - -.wp-block-search.wp-block-search__button-inside .wp-block-search__input, -.has-background.has-white-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__input, -.has-background.has-green-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__input, -.has-background.has-blue-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__input, -.has-background.has-purple-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__input, -.has-background.has-red-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__input, -.has-background.has-orange-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__input, -.has-background.has-yellow-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__input { - border: none; } .wp-block-search.wp-block-search__button-inside.wp-block-search__text-button .wp-block-search__button { padding: 15px 30px; } -.is-dark-theme .wp-block-search.wp-block-search__button-inside .wp-block-search__button { - color: #d1e4dd; - border-color: currentColor; -} - -.is-dark-theme .wp-block-search.wp-block-search__button-inside .wp-block-search__button:hover { - color: #fff; - background-color: #d1e4dd; - border-color: #d1e4dd; -} - -.has-background.has-gray-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button { - color: #39414d; - border-color: currentColor; -} - -.has-background.has-dark-gray-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button { - color: #39414d; - border-color: currentColor; -} - -.has-background.has-black-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button { - color: #39414d; - border-color: currentColor; -} - -.has-background.has-gray-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button:hover { - color: #fff; - background-color: #39414d; - border-color: #39414d; -} - -.has-background.has-dark-gray-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button:hover { - color: #fff; - background-color: #39414d; - border-color: #39414d; -} - -.has-background.has-black-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button:hover { - color: #fff; - background-color: #39414d; - border-color: #39414d; -} - -.is-dark-theme .has-background.has-gray-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button { - color: #d1e4dd; - border-color: currentColor; -} - -.is-dark-theme .has-background.has-dark-gray-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button { - color: #d1e4dd; - border-color: currentColor; -} - -.is-dark-theme .has-background.has-black-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button { - color: #d1e4dd; - border-color: currentColor; -} - -.is-dark-theme .has-background.has-gray-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button:hover { - color: #fff; - background-color: #d1e4dd; - border-color: #d1e4dd; -} - -.is-dark-theme .has-background.has-dark-gray-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button:hover { - color: #fff; - background-color: #d1e4dd; - border-color: #d1e4dd; -} - -.is-dark-theme .has-background.has-black-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button:hover { - color: #fff; - background-color: #d1e4dd; - border-color: #d1e4dd; -} - .wp-block[data-align=center] > * { text-align: center; } @@ -3133,17 +2913,6 @@ pre.wp-block-verse { color: #39414d; } -.has-background a, -.has-background p, -.has-background h1, -.has-background h2, -.has-background h3, -.has-background h4, -.has-background h5, -.has-background h6 { - color: currentColor; -} - .has-primary-background-color[class] { background-color: #28303d; color: #d1e4dd; @@ -3155,12 +2924,10 @@ pre.wp-block-verse { } .has-white-background-color[class] { - background-color: #fff; color: #39414d; } .has-black-background-color[class] { - background-color: #000; color: #28303d; } @@ -3318,42 +3085,82 @@ a { color: #000; } +.has-black-color[class] > [class*=__inner-container] { + color: #000; +} + .has-gray-color[class] { color: #39414d; } +.has-gray-color[class] > [class*=__inner-container] { + color: #39414d; +} + .has-dark-gray-color[class] { color: #28303d; } +.has-dark-gray-color[class] > [class*=__inner-container] { + color: #28303d; +} + .has-green-color[class] { color: #d1e4dd; } +.has-green-color[class] > [class*=__inner-container] { + color: #d1e4dd; +} + .has-blue-color[class] { color: #d1dfe4; } +.has-blue-color[class] > [class*=__inner-container] { + color: #d1dfe4; +} + .has-purple-color[class] { color: #d1d1e4; } +.has-purple-color[class] > [class*=__inner-container] { + color: #d1d1e4; +} + .has-red-color[class] { color: #e4d1d1; } +.has-red-color[class] > [class*=__inner-container] { + color: #e4d1d1; +} + .has-orange-color[class] { color: #e4dad1; } +.has-orange-color[class] > [class*=__inner-container] { + color: #e4dad1; +} + .has-yellow-color[class] { color: #eeeadd; } +.has-yellow-color[class] > [class*=__inner-container] { + color: #eeeadd; +} + .has-white-color[class] { color: #fff; } +.has-white-color[class] > [class*=__inner-container] { + color: #fff; +} + .has-background a, .has-background p, .has-background h1, @@ -3369,79 +3176,127 @@ a { background-color: #000; } -.has-gray-background-color[class] { - background-color: #39414d; +.has-black-background-color[class] > [class*=__inner-container] { + background-color: #000; } .has-dark-gray-background-color[class] { background-color: #28303d; } +.has-dark-gray-background-color[class] > [class*=__inner-container] { + background-color: #28303d; +} + +.has-gray-background-color[class] { + background-color: #39414d; +} + +.has-gray-background-color[class] > [class*=__inner-container] { + background-color: #39414d; +} + +.has-light-gray-background-color[class] { + background-color: #f0f0f0; +} + +.has-light-gray-background-color[class] > [class*=__inner-container] { + background-color: #f0f0f0; +} + .has-green-background-color[class] { background-color: #d1e4dd; } +.has-green-background-color[class] > [class*=__inner-container] { + background-color: #d1e4dd; +} + .has-blue-background-color[class] { background-color: #d1dfe4; } +.has-blue-background-color[class] > [class*=__inner-container] { + background-color: #d1dfe4; +} + .has-purple-background-color[class] { background-color: #d1d1e4; } +.has-purple-background-color[class] > [class*=__inner-container] { + background-color: #d1d1e4; +} + .has-red-background-color[class] { background-color: #e4d1d1; } +.has-red-background-color[class] > [class*=__inner-container] { + background-color: #e4d1d1; +} + .has-orange-background-color[class] { background-color: #e4dad1; } +.has-orange-background-color[class] > [class*=__inner-container] { + background-color: #e4dad1; +} + .has-yellow-background-color[class] { background-color: #eeeadd; } +.has-yellow-background-color[class] > [class*=__inner-container] { + background-color: #eeeadd; +} + .has-white-background-color[class] { background-color: #fff; } -:not(.has-text-color).has-black-background-color[class] { - color: #fff; +.has-white-background-color[class] > [class*=__inner-container] { + background-color: #fff; } -:not(.has-text-color).has-gray-background-color[class] { - color: #fff; +.has-background:not(.has-text-color).has-black-background-color[class] > [class*=__inner-container] { + color: #28303d; } -:not(.has-text-color).has-dark-gray-background-color[class] { - color: #fff; +.has-background:not(.has-text-color).has-gray-background-color[class] > [class*=__inner-container] { + color: #28303d; +} + +.has-background:not(.has-text-color).has-dark-gray-background-color[class] > [class*=__inner-container] { + color: #28303d; } -:not(.has-text-color).has-green-background-color[class] { +.has-background:not(.has-text-color).has-green-background-color[class] > [class*=__inner-container] { color: #28303d; } -:not(.has-text-color).has-blue-background-color[class] { +.has-background:not(.has-text-color).has-blue-background-color[class] > [class*=__inner-container] { color: #28303d; } -:not(.has-text-color).has-purple-background-color[class] { +.has-background:not(.has-text-color).has-purple-background-color[class] > [class*=__inner-container] { color: #28303d; } -:not(.has-text-color).has-red-background-color[class] { +.has-background:not(.has-text-color).has-red-background-color[class] > [class*=__inner-container] { color: #28303d; } -:not(.has-text-color).has-orange-background-color[class] { +.has-background:not(.has-text-color).has-orange-background-color[class] > [class*=__inner-container] { color: #28303d; } -:not(.has-text-color).has-yellow-background-color[class] { +.has-background:not(.has-text-color).has-yellow-background-color[class] > [class*=__inner-container] { color: #28303d; } -:not(.has-text-color).has-white-background-color[class] { +.has-background:not(.has-text-color).has-white-background-color[class] > [class*=__inner-container] { color: #28303d; } diff --git a/themes/twentytwentyone/assets/css/ie.css b/themes/twentytwentyone/assets/css/ie.css index 933bb149..b0b86bad 100644 --- a/themes/twentytwentyone/assets/css/ie.css +++ b/themes/twentytwentyone/assets/css/ie.css @@ -9,7 +9,7 @@ Description: Twenty Twenty-One is a blank canvas for your ideas and it makes the Requires at least: 5.3 Tested up to: 5.6 Requires PHP: 5.6 -Version: 1.1 +Version: 1.2 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: twentytwentyone @@ -545,8 +545,6 @@ template { */ .post-thumbnail { max-width: calc(100vw - 30px); - margin-left: auto; - margin-right: auto; } @media only screen and (min-width: 482px) { @@ -635,8 +633,6 @@ template { .widget-area { max-width: calc(100vw - 30px); - margin-left: auto; - margin-right: auto; } @media only screen and (min-width: 482px) { @@ -715,8 +711,6 @@ template { .site-footer { max-width: calc(100vw - 30px); - margin-left: auto; - margin-right: auto; } @media only screen and (min-width: 482px) { @@ -735,8 +729,6 @@ template { .site-header { max-width: calc(100vw - 30px); - margin-left: auto; - margin-right: auto; } @media only screen and (min-width: 482px) { @@ -923,12 +915,6 @@ template { margin-left: calc(50vw - min(calc(100vw - 4 * 25px), 610px) *1); } } - @media only screen and (min-width: 482px) { - - .entry-content > .alignleft { - margin-left: calc(50vw - min(calc(100vw - 4 * 25px), 610px) *1); - } - } @media only screen and (min-width: 822px) { .entry-content > .alignleft { @@ -952,12 +938,6 @@ template { margin-right: calc(50vw - min(calc(100vw - 4 * 25px), 610px) *1); } } - @media only screen and (min-width: 482px) { - - .entry-content > .alignright { - margin-right: calc(50vw - min(calc(100vw - 4 * 25px), 610px) *1); - } - } @media only screen and (min-width: 822px) { .entry-content > .alignright { @@ -1318,10 +1298,6 @@ body { background-color: #d1e4dd; } -button { - cursor: pointer; -} - .clear:before, .clear:after, .entry-content:before, @@ -1379,15 +1355,11 @@ blockquote p { blockquote cite { font-weight: normal; - color: #28303d; - font-size: 1rem; letter-spacing: normal; } blockquote footer { font-weight: normal; - color: #28303d; - font-size: 1rem; letter-spacing: normal; } @@ -2099,9 +2071,9 @@ fieldset input[type=checkbox] + label { } img { - display: block; height: auto; max-width: 100%; + vertical-align: middle; } /* Classic editor images */ @@ -2220,11 +2192,13 @@ a:hover { } .is-dark-theme .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) { - color: #d1e4dd; + background: #000; + color: #fff; + text-decoration: none; } .is-dark-theme .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) .meta-nav { - color: #d1e4dd; + color: #fff; } .has-background-white .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) { @@ -2248,6 +2222,10 @@ a:hover { background-color: #f1f1f1; } +.site a:focus:not(.wp-block-button__link):not(.wp-block-file__button).custom-logo-link { + background: none; +} + .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) img { outline: 2px dotted #28303d; } @@ -2270,299 +2248,381 @@ a:hover { * Button */ .site .button { - line-height: 1.5; - color: #d1e4dd; + border: 3px solid transparent; + border-radius: 0; cursor: pointer; font-weight: 500; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 1.25rem; - background-color: #39414d; - border-radius: 0; - border: 3px solid #39414d; + line-height: 1.5; + padding: 15px 30px; text-decoration: none; +} + +button { + border: 3px solid transparent; + border-radius: 0; + cursor: pointer; + font-weight: 500; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + font-size: 1.25rem; + line-height: 1.5; padding: 15px 30px; + text-decoration: none; } input[type=submit] { - line-height: 1.5; - color: #d1e4dd; + border: 3px solid transparent; + border-radius: 0; cursor: pointer; font-weight: 500; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 1.25rem; - background-color: #39414d; - border-radius: 0; - border: 3px solid #39414d; - text-decoration: none; + line-height: 1.5; padding: 15px 30px; + text-decoration: none; } input[type=reset] { - line-height: 1.5; - color: #d1e4dd; + border: 3px solid transparent; + border-radius: 0; cursor: pointer; font-weight: 500; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 1.25rem; - background-color: #39414d; - border-radius: 0; - border: 3px solid #39414d; - text-decoration: none; + line-height: 1.5; padding: 15px 30px; + text-decoration: none; } -.wp-block-search__button { - line-height: 1.5; - color: #d1e4dd; +.wp-block-search .wp-block-search__button { + border: 3px solid transparent; + border-radius: 0; cursor: pointer; font-weight: 500; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 1.25rem; - background-color: #39414d; - border-radius: 0; - border: 3px solid #39414d; - text-decoration: none; + line-height: 1.5; padding: 15px 30px; + text-decoration: none; } .wp-block-button .wp-block-button__link { - line-height: 1.5; - color: #d1e4dd; + border: 3px solid transparent; + border-radius: 0; cursor: pointer; font-weight: 500; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 1.25rem; - background-color: #39414d; - border-radius: 0; - border: 3px solid #39414d; + line-height: 1.5; + padding: 15px 30px; text-decoration: none; +} + +.wp-block-file a.wp-block-file__button { + border: 3px solid transparent; + border-radius: 0; + cursor: pointer; + font-weight: 500; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + font-size: 1.25rem; + line-height: 1.5; padding: 15px 30px; + text-decoration: none; } -.site .button:focus, -input[type=submit]:focus, -input[type=reset]:focus, -.wp-block-search__button:focus, -.wp-block-button .wp-block-button__link:focus { - background: transparent; - outline-offset: -6px; - outline: 2px dotted currentColor; +.site .button:not(:hover):not(:active):not(.has-text-color) { + color: #d1e4dd; } -.is-dark-theme .site .button:focus { - color: #39414d; +button:not(:hover):not(:active):not(.has-text-color) { + color: #d1e4dd; } -.is-dark-theme input[type=submit]:focus { - color: #39414d; +input[type=submit]:not(:hover):not(:active):not(.has-text-color) { + color: #d1e4dd; } -.is-dark-theme input[type=reset]:focus { - color: #39414d; +input[type=reset]:not(:hover):not(:active):not(.has-text-color) { + color: #d1e4dd; } -.is-dark-theme .wp-block-search__button:focus { - color: #39414d; +.wp-block-search .wp-block-search__button:not(:hover):not(:active):not(.has-text-color) { + color: #d1e4dd; } -.is-dark-theme .wp-block-button .wp-block-button__link:focus { - color: #39414d; +.wp-block-button .wp-block-button__link:not(:hover):not(:active):not(.has-text-color) { + color: #d1e4dd; } -.site .button:focus:not(.has-background) { - color: #39414d; +.wp-block-file a.wp-block-file__button:not(:hover):not(:active):not(.has-text-color) { + color: #d1e4dd; } -input[type=submit]:focus:not(.has-background) { - color: #39414d; +.has-background .site .button:not(:hover):not(:active):not(.has-text-color) { + color: #28303d; } -input[type=reset]:focus:not(.has-background) { - color: #39414d; +.has-background button:not(:hover):not(:active):not(.has-text-color) { + color: #28303d; } -.wp-block-search__button:focus:not(.has-background) { - color: #39414d; +.has-background input[type=submit]:not(:hover):not(:active):not(.has-text-color) { + color: #28303d; } -.wp-block-button .wp-block-button__link:focus:not(.has-background) { - color: #39414d; +.has-background input[type=reset]:not(:hover):not(:active):not(.has-text-color) { + color: #28303d; } -.site .button:disabled { - background-color: rgba(255, 255, 255, 0.5); - border-color: rgba(255, 255, 255, 0.5); - color: #39414d; +.has-background .wp-block-search .wp-block-search__button:not(:hover):not(:active):not(.has-text-color) { + color: #28303d; } -input[type=submit]:disabled { - background-color: rgba(255, 255, 255, 0.5); - border-color: rgba(255, 255, 255, 0.5); - color: #39414d; +.has-background .wp-block-button .wp-block-button__link:not(:hover):not(:active):not(.has-text-color) { + color: #28303d; } -input[type=reset]:disabled { - background-color: rgba(255, 255, 255, 0.5); - border-color: rgba(255, 255, 255, 0.5); - color: #39414d; +.has-background .wp-block-file a.wp-block-file__button:not(:hover):not(:active):not(.has-text-color) { + color: #28303d; } -.wp-block-search__button:disabled { - background-color: rgba(255, 255, 255, 0.5); - border-color: rgba(255, 255, 255, 0.5); - color: #39414d; +.has-background .site .button:not(:hover):not(:active):not(.has-text-color).has-background { + color: #28303d; } -.wp-block-button .wp-block-button__link:disabled { - background-color: rgba(255, 255, 255, 0.5); - border-color: rgba(255, 255, 255, 0.5); - color: #39414d; +.has-background button:not(:hover):not(:active):not(.has-text-color).has-background { + color: #28303d; } -.site .button:active { - color: #39414d; - background-color: #d1e4dd; +.has-background input[type=submit]:not(:hover):not(:active):not(.has-text-color).has-background { + color: #28303d; } -input[type=submit]:active { - color: #39414d; - background-color: #d1e4dd; +.has-background input[type=reset]:not(:hover):not(:active):not(.has-text-color).has-background { + color: #28303d; } -input[type=reset]:active { - color: #39414d; - background-color: #d1e4dd; +.has-background .wp-block-search .wp-block-search__button:not(:hover):not(:active):not(.has-text-color).has-background { + color: #28303d; } -.wp-block-search .wp-block-search__button:active { - color: #39414d; - background-color: #d1e4dd; +.has-background .wp-block-button .wp-block-button__link:not(:hover):not(:active):not(.has-text-color).has-background { + color: #28303d; } -.wp-block-file .wp-block-file__button:active { - color: #39414d; - background-color: #d1e4dd; +.has-background .wp-block-file a.wp-block-file__button:not(:hover):not(:active):not(.has-text-color).has-background { + color: #28303d; } -.site .button:hover { - color: #39414d; - background: transparent; +.site .button:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; +} + +button:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; +} + +input[type=submit]:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; +} + +input[type=reset]:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; +} + +.wp-block-search .wp-block-search__button:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; +} + +.wp-block-button .wp-block-button__link:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; } -input[type=submit]:hover { +.wp-block-file a.wp-block-file__button:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; +} + +.has-background .site .button:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; +} + +.has-background button:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; +} + +.has-background input[type=submit]:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; +} + +.has-background input[type=reset]:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; +} + +.has-background .wp-block-search .wp-block-search__button:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; +} + +.has-background .wp-block-button .wp-block-button__link:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; +} + +.has-background .wp-block-file a.wp-block-file__button:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; +} + +.site .button:hover, +.site .button:active, +button:hover, +button:active, +input[type=submit]:hover, +input[type=submit]:active, +input[type=reset]:hover, +input[type=reset]:active, +.wp-block-search .wp-block-search__button:hover, +.wp-block-search .wp-block-search__button:active, +.wp-block-button .wp-block-button__link:hover, +.wp-block-button .wp-block-button__link:active, +.wp-block-file a.wp-block-file__button:hover, +.wp-block-file a.wp-block-file__button:active { + background-color: transparent; + border-color: currentColor; + color: inherit; +} + +.site .button:focus, +button:focus, +input[type=submit]:focus, +input[type=reset]:focus, +.wp-block-search .wp-block-search__button:focus, +.wp-block-button .wp-block-button__link:focus, +.wp-block-file a.wp-block-file__button:focus { + outline-offset: -6px; + outline: 2px dotted currentColor; +} + +.site .button:disabled { + background-color: rgba(255, 255, 255, 0.5); + border-color: rgba(255, 255, 255, 0.5); color: #39414d; - background: transparent; } -input[type=reset]:hover { +button:disabled { + background-color: rgba(255, 255, 255, 0.5); + border-color: rgba(255, 255, 255, 0.5); color: #39414d; - background: transparent; } -.wp-block-search .wp-block-search__button:hover { +input[type=submit]:disabled { + background-color: rgba(255, 255, 255, 0.5); + border-color: rgba(255, 255, 255, 0.5); color: #39414d; - background: transparent; } -.wp-block-file .wp-block-file__button:hover { +input[type=reset]:disabled { + background-color: rgba(255, 255, 255, 0.5); + border-color: rgba(255, 255, 255, 0.5); color: #39414d; - background: transparent; } -/** - * Block Options - */ -.wp-block-button:not(.is-style-outline) .wp-block-button__link:active { - color: #39414d !important; - background: transparent !important; - border-color: #39414d; +.wp-block-search .wp-block-search__button:disabled { + background-color: rgba(255, 255, 255, 0.5); + border-color: rgba(255, 255, 255, 0.5); + color: #39414d; } -.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { - color: #39414d !important; - background: transparent !important; - border-color: #39414d; +.wp-block-button .wp-block-button__link:disabled { + background-color: rgba(255, 255, 255, 0.5); + border-color: rgba(255, 255, 255, 0.5); + color: #39414d; } -.wp-block-button:not(.is-style-outline) .wp-block-button__link:focus { - color: #d1e4dd !important; - background: #39414d !important; +.wp-block-file a.wp-block-file__button:disabled { + background-color: rgba(255, 255, 255, 0.5); + border-color: rgba(255, 255, 255, 0.5); + color: #39414d; } -.wp-block-button.is-style-outline .wp-block-button__link { - padding: 15px 30px; +/** + * Block Options + */ +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(:hover):not(:active):not(.has-text-color) { + color: #d1e4dd; } -.wp-block-button.is-style-outline .wp-block-button__link:not(.has-background) { - background: transparent; +.has-background .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(:hover):not(:active):not(.has-text-color) { + color: #d1e4dd; } -.wp-block-button.is-style-outline .wp-block-button__link:not(.has-background):not(.has-text-color) { - background: transparent; - color: #39414d; - border-color: #39414d; +.has-background .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(:hover):not(:active):not(.has-text-color).has-background { + color: #28303d; } -.wp-block-button.is-style-outline .wp-block-button__link.has-background:not(.has-text-color) { - color: currentColor; +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; } -.wp-block-button.is-style-outline .wp-block-button__link.has-background.has-gray-background-color:not(.has-text-color) { - color: #fff; +.has-background .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(:hover):not(:active):not(.has-background) { + background-color: #28303d; } -.wp-block-button.is-style-outline .wp-block-button__link.has-background.has-dark-gray-background-color:not(.has-text-color) { - color: #fff; +.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover, +.wp-block-button:not(.is-style-outline) .wp-block-button__link:active { + border-color: currentColor !important; + background-color: transparent !important; + color: inherit !important; } -.wp-block-button.is-style-outline .wp-block-button__link.has-background.has-black-background-color:not(.has-text-color) { - color: #fff; +.wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active):not(.has-text-color), +.wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active):not(.has-background), +.wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active).has-background { + border-color: currentColor; } -.is-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-background { +.wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active):not(.has-text-color) { color: #28303d; } -.is-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-background.has-gray-background-color { - color: #fff; +.has-background .wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active):not(.has-text-color) { + color: #28303d; } -.is-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-background.has-dark-gray-background-color { - color: #fff; +.has-background .wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active).has-background:not(.has-text-color) { + color: inherit; } -.is-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-background.has-black-background-color { - color: #fff; +.wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active):not(.has-background) { + background-color: transparent; } -.wp-block-button.is-style-outline .wp-block-button__link.has-text-color, -.wp-block-button.is-style-outline .wp-block-button__link.has-background.has-text-color { - border-color: currentColor; +.wp-block-button.is-style-outline .wp-block-button__link:hover { + border-color: transparent !important; + background-color: #28303d !important; + color: #d1e4dd !important; } .wp-block-button.is-style-outline .wp-block-button__link:active { + border-color: transparent !important; + background-color: #28303d !important; color: #d1e4dd !important; - background: #39414d !important; - border-color: #39414d; } -.wp-block-button.is-style-outline .wp-block-button__link:hover { +.has-background .wp-block-button.is-style-outline .wp-block-button__link:hover { + background-color: #28303d !important; color: #d1e4dd !important; - background: #39414d !important; - border-color: #39414d; } -.wp-block-button.is-style-outline .wp-block-button__link:active.has-text-color { - border-color: #39414d; +.has-background .wp-block-button.is-style-outline .wp-block-button__link:active { + background-color: #28303d !important; + color: #d1e4dd !important; } -.wp-block-button.is-style-outline .wp-block-button__link:hover.has-text-color { - border-color: #39414d; +.has-text-color .wp-block-button.is-style-outline .wp-block-button__link:hover { + color: #d1e4dd !important; } -.wp-block-button.is-style-outline .wp-block-button__link:focus { - color: #39414d !important; - background: transparent !important; +.has-text-color .wp-block-button.is-style-outline .wp-block-button__link:active { + color: #d1e4dd !important; } .wp-block-button .is-style-squared .wp-block-button__link { @@ -2589,7 +2649,6 @@ input[type=reset]:hover { .wp-block-code code { color: #28303d; - font-size: 1rem; white-space: pre; overflow-x: auto; display: block; @@ -2759,6 +2818,8 @@ input[type=reset]:hover { /* Treating H2 separately to account for legacy /core styles */ /* Block Styles */ + + /* The background color class is used just for the overlay, and does not need to be applied to the inner container. */ } .wp-block-cover-image { @@ -2772,6 +2833,8 @@ input[type=reset]:hover { /* Treating H2 separately to account for legacy /core styles */ /* Block Styles */ + + /* The background color class is used just for the overlay, and does not need to be applied to the inner container. */ } .wp-block-cover:not(.alignwide):not(.alignfull), @@ -2892,12 +2955,6 @@ input[type=reset]:hover { font-size: 3rem; } } -@media only screen and (min-width: 652px) { - - .wp-block-cover h2 { - font-size: 3rem; - } -} .wp-block-cover-image h2 { font-size: 2.25rem; @@ -2913,12 +2970,6 @@ input[type=reset]:hover { font-size: 3rem; } } -@media only screen and (min-width: 652px) { - - .wp-block-cover-image h2 { - font-size: 3rem; - } -} .wp-block-cover h2.has-text-align-left, .wp-block-cover-image h2.has-text-align-left { @@ -3029,64 +3080,21 @@ input[type=reset]:hover { border: 3px solid #28303d; } -.wp-block-file a.wp-block-file__button:active { - color: #39414d; - opacity: inherit; -} - -.wp-block-file a.wp-block-file__button:focus { - color: #39414d; - opacity: inherit; +.wp-block-cover[class*=-background-color][class] .wp-block-cover__inner-container, +.wp-block-cover-image[class*=-background-color][class] .wp-block-cover__inner-container { + background-color: unset; } +.wp-block-file a.wp-block-file__button:active, +.wp-block-file a.wp-block-file__button:focus, .wp-block-file a.wp-block-file__button:hover { - color: #39414d; opacity: inherit; } -.wp-block-file a.wp-block-file__button:visited { - color: #d1e4dd; -} - -.wp-block-file a.wp-block-file__button:visited:hover { - color: #39414d; -} - -.wp-block-file .wp-block-file__button { - line-height: 1.5; - color: #d1e4dd; - cursor: pointer; - font-weight: 500; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - font-size: 1.25rem; - background-color: #39414d; - border-radius: 0; - border: 3px solid #39414d; - text-decoration: none; - padding: 15px 30px; +.wp-block-file a.wp-block-file__button { display: inline-block; } -.wp-block-file .wp-block-file__button:focus { - background: transparent; - outline-offset: -6px; - outline: 2px dotted currentColor; -} - -.is-dark-theme .wp-block-file .wp-block-file__button:focus { - color: #39414d; -} - -.wp-block-file .wp-block-file__button:focus:not(.has-background) { - color: #39414d; -} - -.wp-block-file .wp-block-file__button:disabled { - background-color: rgba(255, 255, 255, 0.5); - border-color: rgba(255, 255, 255, 0.5); - color: #39414d; -} - .wp-block-gallery { margin: 0 auto; } @@ -3372,13 +3380,6 @@ h2 { } } -@media only screen and (min-width: 652px) { - - h2 { - font-size: 3rem; - } -} - .h2 { font-size: 2.25rem; letter-spacing: normal; @@ -3392,13 +3393,6 @@ h2 { } } -@media only screen and (min-width: 652px) { - - .h2 { - font-size: 3rem; - } -} - h3 { font-size: 2rem; letter-spacing: normal; @@ -3503,12 +3497,6 @@ h6 { margin-top: 0; } -img { - height: auto; - max-width: 100%; - vertical-align: middle; -} - .wp-block-image.is-style-twentytwentyone-border img { border: 3px solid #28303d; } @@ -3846,10 +3834,18 @@ ul { list-style-type: disc; } +ul ul { + list-style-type: circle; +} + ol { list-style-type: decimal; } +ol ul { + list-style-type: circle; +} + dt { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-weight: bold; @@ -4030,7 +4026,7 @@ dd { } p { - line-height: --global--line-height-body; + line-height: 1.7; } p.has-background { @@ -4563,319 +4559,131 @@ pre.wp-block-preformatted { .entry-content [class*=inner-container] .wp-block-rss.alignfull, .entry-content .has-background .wp-block-rss.alignfull { padding-left: 0; - padding-right: 0; -} - -.wp-block-search { - max-width: calc(100vw - 30px); -} - -@media only screen and (min-width: 482px) { - - .wp-block-search { - max-width: min(calc(100vw - 100px), 610px); - } -} - -@media only screen and (min-width: 822px) { - - .wp-block-search { - max-width: min(calc(100vw - 200px), 610px); - } -} - -.wp-block-search__button-only.aligncenter .wp-block-search__inside-wrapper { - justify-content: center; -} - -.wp-block-search .wp-block-search__label { - font-size: 1.125rem; - font-weight: 500; - margin-bottom: 10px; -} - -.wp-block-search .wp-block-search__input { - border: 3px solid #39414d; - border-radius: 0; - color: #28303d; - line-height: 1.7; - max-width: inherit; - margin-right: -3px; - padding: 10px; -} - -.wp-block-search .wp-block-search__input:focus { - color: #28303d; - border-color: #39414d; -} - -.has-background .wp-block-search .wp-block-search__input, -[class*=background-color] .wp-block-search .wp-block-search__input, -[style*=background-color] .wp-block-search .wp-block-search__input, -.wp-block-cover[style*=background-image] .wp-block-search .wp-block-search__input { - border-color: currentColor; -} - -.has-background.has-gray-background-color .wp-block-search .wp-block-search__input { - border-color: #fff; -} - -.has-background.has-dark-gray-background-color .wp-block-search .wp-block-search__input { - border-color: #fff; -} - -.has-background.has-black-background-color .wp-block-search .wp-block-search__input { - border-color: #fff; -} - -.wp-block-search button.wp-block-search__button { - margin-left: 0; - background-color: transparent; - color: #39414d; - line-height: 1; -} - -.wp-block-search button.wp-block-search__button:hover { - background-color: #39414d; - color: #d1e4dd; -} - -.wp-block-search button.wp-block-search__button.has-icon { - padding: 6px 15px; -} - -.wp-block-search button.wp-block-search__button.has-icon svg { - width: 40px; - height: 40px; - fill: currentColor; -} - -.has-background.has-gray-background-color .wp-block-search button.wp-block-search__button { - color: #fff; - border-color: currentColor; -} - -.has-background.has-dark-gray-background-color .wp-block-search button.wp-block-search__button { - color: #fff; - border-color: currentColor; -} - -.has-background.has-black-background-color .wp-block-search button.wp-block-search__button { - color: #fff; - border-color: currentColor; -} - -.has-background.has-gray-background-color .wp-block-search button.wp-block-search__button:hover { - background-color: #39414d; - border-color: #fff; - color: #fff; -} - -.has-background.has-dark-gray-background-color .wp-block-search button.wp-block-search__button:hover { - background-color: #39414d; - border-color: #fff; - color: #fff; -} - -.has-background.has-black-background-color .wp-block-search button.wp-block-search__button:hover { - background-color: #39414d; - border-color: #fff; - color: #fff; -} - -.is-dark-theme .has-background.has-gray-background-color .wp-block-search button.wp-block-search__button:hover { - color: #d1e4dd; -} - -.is-dark-theme .has-background.has-dark-gray-background-color .wp-block-search button.wp-block-search__button:hover { - color: #d1e4dd; -} - -.is-dark-theme .has-background.has-black-background-color .wp-block-search button.wp-block-search__button:hover { - color: #d1e4dd; -} - -.has-background.has-white-background-color .wp-block-search button.wp-block-search__button, -.has-background.has-green-background-color .wp-block-search button.wp-block-search__button, -.has-background.has-blue-background-color .wp-block-search button.wp-block-search__button, -.has-background.has-purple-background-color .wp-block-search button.wp-block-search__button, -.has-background.has-red-background-color .wp-block-search button.wp-block-search__button, -.has-background.has-orange-background-color .wp-block-search button.wp-block-search__button, -.has-background.has-yellow-background-color .wp-block-search button.wp-block-search__button { - border-color: currentColor; - color: currentColor; -} - -.has-background.has-white-background-color .wp-block-search button.wp-block-search__button:hover { - background-color: #39414d; - border-color: #39414d; - color: #fff; -} - -.has-background.has-green-background-color .wp-block-search button.wp-block-search__button:hover { - background-color: #39414d; - border-color: #39414d; - color: #fff; -} - -.has-background.has-blue-background-color .wp-block-search button.wp-block-search__button:hover { - background-color: #39414d; - border-color: #39414d; - color: #fff; -} - -.has-background.has-purple-background-color .wp-block-search button.wp-block-search__button:hover { - background-color: #39414d; - border-color: #39414d; - color: #fff; -} - -.has-background.has-red-background-color .wp-block-search button.wp-block-search__button:hover { - background-color: #39414d; - border-color: #39414d; - color: #fff; -} - -.has-background.has-orange-background-color .wp-block-search button.wp-block-search__button:hover { - background-color: #39414d; - border-color: #39414d; - color: #fff; -} - -.has-background.has-yellow-background-color .wp-block-search button.wp-block-search__button:hover { - background-color: #39414d; - border-color: #39414d; - color: #fff; -} - -.is-dark-theme .has-background.has-white-background-color .wp-block-search button.wp-block-search__button:hover { - border-color: #d1e4dd; - background-color: #d1e4dd; - color: #39414d; + padding-right: 0; } -.is-dark-theme .has-background.has-green-background-color .wp-block-search button.wp-block-search__button:hover { - border-color: #d1e4dd; - background-color: #d1e4dd; - color: #39414d; +.wp-block-search { + max-width: calc(100vw - 30px); } -.is-dark-theme .has-background.has-blue-background-color .wp-block-search button.wp-block-search__button:hover { - border-color: #d1e4dd; - background-color: #d1e4dd; - color: #39414d; -} +@media only screen and (min-width: 482px) { -.is-dark-theme .has-background.has-purple-background-color .wp-block-search button.wp-block-search__button:hover { - border-color: #d1e4dd; - background-color: #d1e4dd; - color: #39414d; + .wp-block-search { + max-width: min(calc(100vw - 100px), 610px); + } } -.is-dark-theme .has-background.has-red-background-color .wp-block-search button.wp-block-search__button:hover { - border-color: #d1e4dd; - background-color: #d1e4dd; - color: #39414d; +@media only screen and (min-width: 822px) { + + .wp-block-search { + max-width: min(calc(100vw - 200px), 610px); + } } -.is-dark-theme .has-background.has-orange-background-color .wp-block-search button.wp-block-search__button:hover { - border-color: #d1e4dd; - background-color: #d1e4dd; - color: #39414d; +.wp-block-search__button-only.aligncenter .wp-block-search__inside-wrapper { + justify-content: center; } -.is-dark-theme .has-background.has-yellow-background-color .wp-block-search button.wp-block-search__button:hover { - border-color: #d1e4dd; - background-color: #d1e4dd; - color: #39414d; +.wp-block-search .wp-block-search__label { + font-size: 1.125rem; + font-weight: 500; + margin-bottom: 10px; } -.wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper { - background-color: #fff; +.wp-block-search .wp-block-search__input { border: 3px solid #39414d; border-radius: 0; + color: #28303d; + line-height: 1.7; + max-width: inherit; + margin-right: -3px; + padding: 10px; } -.wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper .wp-block-search__input { - margin-right: 0; +.wp-block-search .wp-block-search__input:focus { + color: #28303d; + border-color: #39414d; } -.wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper .wp-block-search__input:focus { - outline: 2px dotted #39414d; - outline-offset: -5px; +.has-background .wp-block-search .wp-block-search__input { + border-color: #28303d !important; } -.is-dark-theme .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper .wp-block-search__input:focus { - outline-color: currentColor; +.wp-block-search button.wp-block-search__button { + margin-left: 0; + line-height: 1; } -.wp-block-search.wp-block-search__button-inside.wp-block-search__text-button button.wp-block-search__button { - padding: 15px 30px; +.wp-block-search button.wp-block-search__button.has-icon { + padding: 6px 15px; } -.has-background.has-gray-background-color .wp-block-search.wp-block-search__button-inside button.wp-block-search__button { - border-color: #39414d; - color: #39414d; +.wp-block-search button.wp-block-search__button.has-icon svg { + width: 40px; + height: 40px; + fill: currentColor; } -.has-background.has-dark-gray-background-color .wp-block-search.wp-block-search__button-inside button.wp-block-search__button { - border-color: #39414d; - color: #39414d; +.has-background .wp-block-search button.wp-block-search__button:hover { + background-color: #d1e4dd !important; + color: #28303d !important; } -.has-background.has-black-background-color .wp-block-search.wp-block-search__button-inside button.wp-block-search__button { - border-color: #39414d; - color: #39414d; +.has-background .wp-block-search button.wp-block-search__button:active { + background-color: #d1e4dd !important; + color: #28303d !important; } -.has-background.has-gray-background-color .wp-block-search.wp-block-search__button-inside button.wp-block-search__button:hover { - color: #fff; +.has-text-color .wp-block-search button.wp-block-search__button:hover { + color: #28303d !important; } -.has-background.has-dark-gray-background-color .wp-block-search.wp-block-search__button-inside button.wp-block-search__button:hover { - color: #fff; +.has-text-color .wp-block-search button.wp-block-search__button:active { + color: #28303d !important; } -.has-background.has-black-background-color .wp-block-search.wp-block-search__button-inside button.wp-block-search__button:hover { - color: #fff; +.wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper { + background-color: #fff; + border: 3px solid #39414d; + border-radius: 0; + padding: 3px; } -.is-dark-theme .has-background.has-gray-background-color .wp-block-search.wp-block-search__button-inside button.wp-block-search__button { - border-color: #d1e4dd; - color: #d1e4dd; +.has-background .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper { + border-color: #28303d !important; } -.is-dark-theme .has-background.has-dark-gray-background-color .wp-block-search.wp-block-search__button-inside button.wp-block-search__button { - border-color: #d1e4dd; - color: #d1e4dd; +.wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper .wp-block-search__input { + margin-left: 0; + margin-right: 0; + padding-left: 10px; } -.is-dark-theme .has-background.has-black-background-color .wp-block-search.wp-block-search__button-inside button.wp-block-search__button { - border-color: #d1e4dd; - color: #d1e4dd; +.wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper .wp-block-search__input:focus { + color: #28303d; + outline-offset: -2px; + outline: 2px dotted #39414d; } -.is-dark-theme .has-background.has-gray-background-color .wp-block-search.wp-block-search__button-inside button.wp-block-search__button:hover { - color: #fff; +.wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper button.wp-block-search__button { + padding: 15px 30px; } -.is-dark-theme .has-background.has-dark-gray-background-color .wp-block-search.wp-block-search__button-inside button.wp-block-search__button:hover { - color: #fff; +.wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper button.wp-block-search__button:hover { + color: #28303d; } -.is-dark-theme .has-background.has-black-background-color .wp-block-search.wp-block-search__button-inside button.wp-block-search__button:hover { - color: #fff; +.is-dark-theme .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper button.wp-block-search__button { + color: #28303d; } -.is-dark-theme .wp-block-search.wp-block-search__button-inside button.wp-block-search__button { - border-color: #d1e4dd; - color: #d1e4dd; +.is-dark-theme .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper button.wp-block-search__button:hover { + background-color: #28303d; + color: #fff; } -.is-dark-theme .wp-block-search.wp-block-search__button-inside button.wp-block-search__button:hover { - border-color: #d1e4dd; - background-color: #d1e4dd; - color: #39414d; +.wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper button.wp-block-search__button.has-icon { + padding: 6px 15px; } .wp-block-search__button { @@ -4977,7 +4785,8 @@ hr.wp-block-separator.is-style-dots:before { color: #28303d; } -.wp-block-social-links.is-style-twentytwentyone-social-icons-color .wp-social-link { +.wp-block-social-links.is-style-twentytwentyone-social-icons-color .wp-social-link, +.wp-block-social-links.is-style-twentytwentyone-social-icons-color.has-icon-background-color.has-icon-background-color .wp-social-link { background: none; } @@ -5379,13 +5188,6 @@ table.wp-calendar-table caption { } } - @media only screen and (min-width: 482px) { - - .entry-content > .alignleft { - max-width: calc(50% - 50vw + min(calc(100vw - 4 * 25px), 610px) *1); - } - } - @media only screen and (min-width: 822px) { .entry-content > .alignleft { @@ -5454,13 +5256,6 @@ table.wp-calendar-table caption { } } - @media only screen and (min-width: 482px) { - - .entry-content > .alignright { - max-width: calc(50% - 50vw + min(calc(100vw - 4 * 25px), 610px) *1); - } - } - @media only screen and (min-width: 822px) { .entry-content > .alignright { @@ -5619,15 +5414,6 @@ table.wp-calendar-table caption { line-height: 1.4; } -a.custom-logo-link { - text-decoration: none; -} - -.has-background-white a.custom-logo-link:focus, -.is-dark-theme a.custom-logo-link:focus { - background: none; -} - .site-title > a { text-decoration-color: #39414d; } @@ -5856,13 +5642,6 @@ a.custom-logo-link { } } -@media only screen and (min-width: 652px) { - - .entry-title { - font-size: 3rem; - } -} - .entry-title a { color: currentColor; text-underline-offset: 0.15em; @@ -6263,12 +6042,6 @@ h1.page-title { font-size: 3rem; } } -@media only screen and (min-width: 652px) { - - .comments-title { - font-size: 3rem; - } -} .comment-reply-title { font-size: 2.25rem; @@ -6280,12 +6053,6 @@ h1.page-title { font-size: 3rem; } } -@media only screen and (min-width: 652px) { - - .comment-reply-title { - font-size: 3rem; - } -} .comment-reply-title { display: flex; @@ -6418,7 +6185,7 @@ h1.page-title { margin: 0; } -.comment-content a { +.comment-content { word-wrap: break-word; } @@ -6577,11 +6344,6 @@ h1.page-title { padding-top: 15px; padding-bottom: 8px; } - -.menu-button-container #primary-mobile-menu { - margin-left: auto; - padding: 10px 15px; -} @media only screen and (max-width: 481px) { .menu-button-container { @@ -6589,8 +6351,10 @@ h1.page-title { } } -.menu-button-container .button.button { +.menu-button-container #primary-mobile-menu { display: flex; + margin-left: auto; + padding: 10px 15px; font-size: 1rem; font-weight: 500; background-color: transparent; @@ -6598,33 +6362,33 @@ h1.page-title { color: #28303d; } -.menu-button-container .button.button .dropdown-icon { +.menu-button-container #primary-mobile-menu .dropdown-icon { display: flex; align-items: center; } -.menu-button-container .button.button .dropdown-icon .svg-icon { +.menu-button-container #primary-mobile-menu .dropdown-icon .svg-icon { margin-left: 5px; } -.menu-button-container .button.button .dropdown-icon.open .svg-icon { +.menu-button-container #primary-mobile-menu .dropdown-icon.open .svg-icon { position: relative; top: -1px; } -.menu-button-container .button.button .dropdown-icon.close { +.menu-button-container #primary-mobile-menu .dropdown-icon.close { display: none; } -.menu-button-container .button.button[aria-expanded*=true] .dropdown-icon.open { +.menu-button-container #primary-mobile-menu[aria-expanded*=true] .dropdown-icon.open { display: none; } -.menu-button-container .button.button[aria-expanded*=true] .dropdown-icon.close { +.menu-button-container #primary-mobile-menu[aria-expanded*=true] .dropdown-icon.close { display: flex; } -.has-logo.has-title-and-tagline .menu-button-container .button.button[aria-expanded*=true] .dropdown-icon.close { +.has-logo.has-title-and-tagline .menu-button-container #primary-mobile-menu[aria-expanded*=true] .dropdown-icon.close { animation-name: twentytwentyone-close-button-transition; animation-duration: 0.3s; } @@ -6793,7 +6557,7 @@ h1.page-title { width: inherit; } - .primary-navigation > div > .menu-wrapper li:last-child() { + .primary-navigation > div > .menu-wrapper li:last-child { margin-right: 0; } } @@ -7049,7 +6813,7 @@ h1.page-title { } @media only screen and (max-width: 481px) { - .primary-navigation .sub-menu .menu-item:last-child() { + .primary-navigation .sub-menu .menu-item:last-child { margin-bottom: 0; } } @@ -7649,16 +7413,9 @@ h1.page-title { .widget_search > .search-form .search-submit { margin-left: 0; - background-color: transparent; - color: #39414d; margin-bottom: 15px; } -.widget_search > .search-form .search-submit:hover { - background-color: #39414d; - color: #d1e4dd; -} - .widget_rss a.rsswidget .rss-widget-icon { display: none; } @@ -7717,42 +7474,82 @@ h1.page-title { color: #000; } +.has-black-color[class] > [class*=__inner-container] { + color: #000; +} + .has-gray-color[class] { color: #39414d; } +.has-gray-color[class] > [class*=__inner-container] { + color: #39414d; +} + .has-dark-gray-color[class] { color: #28303d; } +.has-dark-gray-color[class] > [class*=__inner-container] { + color: #28303d; +} + .has-green-color[class] { color: #d1e4dd; } +.has-green-color[class] > [class*=__inner-container] { + color: #d1e4dd; +} + .has-blue-color[class] { color: #d1dfe4; } +.has-blue-color[class] > [class*=__inner-container] { + color: #d1dfe4; +} + .has-purple-color[class] { color: #d1d1e4; } +.has-purple-color[class] > [class*=__inner-container] { + color: #d1d1e4; +} + .has-red-color[class] { color: #e4d1d1; } +.has-red-color[class] > [class*=__inner-container] { + color: #e4d1d1; +} + .has-orange-color[class] { color: #e4dad1; } +.has-orange-color[class] > [class*=__inner-container] { + color: #e4dad1; +} + .has-yellow-color[class] { color: #eeeadd; } +.has-yellow-color[class] > [class*=__inner-container] { + color: #eeeadd; +} + .has-white-color[class] { color: #fff; } +.has-white-color[class] > [class*=__inner-container] { + color: #fff; +} + .has-background a, .has-background p, .has-background h1, @@ -7768,79 +7565,167 @@ h1.page-title { background-color: #000; } -.has-gray-background-color[class] { - background-color: #39414d; +.has-black-background-color[class] > [class*=__inner-container] { + background-color: #000; } .has-dark-gray-background-color[class] { background-color: #28303d; } +.has-dark-gray-background-color[class] > [class*=__inner-container] { + background-color: #28303d; +} + +.has-gray-background-color[class] { + background-color: #39414d; +} + +.has-gray-background-color[class] > [class*=__inner-container] { + background-color: #39414d; +} + +.has-light-gray-background-color[class] { + background-color: #f0f0f0; +} + +.has-light-gray-background-color[class] > [class*=__inner-container] { + background-color: #f0f0f0; +} + .has-green-background-color[class] { background-color: #d1e4dd; } +.has-green-background-color[class] > [class*=__inner-container] { + background-color: #d1e4dd; +} + .has-blue-background-color[class] { background-color: #d1dfe4; } +.has-blue-background-color[class] > [class*=__inner-container] { + background-color: #d1dfe4; +} + .has-purple-background-color[class] { background-color: #d1d1e4; } +.has-purple-background-color[class] > [class*=__inner-container] { + background-color: #d1d1e4; +} + .has-red-background-color[class] { background-color: #e4d1d1; } +.has-red-background-color[class] > [class*=__inner-container] { + background-color: #e4d1d1; +} + .has-orange-background-color[class] { background-color: #e4dad1; } +.has-orange-background-color[class] > [class*=__inner-container] { + background-color: #e4dad1; +} + .has-yellow-background-color[class] { background-color: #eeeadd; } +.has-yellow-background-color[class] > [class*=__inner-container] { + background-color: #eeeadd; +} + .has-white-background-color[class] { background-color: #fff; } -:not(.has-text-color).has-black-background-color[class] { +.has-white-background-color[class] > [class*=__inner-container] { + background-color: #fff; +} + +.has-background:not(.has-text-color).has-black-background-color[class] { color: #fff; } -:not(.has-text-color).has-gray-background-color[class] { +.has-background:not(.has-text-color).has-gray-background-color[class] { color: #fff; } -:not(.has-text-color).has-dark-gray-background-color[class] { +.has-background:not(.has-text-color).has-dark-gray-background-color[class] { color: #fff; } -:not(.has-text-color).has-green-background-color[class] { +.has-background:not(.has-text-color).has-black-background-color[class] > [class*=__inner-container] { + color: #28303d; +} + +.has-background:not(.has-text-color).has-gray-background-color[class] > [class*=__inner-container] { + color: #28303d; +} + +.has-background:not(.has-text-color).has-dark-gray-background-color[class] > [class*=__inner-container] { + color: #28303d; +} + +.has-background:not(.has-text-color).has-green-background-color[class] { + color: #28303d; +} + +.has-background:not(.has-text-color).has-blue-background-color[class] { + color: #28303d; +} + +.has-background:not(.has-text-color).has-purple-background-color[class] { + color: #28303d; +} + +.has-background:not(.has-text-color).has-red-background-color[class] { + color: #28303d; +} + +.has-background:not(.has-text-color).has-orange-background-color[class] { + color: #28303d; +} + +.has-background:not(.has-text-color).has-yellow-background-color[class] { + color: #28303d; +} + +.has-background:not(.has-text-color).has-white-background-color[class] { + color: #28303d; +} + +.has-background:not(.has-text-color).has-green-background-color[class] > [class*=__inner-container] { color: #28303d; } -:not(.has-text-color).has-blue-background-color[class] { +.has-background:not(.has-text-color).has-blue-background-color[class] > [class*=__inner-container] { color: #28303d; } -:not(.has-text-color).has-purple-background-color[class] { +.has-background:not(.has-text-color).has-purple-background-color[class] > [class*=__inner-container] { color: #28303d; } -:not(.has-text-color).has-red-background-color[class] { +.has-background:not(.has-text-color).has-red-background-color[class] > [class*=__inner-container] { color: #28303d; } -:not(.has-text-color).has-orange-background-color[class] { +.has-background:not(.has-text-color).has-orange-background-color[class] > [class*=__inner-container] { color: #28303d; } -:not(.has-text-color).has-yellow-background-color[class] { +.has-background:not(.has-text-color).has-yellow-background-color[class] > [class*=__inner-container] { color: #28303d; } -:not(.has-text-color).has-white-background-color[class] { +.has-background:not(.has-text-color).has-white-background-color[class] > [class*=__inner-container] { color: #28303d; } diff --git a/themes/twentytwentyone/assets/css/style-dark-mode-rtl.css b/themes/twentytwentyone/assets/css/style-dark-mode-rtl.css index b3a8a885..9dc391c9 100644 --- a/themes/twentytwentyone/assets/css/style-dark-mode-rtl.css +++ b/themes/twentytwentyone/assets/css/style-dark-mode-rtl.css @@ -17,13 +17,6 @@ --table--stripes-background-color: rgba(240, 240, 240, 0.15); } - .is-dark-theme.is-dark-theme .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button), - .is-dark-theme.is-dark-theme .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) .meta-nav { - background: #000; - color: #fff; - text-decoration: none; - } - .is-dark-theme.is-dark-theme img { filter: brightness(0.85) contrast(1.1); } diff --git a/themes/twentytwentyone/assets/css/style-dark-mode.css b/themes/twentytwentyone/assets/css/style-dark-mode.css index 6ec1fa97..308d90cc 100644 --- a/themes/twentytwentyone/assets/css/style-dark-mode.css +++ b/themes/twentytwentyone/assets/css/style-dark-mode.css @@ -1,115 +1,108 @@ -/* OS dark theme preference */ -@media only screen { - - .is-dark-theme.is-dark-theme { - --global--color-background: var(--global--color-dark-gray); - --global--color-primary: var(--global--color-light-gray); - --global--color-secondary: var(--global--color-light-gray); - --button--color-text: var(--global--color-background); - --button--color-text-hover: var(--global--color-secondary); - --button--color-text-active: var(--global--color-secondary); - --button--color-background: var(--global--color-secondary); - --button--color-background-active: var(--global--color-background); - --global--color-border: #9ea1a7; - - /* Block: Table */ - --table--stripes-border-color: rgba(240, 240, 240, 0.15); - --table--stripes-background-color: rgba(240, 240, 240, 0.15); - } - - .is-dark-theme.is-dark-theme .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button), - .is-dark-theme.is-dark-theme .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) .meta-nav { - background: #000; - color: #fff; - text-decoration: none; - } - - .is-dark-theme.is-dark-theme img { - filter: brightness(0.85) contrast(1.1); - } - - .respect-color-scheme-preference.is-dark-theme body { - background-color: var(--global--color-background); - } - - #dark-mode-toggler { - cursor: pointer; - display: flex; - align-items: center; - justify-content: center; - font-size: var(--global--font-size-xs); - padding: 0.5em; - min-height: 44px; - min-width: max-content; - border: 2px solid currentColor; - box-shadow: none; - background: var(--button--color-text); - color: var(--button--color-background); - z-index: 9998; - } - - .no-js #dark-mode-toggler { - display: none; - } - - #dark-mode-toggler.fixed-bottom { - position: fixed; - bottom: 5px; - right: 5px; - transition: bottom 0.5s; - } - - #dark-mode-toggler.fixed-bottom.hide:not(:focus) { - bottom: -80px; - } - - #dark-mode-toggler.relative { - position: absolute; - height: 44px; - top: calc(2.4 * var(--global--spacing-vertical) - 44px); - right: calc(50vw - var(--responsive--alignwide-width) / 2 - 0.5em); - } - - .admin-bar #dark-mode-toggler.relative { - top: calc(2.4 * var(--global--spacing-vertical) - 44px + 32px); - } -} -@media only screen and (max-width: 782px) { - - .admin-bar #dark-mode-toggler.relative { - top: calc(2.4 * var(--global--spacing-vertical) - 44px + 46px); - } -} -@media only screen and (max-width: 481px) { - - .admin-bar #dark-mode-toggler.relative { - top: calc(2.4 * var(--global--spacing-vertical) - 44px + 26px); - } -} -@media only screen and (max-width: 481px) { - - body:not(.primary-navigation-open) #dark-mode-toggler.relative ~ nav { - top: calc(44px + 44px); - } -} -@media only screen { - - .primary-navigation-open #dark-mode-toggler { - display: none; - } -} -@media only screen { - - #dark-mode-toggler:hover, - #dark-mode-toggler:focus { - color: var(--button--color-background-active); - border: 2px solid var(--button--color-text-active); - background-color: var(--button--color-text-active); - } -} -@media only screen { - - .is-IE #dark-mode-toggler { - display: none; - } -} +/* OS dark theme preference */ +@media only screen { + + .is-dark-theme.is-dark-theme { + --global--color-background: var(--global--color-dark-gray); + --global--color-primary: var(--global--color-light-gray); + --global--color-secondary: var(--global--color-light-gray); + --button--color-text: var(--global--color-background); + --button--color-text-hover: var(--global--color-secondary); + --button--color-text-active: var(--global--color-secondary); + --button--color-background: var(--global--color-secondary); + --button--color-background-active: var(--global--color-background); + --global--color-border: #9ea1a7; + + /* Block: Table */ + --table--stripes-border-color: rgba(240, 240, 240, 0.15); + --table--stripes-background-color: rgba(240, 240, 240, 0.15); + } + + .is-dark-theme.is-dark-theme img { + filter: brightness(0.85) contrast(1.1); + } + + .respect-color-scheme-preference.is-dark-theme body { + background-color: var(--global--color-background); + } + + #dark-mode-toggler { + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + font-size: var(--global--font-size-xs); + padding: 0.5em; + min-height: 44px; + min-width: max-content; + border: 2px solid currentColor; + box-shadow: none; + background: var(--button--color-text); + color: var(--button--color-background); + z-index: 9998; + } + + .no-js #dark-mode-toggler { + display: none; + } + + #dark-mode-toggler.fixed-bottom { + position: fixed; + bottom: 5px; + right: 5px; + transition: bottom 0.5s; + } + + #dark-mode-toggler.fixed-bottom.hide:not(:focus) { + bottom: -80px; + } + + #dark-mode-toggler.relative { + position: absolute; + height: 44px; + top: calc(2.4 * var(--global--spacing-vertical) - 44px); + right: calc(50vw - var(--responsive--alignwide-width) / 2 - 0.5em); + } + + .admin-bar #dark-mode-toggler.relative { + top: calc(2.4 * var(--global--spacing-vertical) - 44px + 32px); + } +} +@media only screen and (max-width: 782px) { + + .admin-bar #dark-mode-toggler.relative { + top: calc(2.4 * var(--global--spacing-vertical) - 44px + 46px); + } +} +@media only screen and (max-width: 481px) { + + .admin-bar #dark-mode-toggler.relative { + top: calc(2.4 * var(--global--spacing-vertical) - 44px + 26px); + } +} +@media only screen and (max-width: 481px) { + + body:not(.primary-navigation-open) #dark-mode-toggler.relative ~ nav { + top: calc(44px + 44px); + } +} +@media only screen { + + .primary-navigation-open #dark-mode-toggler { + display: none; + } +} +@media only screen { + + #dark-mode-toggler:hover, + #dark-mode-toggler:focus { + color: var(--button--color-background-active); + border: 2px solid var(--button--color-text-active); + background-color: var(--button--color-text-active); + } +} +@media only screen { + + .is-IE #dark-mode-toggler { + display: none; + } +} diff --git a/themes/twentytwentyone/assets/css/style-editor.css b/themes/twentytwentyone/assets/css/style-editor.css index d411fd3a..fc30ea7c 100644 --- a/themes/twentytwentyone/assets/css/style-editor.css +++ b/themes/twentytwentyone/assets/css/style-editor.css @@ -224,7 +224,7 @@ --widget--spacing-menu: calc(0.66 * var(--global--spacing-unit)); /* Admin-bar height */ - --global--admin-bar--height: 0; + --global--admin-bar--height: 0px; } .admin-bar { @@ -397,9 +397,9 @@ blockquote footer { } img { - display: block; height: auto; max-width: 100%; + vertical-align: middle; } /* Classic editor images */ @@ -488,9 +488,14 @@ a:hover { background: rgba(255, 255, 255, 0.9); } -.is-dark-theme .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button), +.is-dark-theme .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) { + background: var(--global--color-black); + color: var(--global--color-white); + text-decoration: none; +} + .is-dark-theme .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) .meta-nav { - color: var(--wp--style--color--link, var(--global--color-background)); + color: var(--wp--style--color--link, var(--global--color-white)); } .has-background-white .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) { @@ -514,6 +519,10 @@ a:hover { background-color: #f1f1f1; } +.site a:focus:not(.wp-block-button__link):not(.wp-block-file__button).custom-logo-link { + background: none; +} + .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) img { outline: 2px dotted var(--wp--style--color--link, var(--global--color-primary)); } @@ -524,31 +533,47 @@ a:hover { } .wp-block-button__link { - line-height: var(--button--line-height); - color: var(--button--color-text); + border: var(--button--border-width) solid transparent; + border-radius: var(--button--border-radius); cursor: pointer; font-weight: var(--button--font-weight); font-family: var(--button--font-family); font-size: var(--button--font-size); - background-color: var(--button--color-background); - border-radius: var(--button--border-radius); - border: var(--button--border-width) solid var(--button--color-background); - text-decoration: none; + line-height: var(--button--line-height); padding: var(--button--padding-vertical) var(--button--padding-horizontal); + text-decoration: none; } -.wp-block-button__link:focus { - background: transparent; - outline-offset: -6px; - outline: 2px dotted currentColor; +.wp-block-button__link:not(:hover):not(:active):not(.has-text-color) { + color: var(--global--color-background); +} + +.has-background .wp-block-button__link:not(:hover):not(:active):not(.has-text-color) { + color: var(--local--color-background, var(--global--color-primary)); } -.is-dark-theme .wp-block-button__link:focus { - color: var(--button--color-background); +.has-background .wp-block-button__link:not(:hover):not(:active):not(.has-text-color).has-background { + color: var(--global--color-primary); } -.wp-block-button__link:focus:not(.has-background) { - color: var(--button--color-text-hover); +.wp-block-button__link:not(:hover):not(:active):not(.has-background) { + background-color: var(--global--color-primary); +} + +.has-background .wp-block-button__link:not(:hover):not(:active):not(.has-background) { + background-color: var(--local--color-primary, var(--global--color-primary)); +} + +.wp-block-button__link:hover, +.wp-block-button__link:active { + background-color: transparent; + border-color: currentColor; + color: inherit; +} + +.wp-block-button__link:focus { + outline-offset: -6px; + outline: 2px dotted currentColor; } .wp-block-button__link:disabled { @@ -573,69 +598,81 @@ a:hover { margin-bottom: var(--global--spacing-vertical); } +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(:hover):not(:active):not(.has-text-color) { + color: var(--global--color-background); +} + +.has-background .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(:hover):not(:active):not(.has-text-color) { + color: var(--local--color-background, var(--global--color-background)); +} + +.has-background .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(:hover):not(:active):not(.has-text-color).has-background { + color: var(--global--color-primary); +} + +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(:hover):not(:active):not(.has-background) { + background-color: var(--global--color-primary); +} + +.has-background .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(:hover):not(:active):not(.has-background) { + background-color: var(--local--color-primary, var(--global--color-primary)); +} + +.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover, .wp-block-button:not(.is-style-outline) .wp-block-button__link:active { - color: var(--button--color-text-active) !important; - background: transparent !important; - border-color: var(--button--color-background); + border-color: currentColor !important; + background-color: transparent !important; + color: inherit !important; } -.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { - color: var(--button--color-text-hover) !important; - background: transparent !important; - border-color: var(--button--color-background); +.wp-block-button:not(.is-style-outline) .wp-block-button__link:focus { + outline-offset: inherit; + outline: inherit; } -.wp-block-button.is-style-outline .wp-block-button__link { - color: var(--button--color-background); - background: transparent; - border: var(--button--border-width) solid currentColor; - padding: var(--button--padding-vertical) var(--button--padding-horizontal); +.wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active):not(.has-text-color), +.wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active):not(.has-background), +.wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active).has-background { + border-color: currentColor; } -.wp-block-button.is-style-outline .wp-block-button__link:active, -.wp-block-button.is-style-outline .wp-block-button__link:hover { - background-color: var(--button--color-background); - color: var(--button--color-text); - border-color: var(--button--color-background); +.wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active):not(.has-text-color) { + color: var(--global--color-primary); } -.wp-block-button.is-style-outline .wp-block-button__link.has-background { - border-color: var(--button--color-background); +.has-background .wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active):not(.has-text-color) { + color: var(--local--color-primary, var(--global--color-primary)); } -.wp-block-button.is-style-outline .wp-block-button__link.has-background:active, -.wp-block-button.is-style-outline .wp-block-button__link.has-background:hover { - background-color: var(--button--color-background) !important; +.has-background .wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active).has-background:not(.has-text-color) { + color: inherit; } -.wp-block-button.is-style-outline .wp-block-button__link.has-background:not(.has-text-color) { - color: var(--global--color-dark-gray); +.wp-block-button.is-style-outline .wp-block-button__link:not(:hover):not(:active):not(.has-background) { + background-color: transparent; } -.wp-block-button.is-style-outline .wp-block-button__link.has-background.has-gray-background-color:not(.has-text-color), -.wp-block-button.is-style-outline .wp-block-button__link.has-background.has-dark-gray-background-color:not(.has-text-color), -.wp-block-button.is-style-outline .wp-block-button__link.has-background.has-black-background-color:not(.has-text-color) { - color: var(--global--color-white); +.wp-block-button.is-style-outline .wp-block-button__link:hover, +.wp-block-button.is-style-outline .wp-block-button__link:active { + background-color: var(--global--color-primary) !important; + border-color: transparent !important; + color: var(--global--color-background) !important; } -.is-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-background.has-white-background-color, -.is-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-background.has-green-background-color, -.is-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-background.has-blue-background-color, -.is-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-background.has-purple-background-color, -.is-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-background.has-red-background-color, -.is-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-background.has-orange-background-color, -.is-dark-theme .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-background.has-yellow-background-color { - color: var(--global--color-dark-gray); +.has-background .wp-block-button.is-style-outline .wp-block-button__link:hover, +.has-background .wp-block-button.is-style-outline .wp-block-button__link:active { + background-color: var(--local--color-primary, var(--global--color-primary)) !important; + color: var(--local--color-background, var(--global--color-background)) !important; } -.wp-block-button.is-style-outline .wp-block-button__link.has-text-color { - border-color: currentColor; +.has-text-color .wp-block-button.is-style-outline .wp-block-button__link:hover, +.has-text-color .wp-block-button.is-style-outline .wp-block-button__link:active { + color: var(--local--color-background, var(--global--color-background)) !important; } -.wp-block-button.is-style-outline .wp-block-button__link.has-text-color:active, -.wp-block-button.is-style-outline .wp-block-button__link.has-text-color:hover { - color: var(--button--color-text) !important; - border-color: var(--button--color-background); +.wp-block-button.is-style-outline .wp-block-button__link:focus { + outline-offset: inherit; + outline: inherit; } .wp-block-button.is-style-squared { @@ -648,7 +685,6 @@ a:hover { } .wp-block-code code { - font-size: var(--global--font-size-xs); white-space: pre !important; overflow-x: auto; } @@ -772,6 +808,11 @@ a:hover { border: calc(3 * var(--separator--height)) solid var(--global--color-border); } +.wp-block-cover[class*=-background-color][class] .wp-block-cover__inner-container, +.wp-block-cover-image[class*=-background-color][class] .wp-block-cover__inner-container { + background-color: unset; +} + .wp-block-columns:not(.alignwide):not(.alignfull) { clear: both; } @@ -848,32 +889,48 @@ a:hover { } .wp-block-file .wp-block-file__button { - line-height: var(--button--line-height); - color: var(--button--color-text); + border: var(--button--border-width) solid transparent; + border-radius: var(--button--border-radius); cursor: pointer; font-weight: var(--button--font-weight); font-family: var(--button--font-family); font-size: var(--button--font-size); - background-color: var(--button--color-background); - border-radius: var(--button--border-radius); - border: var(--button--border-width) solid var(--button--color-background); - text-decoration: none; + line-height: var(--button--line-height); padding: var(--button--padding-vertical) var(--button--padding-horizontal); + text-decoration: none; display: inline-block; } -.wp-block-file .wp-block-file__button:focus { - background: transparent; - outline-offset: -6px; - outline: 2px dotted currentColor; +.wp-block-file .wp-block-file__button:not(:hover):not(:active):not(.has-text-color) { + color: var(--global--color-background); } -.is-dark-theme .wp-block-file .wp-block-file__button:focus { - color: var(--button--color-background); +.has-background .wp-block-file .wp-block-file__button:not(:hover):not(:active):not(.has-text-color) { + color: var(--local--color-background, var(--global--color-primary)); } -.wp-block-file .wp-block-file__button:focus:not(.has-background) { - color: var(--button--color-text-hover); +.has-background .wp-block-file .wp-block-file__button:not(:hover):not(:active):not(.has-text-color).has-background { + color: var(--global--color-primary); +} + +.wp-block-file .wp-block-file__button:not(:hover):not(:active):not(.has-background) { + background-color: var(--global--color-primary); +} + +.has-background .wp-block-file .wp-block-file__button:not(:hover):not(:active):not(.has-background) { + background-color: var(--local--color-primary, var(--global--color-primary)); +} + +.wp-block-file .wp-block-file__button:hover, +.wp-block-file .wp-block-file__button:active { + background-color: transparent; + border-color: currentColor; + color: inherit; +} + +.wp-block-file .wp-block-file__button:focus { + outline-offset: -6px; + outline: 2px dotted currentColor; } .wp-block-file .wp-block-file__button:disabled { @@ -882,9 +939,9 @@ a:hover { color: var(--button--color-text-active); } -.wp-block-file .wp-block-file__button:hover { - color: var(--button--color-text-hover); - background: transparent; +.wp-block-file .wp-block-file__button:focus { + outline-offset: inherit; + outline: inherit; } .wp-block-gallery figcaption { @@ -1008,7 +1065,7 @@ h5[style*="--wp--typography--line-height"], .wp-block-heading h6[style*="--wp--typography--line-height"], h6[style*="--wp--typography--line-height"], .h6[style*="--wp--typography--line-height"] { - line-height: var(--wp--typography--line-height, --global--line-height-body); + line-height: var(--wp--typography--line-height, var(--global--line-height-body)); } .wp-block-heading h1, @@ -1368,7 +1425,7 @@ dt { } p { - line-height: var(--wp--typography--line-height, --global--line-height-body); + line-height: var(--wp--typography--line-height, var(--global--line-height-body)); } p.has-background { @@ -1747,6 +1804,7 @@ pre.wp-block-preformatted { margin-bottom: calc(var(--global--spacing-vertical) / 3); } +.wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper, .wp-block-search .wp-block-search__input { border: var(--form--border-width) solid var(--form--border-color); border-radius: var(--form--border-radius); @@ -1758,189 +1816,120 @@ pre.wp-block-preformatted { padding: var(--form--spacing-unit); } +.is-dark-theme .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper, .is-dark-theme .wp-block-search .wp-block-search__input { background: var(--global--color-white-90); } -.is-dark-theme .has-background.has-white-background-color .wp-block-search .wp-block-search__input, -.is-dark-theme .has-background.has-green-background-color .wp-block-search .wp-block-search__input, -.is-dark-theme .has-background.has-blue-background-color .wp-block-search .wp-block-search__input, -.is-dark-theme .has-background.has-purple-background-color .wp-block-search .wp-block-search__input, -.is-dark-theme .has-background.has-red-background-color .wp-block-search .wp-block-search__input, -.is-dark-theme .has-background.has-orange-background-color .wp-block-search .wp-block-search__input, -.is-dark-theme .has-background.has-yellow-background-color .wp-block-search .wp-block-search__input { - border-color: var(--form--color-text); -} - -.has-background.has-gray-background-color .wp-block-search .wp-block-search__input, -.has-background.has-dark-gray-background-color .wp-block-search .wp-block-search__input, -.has-background.has-black-background-color .wp-block-search .wp-block-search__input { - border-color: var(--global--color-white); +.has-background .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper, +.has-background .wp-block-search .wp-block-search__input { + border-color: var(--local--color-primary, var(--global--color-primary)) !important; } -.wp-block-search .wp-block-search__button { - line-height: var(--button--line-height); - color: var(--button--color-text); +.wp-block-search .wp-block-search__button.wp-block-search__button { + border: var(--button--border-width) solid transparent; + border-radius: var(--button--border-radius); cursor: pointer; font-weight: var(--button--font-weight); font-family: var(--button--font-family); font-size: var(--button--font-size); - background-color: var(--button--color-background); - border-radius: var(--button--border-radius); - border: var(--button--border-width) solid var(--button--color-background); - text-decoration: none; + line-height: var(--button--line-height); padding: var(--button--padding-vertical) var(--button--padding-horizontal); + text-decoration: none; box-shadow: none; margin-left: 0; - background-color: transparent; - color: var(--button--color-text-hover); } -.wp-block-search .wp-block-search__button:focus { - background: transparent; - outline-offset: -6px; - outline: 2px dotted currentColor; +.wp-block-search .wp-block-search__button.wp-block-search__button:not(:hover):not(:active):not(.has-text-color) { + color: var(--global--color-background); } -.is-dark-theme .wp-block-search .wp-block-search__button:focus { - color: var(--button--color-background); +.has-background .wp-block-search .wp-block-search__button.wp-block-search__button:not(:hover):not(:active):not(.has-text-color) { + color: var(--local--color-background, var(--global--color-primary)); } -.wp-block-search .wp-block-search__button:focus:not(.has-background) { - color: var(--button--color-text-hover); +.has-background .wp-block-search .wp-block-search__button.wp-block-search__button:not(:hover):not(:active):not(.has-text-color).has-background { + color: var(--global--color-primary); } -.wp-block-search .wp-block-search__button:disabled { - background-color: var(--global--color-white-50); - border-color: var(--global--color-white-50); - color: var(--button--color-text-active); +.wp-block-search .wp-block-search__button.wp-block-search__button:not(:hover):not(:active):not(.has-background) { + background-color: var(--global--color-primary); } -.wp-block-search .wp-block-search__button:hover { - color: var(--button--color-text); - background-color: var(--button--color-background); +.has-background .wp-block-search .wp-block-search__button.wp-block-search__button:not(:hover):not(:active):not(.has-background) { + background-color: var(--local--color-primary, var(--global--color-primary)); } -.wp-block-search .wp-block-search__button.has-icon { - padding: calc(2 * var(--button--padding-vertical)) calc(0.5 * var(--button--padding-horizontal)); +.wp-block-search .wp-block-search__button.wp-block-search__button:hover, +.wp-block-search .wp-block-search__button.wp-block-search__button:active { + background-color: transparent; + border-color: currentColor; + color: inherit; } -.wp-block-search .wp-block-search__button.has-icon svg { - width: 40px; - height: 40px; +.wp-block-search .wp-block-search__button.wp-block-search__button:focus { + outline-offset: -6px; + outline: 2px dotted currentColor; } -.has-background.has-gray-background-color .wp-block-search .wp-block-search__button, -.has-background.has-dark-gray-background-color .wp-block-search .wp-block-search__button, -.has-background.has-black-background-color .wp-block-search .wp-block-search__button { - color: var(--global--color-white); - border-color: currentColor; +.wp-block-search .wp-block-search__button.wp-block-search__button:disabled { + background-color: var(--global--color-white-50); + border-color: var(--global--color-white-50); + color: var(--button--color-text-active); } -.has-background.has-gray-background-color .wp-block-search .wp-block-search__button:hover, -.has-background.has-dark-gray-background-color .wp-block-search .wp-block-search__button:hover, -.has-background.has-black-background-color .wp-block-search .wp-block-search__button:hover { - color: var(--global--color-white); - background-color: var(--button--color-background); - border-color: var(--global--color-white); +.wp-block-search .wp-block-search__button.wp-block-search__button.has-icon { + padding: 6px calc(0.5 * var(--button--padding-horizontal)); + display: inherit; } -.is-dark-theme .has-background.has-gray-background-color .wp-block-search .wp-block-search__button:hover, -.is-dark-theme .has-background.has-dark-gray-background-color .wp-block-search .wp-block-search__button:hover, -.is-dark-theme .has-background.has-black-background-color .wp-block-search .wp-block-search__button:hover { - color: var(--button--color-text); - background-color: var(--button--color-background); +.wp-block-search .wp-block-search__button.wp-block-search__button.has-icon svg { + width: 40px; + height: 40px; } -.has-background.has-white-background-color .wp-block-search .wp-block-search__button:hover, -.has-background.has-green-background-color .wp-block-search .wp-block-search__button:hover, -.has-background.has-blue-background-color .wp-block-search .wp-block-search__button:hover, -.has-background.has-purple-background-color .wp-block-search .wp-block-search__button:hover, -.has-background.has-red-background-color .wp-block-search .wp-block-search__button:hover, -.has-background.has-orange-background-color .wp-block-search .wp-block-search__button:hover, -.has-background.has-yellow-background-color .wp-block-search .wp-block-search__button:hover { - color: var(--global--color-white); - background-color: var(--form--border-color); - border-color: var(--form--border-color); +.has-background .wp-block-search .wp-block-search__button.wp-block-search__button:hover, +.has-background .wp-block-search .wp-block-search__button.wp-block-search__button:active { + background-color: var(--local--color-background, var(--global--color-background)) !important; + color: var(--local--color-primary, var(--global--color-primary)) !important; } -.is-dark-theme .has-background.has-white-background-color .wp-block-search .wp-block-search__button, -.is-dark-theme .has-background.has-green-background-color .wp-block-search .wp-block-search__button, -.is-dark-theme .has-background.has-blue-background-color .wp-block-search .wp-block-search__button, -.is-dark-theme .has-background.has-purple-background-color .wp-block-search .wp-block-search__button, -.is-dark-theme .has-background.has-red-background-color .wp-block-search .wp-block-search__button, -.is-dark-theme .has-background.has-orange-background-color .wp-block-search .wp-block-search__button, -.is-dark-theme .has-background.has-yellow-background-color .wp-block-search .wp-block-search__button { - color: var(--form--color-text); - border-color: currentColor; +.has-text-color .wp-block-search .wp-block-search__button.wp-block-search__button:hover, +.has-text-color .wp-block-search .wp-block-search__button.wp-block-search__button:active { + color: var(--local--color-primary, var(--global--color-primary)) !important; } -.is-dark-theme .has-background.has-white-background-color .wp-block-search .wp-block-search__button:hover, -.is-dark-theme .has-background.has-green-background-color .wp-block-search .wp-block-search__button:hover, -.is-dark-theme .has-background.has-blue-background-color .wp-block-search .wp-block-search__button:hover, -.is-dark-theme .has-background.has-purple-background-color .wp-block-search .wp-block-search__button:hover, -.is-dark-theme .has-background.has-red-background-color .wp-block-search .wp-block-search__button:hover, -.is-dark-theme .has-background.has-orange-background-color .wp-block-search .wp-block-search__button:hover, -.is-dark-theme .has-background.has-yellow-background-color .wp-block-search .wp-block-search__button:hover { - color: var(--global--color-white); - background-color: var(--button--color-text); - border-color: var(--button--color-text); -} - -.wp-block-search.wp-block-search__button-inside .wp-block-search__input, -.has-background.has-white-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__input, -.has-background.has-green-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__input, -.has-background.has-blue-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__input, -.has-background.has-purple-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__input, -.has-background.has-red-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__input, -.has-background.has-orange-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__input, -.has-background.has-yellow-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__input { - border: none; +.wp-block-search .wp-block-search__button.wp-block-search__button:focus { + outline-offset: inherit; + outline: inherit; } -.wp-block-search.wp-block-search__button-inside.wp-block-search__text-button .wp-block-search__button { - padding: var(--button--padding-vertical) var(--button--padding-horizontal); +.wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper { + padding: var(--form--border-width); } -.is-dark-theme .wp-block-search.wp-block-search__button-inside .wp-block-search__button { - color: var(--button--color-text); - border-color: currentColor; +.wp-block-search.wp-block-search__button-inside .wp-block-search__input { + border: none; } -.is-dark-theme .wp-block-search.wp-block-search__button-inside .wp-block-search__button:hover { - color: var(--global--color-white); - background-color: var(--button--color-text); - border-color: var(--button--color-text); +.wp-block-search.wp-block-search__button-inside.wp-block-search__text-button .wp-block-search__button:hover, +.wp-block-search.wp-block-search__button-inside.wp-block-search__icon-button .wp-block-search__button:hover { + color: var(--global--color-dark-gray); } -.has-background.has-gray-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button, -.has-background.has-dark-gray-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button, -.has-background.has-black-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button { - color: var(--button--color-text-hover); - border-color: currentColor; +.is-dark-theme .wp-block-search.wp-block-search__button-inside.wp-block-search__text-button .wp-block-search__button, +.is-dark-theme .wp-block-search.wp-block-search__button-inside.wp-block-search__icon-button .wp-block-search__button { + color: var(--global--color-dark-gray); } -.has-background.has-gray-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button:hover, -.has-background.has-dark-gray-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button:hover, -.has-background.has-black-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button:hover { +.is-dark-theme .wp-block-search.wp-block-search__button-inside.wp-block-search__text-button .wp-block-search__button:hover, +.is-dark-theme .wp-block-search.wp-block-search__button-inside.wp-block-search__icon-button .wp-block-search__button:hover { + background-color: var(--global--color-dark-gray); color: var(--global--color-white); - background-color: var(--button--color-background); - border-color: var(--button--color-background); -} - -.is-dark-theme .has-background.has-gray-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button, -.is-dark-theme .has-background.has-dark-gray-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button, -.is-dark-theme .has-background.has-black-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button { - color: var(--button--color-text); - border-color: currentColor; } -.is-dark-theme .has-background.has-gray-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button:hover, -.is-dark-theme .has-background.has-dark-gray-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button:hover, -.is-dark-theme .has-background.has-black-background-color .wp-block-search.wp-block-search__button-inside .wp-block-search__button:hover { - color: var(--global--color-white); - background-color: var(--button--color-text); - border-color: var(--button--color-text); +.wp-block-search.wp-block-search__button-inside.wp-block-search__text-button .wp-block-search__button { + padding: var(--button--padding-vertical) var(--button--padding-horizontal); } .wp-block[data-align=center] > * { @@ -2350,42 +2339,92 @@ a { color: var(--global--color-black); } +.has-black-color[class] > [class*=__inner-container] { + --local--color-primary: var(--global--color-black, #000); + color: var(--local--color-primary); +} + .has-gray-color[class] { color: var(--global--color-gray); } +.has-gray-color[class] > [class*=__inner-container] { + --local--color-primary: var(--global--color-gray, #000); + color: var(--local--color-primary); +} + .has-dark-gray-color[class] { color: var(--global--color-dark-gray); } +.has-dark-gray-color[class] > [class*=__inner-container] { + --local--color-primary: var(--global--color-dark-gray, #000); + color: var(--local--color-primary); +} + .has-green-color[class] { color: var(--global--color-green); } +.has-green-color[class] > [class*=__inner-container] { + --local--color-primary: var(--global--color-green, #fff); + color: var(--local--color-primary); +} + .has-blue-color[class] { color: var(--global--color-blue); } +.has-blue-color[class] > [class*=__inner-container] { + --local--color-primary: var(--global--color-blue, #fff); + color: var(--local--color-primary); +} + .has-purple-color[class] { color: var(--global--color-purple); } +.has-purple-color[class] > [class*=__inner-container] { + --local--color-primary: var(--global--color-purple, #fff); + color: var(--local--color-primary); +} + .has-red-color[class] { color: var(--global--color-red); } +.has-red-color[class] > [class*=__inner-container] { + --local--color-primary: var(--global--color-red, #fff); + color: var(--local--color-primary); +} + .has-orange-color[class] { color: var(--global--color-orange); } +.has-orange-color[class] > [class*=__inner-container] { + --local--color-primary: var(--global--color-orange, #fff); + color: var(--local--color-primary); +} + .has-yellow-color[class] { color: var(--global--color-yellow); } +.has-yellow-color[class] > [class*=__inner-container] { + --local--color-primary: var(--global--color-yellow, #fff); + color: var(--local--color-primary); +} + .has-white-color[class] { color: var(--global--color-white); } +.has-white-color[class] > [class*=__inner-container] { + --local--color-primary: var(--global--color-white, #fff); + color: var(--local--color-primary); +} + .has-background a, .has-background p, .has-background h1, @@ -2401,58 +2440,151 @@ a { background-color: var(--global--color-black); } -.has-gray-background-color[class] { - background-color: var(--global--color-gray); +.has-black-background-color[class] > [class*=__inner-container] { + --local--color-background: var(--global--color-black, #000); + background-color: var(--local--color-background); } .has-dark-gray-background-color[class] { background-color: var(--global--color-dark-gray); } +.has-dark-gray-background-color[class] > [class*=__inner-container] { + --local--color-background: var(--global--color-dark-gray, #000); + background-color: var(--local--color-background); +} + +.has-gray-background-color[class] { + background-color: var(--global--color-gray); +} + +.has-gray-background-color[class] > [class*=__inner-container] { + --local--color-background: var(--global--color-gray, #000); + background-color: var(--local--color-background); +} + +.has-light-gray-background-color[class] { + background-color: var(--global--color-light-gray); +} + +.has-light-gray-background-color[class] > [class*=__inner-container] { + --local--color-background: var(--global--color-light-gray, #fff); + background-color: var(--local--color-background); +} + .has-green-background-color[class] { background-color: var(--global--color-green); } +.has-green-background-color[class] > [class*=__inner-container] { + --local--color-background: var(--global--color-green, #fff); + background-color: var(--local--color-background); +} + .has-blue-background-color[class] { background-color: var(--global--color-blue); } +.has-blue-background-color[class] > [class*=__inner-container] { + --local--color-background: var(--global--color-blue, #fff); + background-color: var(--local--color-background); +} + .has-purple-background-color[class] { background-color: var(--global--color-purple); } +.has-purple-background-color[class] > [class*=__inner-container] { + --local--color-background: var(--global--color-purple, #fff); + background-color: var(--local--color-background); +} + .has-red-background-color[class] { background-color: var(--global--color-red); } +.has-red-background-color[class] > [class*=__inner-container] { + --local--color-background: var(--global--color-red, #fff); + background-color: var(--local--color-background); +} + .has-orange-background-color[class] { background-color: var(--global--color-orange); } +.has-orange-background-color[class] > [class*=__inner-container] { + --local--color-background: var(--global--color-orange, #fff); + background-color: var(--local--color-background); +} + .has-yellow-background-color[class] { background-color: var(--global--color-yellow); } +.has-yellow-background-color[class] > [class*=__inner-container] { + --local--color-background: var(--global--color-yellow, #fff); + background-color: var(--local--color-background); +} + .has-white-background-color[class] { background-color: var(--global--color-white); } -:not(.has-text-color).has-black-background-color[class], -:not(.has-text-color).has-gray-background-color[class], -:not(.has-text-color).has-dark-gray-background-color[class] { +.has-white-background-color[class] > [class*=__inner-container] { + --local--color-background: var(--global--color-white, #fff); + background-color: var(--local--color-background); +} + +.has-background:not(.has-text-color).has-black-background-color[class], +.has-background:not(.has-text-color).has-gray-background-color[class], +.has-background:not(.has-text-color).has-dark-gray-background-color[class] { color: var(--global--color-white); } -:not(.has-text-color).has-green-background-color[class], -:not(.has-text-color).has-blue-background-color[class], -:not(.has-text-color).has-purple-background-color[class], -:not(.has-text-color).has-red-background-color[class], -:not(.has-text-color).has-orange-background-color[class], -:not(.has-text-color).has-yellow-background-color[class], -:not(.has-text-color).has-white-background-color[class] { +.has-background:not(.has-text-color).has-black-background-color[class] > [class*=__inner-container], +.has-background:not(.has-text-color).has-gray-background-color[class] > [class*=__inner-container], +.has-background:not(.has-text-color).has-dark-gray-background-color[class] > [class*=__inner-container] { + --local--color-primary: var(--global--color-background, #fff); + color: var(--local--color-primary, var(--global--color-primary)); +} + +.is-dark-theme .has-background:not(.has-text-color).has-black-background-color[class] > [class*=__inner-container], +.is-dark-theme .has-background:not(.has-text-color).has-gray-background-color[class] > [class*=__inner-container], +.is-dark-theme .has-background:not(.has-text-color).has-dark-gray-background-color[class] > [class*=__inner-container] { + --local--color-primary: var(--global--color-primary, #000); +} + +.has-background:not(.has-text-color).has-green-background-color[class], +.has-background:not(.has-text-color).has-blue-background-color[class], +.has-background:not(.has-text-color).has-purple-background-color[class], +.has-background:not(.has-text-color).has-red-background-color[class], +.has-background:not(.has-text-color).has-orange-background-color[class], +.has-background:not(.has-text-color).has-yellow-background-color[class], +.has-background:not(.has-text-color).has-white-background-color[class] { color: var(--global--color-dark-gray); } +.has-background:not(.has-text-color).has-green-background-color[class] > [class*=__inner-container], +.has-background:not(.has-text-color).has-blue-background-color[class] > [class*=__inner-container], +.has-background:not(.has-text-color).has-purple-background-color[class] > [class*=__inner-container], +.has-background:not(.has-text-color).has-red-background-color[class] > [class*=__inner-container], +.has-background:not(.has-text-color).has-orange-background-color[class] > [class*=__inner-container], +.has-background:not(.has-text-color).has-yellow-background-color[class] > [class*=__inner-container], +.has-background:not(.has-text-color).has-white-background-color[class] > [class*=__inner-container] { + --local--color-primary: var(--global--color-primary, #000); + color: var(--local--color-primary, var(--global--color-primary)); +} + +.is-dark-theme .has-background:not(.has-text-color).has-green-background-color[class] > [class*=__inner-container], +.is-dark-theme .has-background:not(.has-text-color).has-blue-background-color[class] > [class*=__inner-container], +.is-dark-theme .has-background:not(.has-text-color).has-purple-background-color[class] > [class*=__inner-container], +.is-dark-theme .has-background:not(.has-text-color).has-red-background-color[class] > [class*=__inner-container], +.is-dark-theme .has-background:not(.has-text-color).has-orange-background-color[class] > [class*=__inner-container], +.is-dark-theme .has-background:not(.has-text-color).has-yellow-background-color[class] > [class*=__inner-container], +.is-dark-theme .has-background:not(.has-text-color).has-white-background-color[class] > [class*=__inner-container] { + --local--color-primary: var(--global--color-background, #fff); +} + .has-purple-to-yellow-gradient-background { background: linear-gradient(160deg, var(--global--color-purple), var(--global--color-yellow)); } diff --git a/themes/twentytwentyone/assets/js/customize-helpers.js b/themes/twentytwentyone/assets/js/customize-helpers.js index 52558c40..6523860a 100644 --- a/themes/twentytwentyone/assets/js/customize-helpers.js +++ b/themes/twentytwentyone/assets/js/customize-helpers.js @@ -1,35 +1,35 @@ -/** - * Get luminance from a HEX color. - * - * @param {string} hex - The hex color. - * - * @return {number} - Returns the luminance, number between 0 and 255. - */ -function twentytwentyoneGetHexLum( hex ) { // jshint ignore:line - var rgb = twentytwentyoneGetRgbFromHex( hex ); - return Math.round( ( 0.2126 * rgb.r ) + ( 0.7152 * rgb.g ) + ( 0.0722 * rgb.b ) ); -} - -/** - * Get RGB from HEX. - * - * @param {string} hex - The hex color. - * - * @return {Object} - Returns an object {r, g, b} - */ -function twentytwentyoneGetRgbFromHex( hex ) { - var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, - result; - - // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF"). - hex = hex.replace( shorthandRegex, function( m, r, g, b ) { - return r.toString() + r.toString() + g.toString() + g.toString() + b.toString() + b.toString(); - } ); - - result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec( hex ); - return result ? { - r: parseInt( result[1], 16 ), - g: parseInt( result[2], 16 ), - b: parseInt( result[3], 16 ) - } : null; -} +/** + * Get luminance from a HEX color. + * + * @param {string} hex - The hex color. + * + * @return {number} - Returns the luminance, number between 0 and 255. + */ +function twentytwentyoneGetHexLum( hex ) { // jshint ignore:line + var rgb = twentytwentyoneGetRgbFromHex( hex ); + return Math.round( ( 0.2126 * rgb.r ) + ( 0.7152 * rgb.g ) + ( 0.0722 * rgb.b ) ); +} + +/** + * Get RGB from HEX. + * + * @param {string} hex - The hex color. + * + * @return {Object} - Returns an object {r, g, b} + */ +function twentytwentyoneGetRgbFromHex( hex ) { + var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, + result; + + // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF"). + hex = hex.replace( shorthandRegex, function( m, r, g, b ) { + return r.toString() + r.toString() + g.toString() + g.toString() + b.toString() + b.toString(); + } ); + + result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec( hex ); + return result ? { + r: parseInt( result[1], 16 ), + g: parseInt( result[2], 16 ), + b: parseInt( result[3], 16 ) + } : null; +} diff --git a/themes/twentytwentyone/assets/js/customize-preview.js b/themes/twentytwentyone/assets/js/customize-preview.js index c773a6e6..a9d9a6f6 100644 --- a/themes/twentytwentyone/assets/js/customize-preview.js +++ b/themes/twentytwentyone/assets/js/customize-preview.js @@ -1,62 +1,62 @@ -/* global twentytwentyoneGetHexLum, jQuery */ -( function() { - // Add listener for the "background_color" control. - wp.customize( 'background_color', function( value ) { - value.bind( function( to ) { - var lum = twentytwentyoneGetHexLum( to ), - isDark = 127 > lum, - textColor = ! isDark ? 'var(--global--color-dark-gray)' : 'var(--global--color-light-gray)', - tableColor = ! isDark ? 'var(--global--color-light-gray)' : 'var(--global--color-dark-gray)', - stylesheetID = 'twentytwentyone-customizer-inline-styles', - stylesheet, - styles; - - // Modify the html & body classes depending on whether this is a dark background or not. - if ( isDark ) { - document.body.classList.add( 'is-dark-theme' ); - document.documentElement.classList.add( 'is-dark-theme' ); - document.body.classList.remove( 'is-light-theme' ); - document.documentElement.classList.remove( 'is-light-theme' ); - document.documentElement.classList.remove( 'respect-color-scheme-preference' ); - } else { - document.body.classList.remove( 'is-dark-theme' ); - document.documentElement.classList.remove( 'is-dark-theme' ); - document.body.classList.add( 'is-light-theme' ); - document.documentElement.classList.add( 'is-light-theme' ); - if ( wp.customize( 'respect_user_color_preference' ).get() ) { - document.documentElement.classList.add( 'respect-color-scheme-preference' ); - } - } - - // Toggle the white background class. - if ( 225 <= lum ) { - document.body.classList.add( 'has-background-white' ); - } else { - document.body.classList.remove( 'has-background-white' ); - } - - stylesheet = jQuery( '#' + stylesheetID ); - styles = ''; - // If the stylesheet doesn't exist, create it and append it to . - if ( ! stylesheet.length ) { - jQuery( '#twenty-twenty-one-style-inline-css' ).after( '' ); - stylesheet = jQuery( '#' + stylesheetID ); - } - - // Generate the styles. - styles += '--global--color-primary:' + textColor + ';'; - styles += '--global--color-secondary:' + textColor + ';'; - styles += '--global--color-background:' + to + ';'; - - styles += '--button--color-background:' + textColor + ';'; - styles += '--button--color-text:' + to + ';'; - styles += '--button--color-text-hover:' + textColor + ';'; - - styles += '--table--stripes-border-color:' + tableColor + ';'; - styles += '--table--stripes-background-color:' + tableColor + ';'; - - // Add the styles. - stylesheet.html( ':root{' + styles + '}' ); - } ); - } ); -}() ); +/* global twentytwentyoneGetHexLum, jQuery */ +( function() { + // Add listener for the "background_color" control. + wp.customize( 'background_color', function( value ) { + value.bind( function( to ) { + var lum = twentytwentyoneGetHexLum( to ), + isDark = 127 > lum, + textColor = ! isDark ? 'var(--global--color-dark-gray)' : 'var(--global--color-light-gray)', + tableColor = ! isDark ? 'var(--global--color-light-gray)' : 'var(--global--color-dark-gray)', + stylesheetID = 'twentytwentyone-customizer-inline-styles', + stylesheet, + styles; + + // Modify the html & body classes depending on whether this is a dark background or not. + if ( isDark ) { + document.body.classList.add( 'is-dark-theme' ); + document.documentElement.classList.add( 'is-dark-theme' ); + document.body.classList.remove( 'is-light-theme' ); + document.documentElement.classList.remove( 'is-light-theme' ); + document.documentElement.classList.remove( 'respect-color-scheme-preference' ); + } else { + document.body.classList.remove( 'is-dark-theme' ); + document.documentElement.classList.remove( 'is-dark-theme' ); + document.body.classList.add( 'is-light-theme' ); + document.documentElement.classList.add( 'is-light-theme' ); + if ( wp.customize( 'respect_user_color_preference' ).get() ) { + document.documentElement.classList.add( 'respect-color-scheme-preference' ); + } + } + + // Toggle the white background class. + if ( 225 <= lum ) { + document.body.classList.add( 'has-background-white' ); + } else { + document.body.classList.remove( 'has-background-white' ); + } + + stylesheet = jQuery( '#' + stylesheetID ); + styles = ''; + // If the stylesheet doesn't exist, create it and append it to . + if ( ! stylesheet.length ) { + jQuery( '#twenty-twenty-one-style-inline-css' ).after( '' ); + stylesheet = jQuery( '#' + stylesheetID ); + } + + // Generate the styles. + styles += '--global--color-primary:' + textColor + ';'; + styles += '--global--color-secondary:' + textColor + ';'; + styles += '--global--color-background:' + to + ';'; + + styles += '--button--color-background:' + textColor + ';'; + styles += '--button--color-text:' + to + ';'; + styles += '--button--color-text-hover:' + textColor + ';'; + + styles += '--table--stripes-border-color:' + tableColor + ';'; + styles += '--table--stripes-background-color:' + tableColor + ';'; + + // Add the styles. + stylesheet.html( ':root{' + styles + '}' ); + } ); + } ); +}() ); diff --git a/themes/twentytwentyone/assets/js/dark-mode-toggler.js b/themes/twentytwentyone/assets/js/dark-mode-toggler.js index 22f5e3e1..f5519d06 100644 --- a/themes/twentytwentyone/assets/js/dark-mode-toggler.js +++ b/themes/twentytwentyone/assets/js/dark-mode-toggler.js @@ -44,7 +44,9 @@ function darkModeInitialLoad() { } function darkModeRepositionTogglerOnScroll() { - var prevScroll = window.scrollY || document.documentElement.scrollTop, + + var toggler = document.getElementById( 'dark-mode-toggler' ), + prevScroll = window.scrollY || document.documentElement.scrollTop, currentScroll, checkScroll = function() { @@ -53,13 +55,16 @@ function darkModeRepositionTogglerOnScroll() { currentScroll + ( window.innerHeight * 1.5 ) > document.body.clientHeight || currentScroll < prevScroll ) { - document.getElementById( 'dark-mode-toggler' ).classList.remove( 'hide' ); + toggler.classList.remove( 'hide' ); } else if ( currentScroll > prevScroll && 250 < currentScroll ) { - document.getElementById( 'dark-mode-toggler' ).classList.add( 'hide' ); + toggler.classList.add( 'hide' ); } prevScroll = currentScroll; }; - window.addEventListener( 'scroll', checkScroll ); + + if ( toggler ) { + window.addEventListener( 'scroll', checkScroll ); + } } darkModeInitialLoad(); diff --git a/themes/twentytwentyone/assets/js/editor.js b/themes/twentytwentyone/assets/js/editor.js index c7b149dc..b94c97c1 100644 --- a/themes/twentytwentyone/assets/js/editor.js +++ b/themes/twentytwentyone/assets/js/editor.js @@ -1,38 +1,38 @@ -/* global setTimeout */ -wp.domReady( function() { - // Unregister "Wide" Separator Style. - wp.blocks.unregisterBlockStyle( 'core/separator', 'wide' ); - - // Add to ".block-editor__typewriter" the "is-dark-theme" class if needed. - function twentytwentyoneCopyDarkThemeClass() { - var editor, - attemptDelay = 25, - attempt = 0, - maxAttempts = 10; - - if ( ! document.body.classList.contains( 'is-dark-theme' ) ) { - return; - } - - editor = document.querySelector( '.block-editor__typewriter' ); - if ( null === editor ) { - // Try again. - if ( attempt < maxAttempts ) { - setTimeout( function() { - twentytwentyoneCopyDarkThemeClass(); - }, attemptDelay ); - - // Increment the attempts counter. - attempt++; - - // Double the delay, give the server some time to breathe. - attemptDelay *= 2; - } - return; - } - - editor.classList.add( 'is-dark-theme' ); - } - - twentytwentyoneCopyDarkThemeClass(); -} ); +/* global setTimeout */ +wp.domReady( function() { + // Unregister "Wide" Separator Style. + wp.blocks.unregisterBlockStyle( 'core/separator', 'wide' ); + + // Add to ".block-editor__typewriter" the "is-dark-theme" class if needed. + function twentytwentyoneCopyDarkThemeClass() { + var editor, + attemptDelay = 25, + attempt = 0, + maxAttempts = 10; + + if ( ! document.body.classList.contains( 'is-dark-theme' ) ) { + return; + } + + editor = document.querySelector( '.block-editor__typewriter' ); + if ( null === editor ) { + // Try again. + if ( attempt < maxAttempts ) { + setTimeout( function() { + twentytwentyoneCopyDarkThemeClass(); + }, attemptDelay ); + + // Increment the attempts counter. + attempt++; + + // Double the delay, give the server some time to breathe. + attemptDelay *= 2; + } + return; + } + + editor.classList.add( 'is-dark-theme' ); + } + + twentytwentyoneCopyDarkThemeClass(); +} ); diff --git a/themes/twentytwentyone/assets/js/palette-colorpicker.js b/themes/twentytwentyone/assets/js/palette-colorpicker.js index 0357f1e1..89271f33 100644 --- a/themes/twentytwentyone/assets/js/palette-colorpicker.js +++ b/themes/twentytwentyone/assets/js/palette-colorpicker.js @@ -1,53 +1,53 @@ -/** - * Script for our custom colorpicker control. - * - * This is copied from wp-admin/js/customize-controls.js - * with a few tweaks: - * Removed the hue picker script because we don't use it here - * Added the "palettes" argument in wpColorPicker(). - */ -wp.customize.controlConstructor['twenty-twenty-one-color'] = wp.customize.Control.extend( { - ready: function() { - var control = this, - updating = false, - picker; - - picker = this.container.find( '.color-picker-hex' ); - picker.val( control.setting() ).wpColorPicker( { - palettes: control.params.palette, - change: function() { - updating = true; - control.setting.set( picker.wpColorPicker( 'color' ) ); - updating = false; - }, - clear: function() { - updating = true; - control.setting.set( '' ); - updating = false; - } - } ); - - control.setting.bind( function( value ) { - // Bail if the update came from the control itself. - if ( updating ) { - return; - } - picker.val( value ); - picker.wpColorPicker( 'color', value ); - } ); - - // Collapse color picker when hitting Esc instead of collapsing the current section. - control.container.on( 'keydown', function( event ) { - var pickerContainer; - if ( 27 !== event.which ) { // Esc. - return; - } - pickerContainer = control.container.find( '.wp-picker-container' ); - if ( pickerContainer.hasClass( 'wp-picker-active' ) ) { - picker.wpColorPicker( 'close' ); - control.container.find( '.wp-color-result' ).focus(); - event.stopPropagation(); // Prevent section from being collapsed. - } - } ); - } -} ); +/** + * Script for our custom colorpicker control. + * + * This is copied from wp-admin/js/customize-controls.js + * with a few tweaks: + * Removed the hue picker script because we don't use it here + * Added the "palettes" argument in wpColorPicker(). + */ +wp.customize.controlConstructor['twenty-twenty-one-color'] = wp.customize.Control.extend( { + ready: function() { + var control = this, + updating = false, + picker; + + picker = this.container.find( '.color-picker-hex' ); + picker.val( control.setting() ).wpColorPicker( { + palettes: control.params.palette, + change: function() { + updating = true; + control.setting.set( picker.wpColorPicker( 'color' ) ); + updating = false; + }, + clear: function() { + updating = true; + control.setting.set( '' ); + updating = false; + } + } ); + + control.setting.bind( function( value ) { + // Bail if the update came from the control itself. + if ( updating ) { + return; + } + picker.val( value ); + picker.wpColorPicker( 'color', value ); + } ); + + // Collapse color picker when hitting Esc instead of collapsing the current section. + control.container.on( 'keydown', function( event ) { + var pickerContainer; + if ( 27 !== event.which ) { // Esc. + return; + } + pickerContainer = control.container.find( '.wp-picker-container' ); + if ( pickerContainer.hasClass( 'wp-picker-active' ) ) { + picker.wpColorPicker( 'close' ); + control.container.find( '.wp-color-result' ).focus(); + event.stopPropagation(); // Prevent section from being collapsed. + } + } ); + } +} ); diff --git a/themes/twentytwentyone/assets/js/polyfills.js b/themes/twentytwentyone/assets/js/polyfills.js index f40f8874..8c3a5cf9 100644 --- a/themes/twentytwentyone/assets/js/polyfills.js +++ b/themes/twentytwentyone/assets/js/polyfills.js @@ -1,42 +1,42 @@ -/** - * File polyfills.js. - * - * Polyfills for IE11. - */ - -/** - * Polyfill for Element.closest() because we need to support IE11. - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest - */ -if ( ! Element.prototype.matches ) { - Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; -} - -if ( ! Element.prototype.closest ) { - Element.prototype.closest = function( s ) { - var el = this; - do { - if ( Element.prototype.matches.call( el, s ) ) { - return el; - } - el = el.parentElement || el.parentNode; - } while ( el !== null && el.nodeType === 1 ); - return null; - }; -} - -/** - * Polyfill for NodeList.foreach() because we need to support IE11. - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach - */ -if ( window.NodeList && ! NodeList.prototype.forEach ) { - NodeList.prototype.forEach = function( callback, thisArg ) { - var i; - thisArg = thisArg || window; - for ( i = 0; i < this.length; i++ ) { - callback.call( thisArg, this[i], i, this ); - } - }; -} +/** + * File polyfills.js. + * + * Polyfills for IE11. + */ + +/** + * Polyfill for Element.closest() because we need to support IE11. + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest + */ +if ( ! Element.prototype.matches ) { + Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; +} + +if ( ! Element.prototype.closest ) { + Element.prototype.closest = function( s ) { + var el = this; + do { + if ( Element.prototype.matches.call( el, s ) ) { + return el; + } + el = el.parentElement || el.parentNode; + } while ( el !== null && el.nodeType === 1 ); + return null; + }; +} + +/** + * Polyfill for NodeList.foreach() because we need to support IE11. + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach + */ +if ( window.NodeList && ! NodeList.prototype.forEach ) { + NodeList.prototype.forEach = function( callback, thisArg ) { + var i; + thisArg = thisArg || window; + for ( i = 0; i < this.length; i++ ) { + callback.call( thisArg, this[i], i, this ); + } + }; +} diff --git a/themes/twentytwentyone/assets/js/primary-navigation.js b/themes/twentytwentyone/assets/js/primary-navigation.js index 187c2422..ec559619 100644 --- a/themes/twentytwentyone/assets/js/primary-navigation.js +++ b/themes/twentytwentyone/assets/js/primary-navigation.js @@ -1,184 +1,184 @@ -/** - * File primary-navigation.js. - * - * Required to open and close the mobile navigation. - */ - -/** - * Toggle an attribute's value - * - * @param {Element} el - The element. - * @param {boolean} withListeners - Whether we want to add/remove listeners or not. - * @since Twenty Twenty-One 1.0 - */ -function twentytwentyoneToggleAriaExpanded( el, withListeners ) { - if ( 'true' !== el.getAttribute( 'aria-expanded' ) ) { - el.setAttribute( 'aria-expanded', 'true' ); - twentytwentyoneSubmenuPosition( el.parentElement ); - if ( withListeners ) { - document.addEventListener( 'click', twentytwentyoneCollapseMenuOnClickOutside ); - } - } else { - el.setAttribute( 'aria-expanded', 'false' ); - if ( withListeners ) { - document.removeEventListener( 'click', twentytwentyoneCollapseMenuOnClickOutside ); - } - } -} - -function twentytwentyoneCollapseMenuOnClickOutside( event ) { - if ( ! document.getElementById( 'site-navigation' ).contains( event.target ) ) { - document.getElementById( 'site-navigation' ).querySelectorAll( '.sub-menu-toggle' ).forEach( function( button ) { - button.setAttribute( 'aria-expanded', 'false' ); - } ); - } -} - -/** - * Changes the position of submenus so they always fit the screen horizontally. - * - * @param {Element} li - The li element. - */ -function twentytwentyoneSubmenuPosition( li ) { - var subMenu = li.querySelector( 'ul.sub-menu' ), - rect, - right, - left, - windowWidth; - - if ( ! subMenu ) { - return; - } - - rect = subMenu.getBoundingClientRect(); - right = Math.round( rect.right ); - left = Math.round( rect.left ); - windowWidth = Math.round( window.innerWidth ); - - if ( right > windowWidth ) { - subMenu.classList.add( 'submenu-reposition-right' ); - } else if ( document.body.classList.contains( 'rtl' ) && left < 0 ) { - subMenu.classList.add( 'submenu-reposition-left' ); - } -} - -/** - * Handle clicks on submenu toggles. - * - * @param {Element} el - The element. - */ -function twentytwentyoneExpandSubMenu( el ) { // jshint ignore:line - // Close other expanded items. - el.closest( 'nav' ).querySelectorAll( '.sub-menu-toggle' ).forEach( function( button ) { - if ( button !== el ) { - button.setAttribute( 'aria-expanded', 'false' ); - } - } ); - - // Toggle aria-expanded on the button. - twentytwentyoneToggleAriaExpanded( el, true ); - - // On tab-away collapse the menu. - el.parentNode.querySelectorAll( 'ul > li:last-child > a' ).forEach( function( linkEl ) { - linkEl.addEventListener( 'blur', function( event ) { - if ( ! el.parentNode.contains( event.relatedTarget ) ) { - el.setAttribute( 'aria-expanded', 'false' ); - } - } ); - } ); -} - -( function() { - /** - * Menu Toggle Behaviors - * - * @param {string} id - The ID. - */ - var navMenu = function( id ) { - var wrapper = document.body, // this is the element to which a CSS class is added when a mobile nav menu is open - mobileButton = document.getElementById( id + '-mobile-menu' ); - - if ( mobileButton ) { - mobileButton.onclick = function() { - wrapper.classList.toggle( id + '-navigation-open' ); - wrapper.classList.toggle( 'lock-scrolling' ); - twentytwentyoneToggleAriaExpanded( mobileButton ); - mobileButton.focus(); - }; - } - /** - * Trap keyboard navigation in the menu modal. - * Adapted from TwentyTwenty - */ - document.addEventListener( 'keydown', function( event ) { - var modal, elements, selectors, lastEl, firstEl, activeEl, tabKey, shiftKey, escKey; - if ( ! wrapper.classList.contains( id + '-navigation-open' ) ) { - return; - } - - modal = document.querySelector( '.' + id + '-navigation' ); - selectors = 'input, a, button'; - elements = modal.querySelectorAll( selectors ); - elements = Array.prototype.slice.call( elements ); - tabKey = event.keyCode === 9; - shiftKey = event.shiftKey; - escKey = event.keyCode === 27; - activeEl = document.activeElement; // eslint-disable-line @wordpress/no-global-active-element - lastEl = elements[ elements.length - 1 ]; - firstEl = elements[0]; - - if ( escKey ) { - event.preventDefault(); - wrapper.classList.remove( id + '-navigation-open', 'lock-scrolling' ); - twentytwentyoneToggleAriaExpanded( mobileButton ); - mobileButton.focus(); - } - - if ( ! shiftKey && tabKey && lastEl === activeEl ) { - event.preventDefault(); - firstEl.focus(); - } - - if ( shiftKey && tabKey && firstEl === activeEl ) { - event.preventDefault(); - lastEl.focus(); - } - - // If there are no elements in the menu, don't move the focus - if ( tabKey && firstEl === lastEl ) { - event.preventDefault(); - } - } ); - - /** - * Close menu and scroll to anchor when an anchor link is clicked. - * Adapted from TwentyTwenty. - */ - document.addEventListener( 'click', function( event ) { - // If target onclick is with # within the href attribute - if ( event.target.hash && event.target.hash.includes( '#' ) ) { - wrapper.classList.remove( id + '-navigation-open', 'lock-scrolling' ); - twentytwentyoneToggleAriaExpanded( mobileButton ); - // Wait 550 and scroll to the anchor. - setTimeout(function () { - var anchor = document.getElementById(event.target.hash.slice(1)); - anchor.scrollIntoView(); - }, 550); - } - } ); - - document.getElementById( 'site-navigation' ).querySelectorAll( '.menu-wrapper > .menu-item-has-children' ).forEach( function( li ) { - li.addEventListener( 'mouseenter', function() { - this.querySelector( '.sub-menu-toggle' ).setAttribute( 'aria-expanded', 'true' ); - twentytwentyoneSubmenuPosition( li ); - } ); - li.addEventListener( 'mouseleave', function() { - this.querySelector( '.sub-menu-toggle' ).setAttribute( 'aria-expanded', 'false' ); - } ); - } ); - }; - - window.addEventListener( 'load', function() { - new navMenu( 'primary' ); - } ); -}() ); +/** + * File primary-navigation.js. + * + * Required to open and close the mobile navigation. + */ + +/** + * Toggle an attribute's value + * + * @param {Element} el - The element. + * @param {boolean} withListeners - Whether we want to add/remove listeners or not. + * @since Twenty Twenty-One 1.0 + */ +function twentytwentyoneToggleAriaExpanded( el, withListeners ) { + if ( 'true' !== el.getAttribute( 'aria-expanded' ) ) { + el.setAttribute( 'aria-expanded', 'true' ); + twentytwentyoneSubmenuPosition( el.parentElement ); + if ( withListeners ) { + document.addEventListener( 'click', twentytwentyoneCollapseMenuOnClickOutside ); + } + } else { + el.setAttribute( 'aria-expanded', 'false' ); + if ( withListeners ) { + document.removeEventListener( 'click', twentytwentyoneCollapseMenuOnClickOutside ); + } + } +} + +function twentytwentyoneCollapseMenuOnClickOutside( event ) { + if ( ! document.getElementById( 'site-navigation' ).contains( event.target ) ) { + document.getElementById( 'site-navigation' ).querySelectorAll( '.sub-menu-toggle' ).forEach( function( button ) { + button.setAttribute( 'aria-expanded', 'false' ); + } ); + } +} + +/** + * Changes the position of submenus so they always fit the screen horizontally. + * + * @param {Element} li - The li element. + */ +function twentytwentyoneSubmenuPosition( li ) { + var subMenu = li.querySelector( 'ul.sub-menu' ), + rect, + right, + left, + windowWidth; + + if ( ! subMenu ) { + return; + } + + rect = subMenu.getBoundingClientRect(); + right = Math.round( rect.right ); + left = Math.round( rect.left ); + windowWidth = Math.round( window.innerWidth ); + + if ( right > windowWidth ) { + subMenu.classList.add( 'submenu-reposition-right' ); + } else if ( document.body.classList.contains( 'rtl' ) && left < 0 ) { + subMenu.classList.add( 'submenu-reposition-left' ); + } +} + +/** + * Handle clicks on submenu toggles. + * + * @param {Element} el - The element. + */ +function twentytwentyoneExpandSubMenu( el ) { // jshint ignore:line + // Close other expanded items. + el.closest( 'nav' ).querySelectorAll( '.sub-menu-toggle' ).forEach( function( button ) { + if ( button !== el ) { + button.setAttribute( 'aria-expanded', 'false' ); + } + } ); + + // Toggle aria-expanded on the button. + twentytwentyoneToggleAriaExpanded( el, true ); + + // On tab-away collapse the menu. + el.parentNode.querySelectorAll( 'ul > li:last-child > a' ).forEach( function( linkEl ) { + linkEl.addEventListener( 'blur', function( event ) { + if ( ! el.parentNode.contains( event.relatedTarget ) ) { + el.setAttribute( 'aria-expanded', 'false' ); + } + } ); + } ); +} + +( function() { + /** + * Menu Toggle Behaviors + * + * @param {string} id - The ID. + */ + var navMenu = function( id ) { + var wrapper = document.body, // this is the element to which a CSS class is added when a mobile nav menu is open + mobileButton = document.getElementById( id + '-mobile-menu' ); + + if ( mobileButton ) { + mobileButton.onclick = function() { + wrapper.classList.toggle( id + '-navigation-open' ); + wrapper.classList.toggle( 'lock-scrolling' ); + twentytwentyoneToggleAriaExpanded( mobileButton ); + mobileButton.focus(); + }; + } + /** + * Trap keyboard navigation in the menu modal. + * Adapted from TwentyTwenty + */ + document.addEventListener( 'keydown', function( event ) { + var modal, elements, selectors, lastEl, firstEl, activeEl, tabKey, shiftKey, escKey; + if ( ! wrapper.classList.contains( id + '-navigation-open' ) ) { + return; + } + + modal = document.querySelector( '.' + id + '-navigation' ); + selectors = 'input, a, button'; + elements = modal.querySelectorAll( selectors ); + elements = Array.prototype.slice.call( elements ); + tabKey = event.keyCode === 9; + shiftKey = event.shiftKey; + escKey = event.keyCode === 27; + activeEl = document.activeElement; // eslint-disable-line @wordpress/no-global-active-element + lastEl = elements[ elements.length - 1 ]; + firstEl = elements[0]; + + if ( escKey ) { + event.preventDefault(); + wrapper.classList.remove( id + '-navigation-open', 'lock-scrolling' ); + twentytwentyoneToggleAriaExpanded( mobileButton ); + mobileButton.focus(); + } + + if ( ! shiftKey && tabKey && lastEl === activeEl ) { + event.preventDefault(); + firstEl.focus(); + } + + if ( shiftKey && tabKey && firstEl === activeEl ) { + event.preventDefault(); + lastEl.focus(); + } + + // If there are no elements in the menu, don't move the focus + if ( tabKey && firstEl === lastEl ) { + event.preventDefault(); + } + } ); + + /** + * Close menu and scroll to anchor when an anchor link is clicked. + * Adapted from TwentyTwenty. + */ + document.addEventListener( 'click', function( event ) { + // If target onclick is with # within the href attribute + if ( event.target.hash && event.target.hash.includes( '#' ) ) { + wrapper.classList.remove( id + '-navigation-open', 'lock-scrolling' ); + twentytwentyoneToggleAriaExpanded( mobileButton ); + // Wait 550 and scroll to the anchor. + setTimeout(function () { + var anchor = document.getElementById(event.target.hash.slice(1)); + anchor.scrollIntoView(); + }, 550); + } + } ); + + document.getElementById( 'site-navigation' ).querySelectorAll( '.menu-wrapper > .menu-item-has-children' ).forEach( function( li ) { + li.addEventListener( 'mouseenter', function() { + this.querySelector( '.sub-menu-toggle' ).setAttribute( 'aria-expanded', 'true' ); + twentytwentyoneSubmenuPosition( li ); + } ); + li.addEventListener( 'mouseleave', function() { + this.querySelector( '.sub-menu-toggle' ).setAttribute( 'aria-expanded', 'false' ); + } ); + } ); + }; + + window.addEventListener( 'load', function() { + new navMenu( 'primary' ); + } ); +}() ); diff --git a/themes/twentytwentyone/assets/js/skip-link-focus-fix.js b/themes/twentytwentyone/assets/js/skip-link-focus-fix.js index f51f70d4..ed4676e6 100644 --- a/themes/twentytwentyone/assets/js/skip-link-focus-fix.js +++ b/themes/twentytwentyone/assets/js/skip-link-focus-fix.js @@ -1,33 +1,33 @@ -/** - * File skip-link-focus-fix.js. - * - * Helps with accessibility for keyboard only users. - * - * This is the source file for what is minified in the twenty_twenty_one_skip_link_focus_fix() PHP function. - * - * Learn more: https://git.io/vWdr2 - */ -( function() { - var isIe = /(trident|msie)/i.test( navigator.userAgent ); - - if ( isIe && document.getElementById && window.addEventListener ) { - window.addEventListener( 'hashchange', function() { - var id = location.hash.substring( 1 ), - element; - - if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) { - return; - } - - element = document.getElementById( id ); - - if ( element ) { - if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) { - element.tabIndex = -1; - } - - element.focus(); - } - }, false ); - } -}() ); +/** + * File skip-link-focus-fix.js. + * + * Helps with accessibility for keyboard only users. + * + * This is the source file for what is minified in the twenty_twenty_one_skip_link_focus_fix() PHP function. + * + * Learn more: https://git.io/vWdr2 + */ +( function() { + var isIe = /(trident|msie)/i.test( navigator.userAgent ); + + if ( isIe && document.getElementById && window.addEventListener ) { + window.addEventListener( 'hashchange', function() { + var id = location.hash.substring( 1 ), + element; + + if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) { + return; + } + + element = document.getElementById( id ); + + if ( element ) { + if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) { + element.tabIndex = -1; + } + + element.focus(); + } + }, false ); + } +}() ); diff --git a/themes/twentytwentyone/assets/sass/01-settings/file-header.scss b/themes/twentytwentyone/assets/sass/01-settings/file-header.scss index a9d35942..9de47ffb 100644 --- a/themes/twentytwentyone/assets/sass/01-settings/file-header.scss +++ b/themes/twentytwentyone/assets/sass/01-settings/file-header.scss @@ -1,18 +1,18 @@ -/* -Theme Name: Twenty Twenty-One -Theme URI: https://wordpress.org/themes/twentytwentyone/ -Author: the WordPress team -Author URI: https://wordpress.org/ -Description: Twenty Twenty-One is a blank canvas for your ideas and it makes the block editor your best brush. With new block patterns, which allow you to create a beautiful layout in a matter of seconds, this theme’s soft colors and eye-catching — yet timeless — design will let your work shine. Take it for a spin! See how Twenty Twenty-One elevates your portfolio, business website, or personal blog. -Requires at least: 5.3 -Tested up to: 5.6 -Requires PHP: 5.6 -Version: 1.1 -License: GNU General Public License v2 or later -License URI: http://www.gnu.org/licenses/gpl-2.0.html -Text Domain: twentytwentyone -Tags: one-column, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready - -Twenty Twenty-One WordPress Theme, (C) 2020 WordPress.org -Twenty Twenty-One is distributed under the terms of the GNU GPL. -*/ +/* +Theme Name: Twenty Twenty-One +Theme URI: https://wordpress.org/themes/twentytwentyone/ +Author: the WordPress team +Author URI: https://wordpress.org/ +Description: Twenty Twenty-One is a blank canvas for your ideas and it makes the block editor your best brush. With new block patterns, which allow you to create a beautiful layout in a matter of seconds, this theme’s soft colors and eye-catching — yet timeless — design will let your work shine. Take it for a spin! See how Twenty Twenty-One elevates your portfolio, business website, or personal blog. +Requires at least: 5.3 +Tested up to: 5.6 +Requires PHP: 5.6 +Version: 1.2 +License: GNU General Public License v2 or later +License URI: http://www.gnu.org/licenses/gpl-2.0.html +Text Domain: twentytwentyone +Tags: one-column, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready + +Twenty Twenty-One WordPress Theme, (C) 2020 WordPress.org +Twenty Twenty-One is distributed under the terms of the GNU GPL. +*/ diff --git a/themes/twentytwentyone/assets/sass/01-settings/fonts.scss b/themes/twentytwentyone/assets/sass/01-settings/fonts.scss index 20be2b72..6eba5e21 100644 --- a/themes/twentytwentyone/assets/sass/01-settings/fonts.scss +++ b/themes/twentytwentyone/assets/sass/01-settings/fonts.scss @@ -1 +1 @@ -// Do we need to serve a font? Add the @font-face styles here. +// Do we need to serve a font? Add the @font-face styles here. diff --git a/themes/twentytwentyone/assets/sass/01-settings/global.scss b/themes/twentytwentyone/assets/sass/01-settings/global.scss index a60c128c..91d84525 100644 --- a/themes/twentytwentyone/assets/sass/01-settings/global.scss +++ b/themes/twentytwentyone/assets/sass/01-settings/global.scss @@ -1,249 +1,249 @@ -/* Variables */ - -// Vertical Rhythm Multiplier -$baseline-unit: 10px; - -:root { - - /* Font Family */ - --global--font-primary: var(--font-headings, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); - --global--font-secondary: var(--font-base, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); - - /* Font Size */ - --global--font-size-base: 1.25rem; // 20px / 16px - --global--font-size-xs: 1rem; // 16px / 16px - --global--font-size-sm: 1.125rem; // 18px / 16px - --global--font-size-md: 1.25rem; // 20px / 16px - --global--font-size-lg: 1.5rem; // 24px / 16px - --global--font-size-xl: 2.25rem; // 36px / 16px - --global--font-size-xxl: 4rem; // 64px / 16px - --global--font-size-xxxl: 5rem; // 80px / 16px - --global--font-size-page-title: var(--global--font-size-xxl); - --global--letter-spacing: normal; - - /* Line Height */ - --global--line-height-body: 1.7; - --global--line-height-heading: 1.3; - --global--line-height-page-title: 1.1; - - /* Headings */ - --heading--font-family: var(--global--font-primary); - - --heading--font-size-h6: var(--global--font-size-xs); - --heading--font-size-h5: var(--global--font-size-sm); - --heading--font-size-h4: var(--global--font-size-lg); - --heading--font-size-h3: calc(1.25 * var(--global--font-size-lg)); - --heading--font-size-h2: var(--global--font-size-xl); - --heading--font-size-h1: var(--global--font-size-page-title); - - --heading--letter-spacing-h6: 0.05em; - --heading--letter-spacing-h5: 0.05em; - --heading--letter-spacing-h4: var(--global--letter-spacing); - --heading--letter-spacing-h3: var(--global--letter-spacing); - --heading--letter-spacing-h2: var(--global--letter-spacing); - --heading--letter-spacing-h1: var(--global--letter-spacing); - - --heading--line-height-h6: var(--global--line-height-heading); - --heading--line-height-h5: var(--global--line-height-heading); - --heading--line-height-h4: var(--global--line-height-heading); - --heading--line-height-h3: var(--global--line-height-heading); - --heading--line-height-h2: var(--global--line-height-heading); - --heading--line-height-h1: var(--global--line-height-page-title); - - --heading--font-weight: normal; - --heading--font-weight-page-title: 300; - --heading--font-weight-strong: 600; - - /* Block: Latest posts */ - --latest-posts--title-font-family: var(--heading--font-family); - --latest-posts--title-font-size: var(--heading--font-size-h3); - --latest-posts--description-font-family: var(--global--font-secondary); - --latest-posts--description-font-size: var(--global--font-size-sm); - - --list--font-family: var(--global--font-secondary); - --definition-term--font-family: var(--global--font-primary); - - /* Colors */ - --global--color-black: #000; - --global--color-dark-gray: #28303d; - --global--color-gray: #39414d; - --global--color-light-gray: #f0f0f0; - --global--color-green: #d1e4dd; - --global--color-blue: #d1dfe4; - --global--color-purple: #d1d1e4; - --global--color-red: #e4d1d1; - --global--color-orange: #e4dad1; - --global--color-yellow: #eeeadd; - --global--color-white: #fff; - --global--color-white-50: rgba(255, 255, 255, 0.5); // Used for disabled buttons - --global--color-white-90: rgba(255, 255, 255, 0.9); // Used in form fields. - - --global--color-primary: var(--global--color-dark-gray); /* Body text color, site title, footer text color. */ - --global--color-secondary: var(--global--color-gray); /* Headings */ - --global--color-primary-hover: var(--global--color-primary); - --global--color-background: var(--global--color-green); /* Mint, default body background */ - --global--color-border: var(--global--color-primary); /* Used for borders (separators) */ - - /* Spacing */ - --global--spacing-unit: #{2 * $baseline-unit}; // 20px - --global--spacing-measure: unset; // Use ch units here. ie: 60ch = 60 character max-width - --global--spacing-horizontal: #{2.5 * $baseline-unit}; // 25px - --global--spacing-vertical: #{3 * $baseline-unit}; // 30px. - - /* Elevation */ - --global--elevation: 1px 1px 3px 0 rgba(0, 0, 0, 0.2); - - /* Forms */ - --form--font-family: var(--global--font-secondary); - --form--font-size: var(--global--font-size-sm); - --form--line-height: var(--global--line-height-body); - --form--color-text: var(--global--color-dark-gray); // Text color in input fields is always dark over light background. - --form--color-ranged: var(--global--color-secondary); - --form--label-weight: 500; - --form--border-color: var(--global--color-secondary); - --form--border-width: 3px; - --form--border-radius: 0; - --form--spacing-unit: calc(0.5 * var(--global--spacing-unit)); - - /* Cover block */ - --cover--height: calc(15 * var(--global--spacing-vertical)); - --cover--color-foreground: var(--global--color-white); - --cover--color-background: var(--global--color-black); - - /* Buttons */ - // Colors - --button--color-text: var(--global--color-background); - --button--color-text-hover: var(--global--color-secondary); - --button--color-text-active: var(--global--color-secondary); - --button--color-background: var(--global--color-secondary); - --button--color-background-active: var(--global--color-background); - // Fonts - --button--font-family: var(--global--font-primary); - --button--font-size: var(--global--font-size-base); - --button--font-weight: 500; - --button--line-height: 1.5; - // Borders - --button--border-width: 3px; - --button--border-radius: 0; - // Spacing - --button--padding-vertical: 15px; - --button--padding-horizontal: calc(2 * var(--button--padding-vertical)); - - /* entry */ - --entry-header--color: var(--global--color-primary); - --entry-header--color-link: currentColor; - --entry-header--color-hover: var(--global--color-primary-hover); - --entry-header--color-focus: var(--global--color-secondary); - --entry-header--font-size: var(--heading--font-size-h2); - --entry-content--font-family: var(--global--font-secondary); - --entry-author-bio--font-family: var(--heading--font-family); - --entry-author-bio--font-size: var(--heading--font-size-h4); - - /* Header */ - --branding--color-text: var(--global--color-primary); - --branding--color-link: var(--global--color-primary); - --branding--color-link-hover: var(--global--color-secondary); - --branding--title--font-family: var(--global--font-primary); - --branding--title--font-size: var(--global--font-size-lg); - --branding--title--font-size-mobile: var(--heading--font-size-h4); - --branding--title--font-weight: normal; - --branding--title--text-transform: uppercase; - --branding--description--font-family: var(--global--font-secondary); - --branding--description--font-size: var(--global--font-size-sm); - --branding--description--font-family: var(--global--font-secondary); - - --branding--logo--max-width: 300px; - --branding--logo--max-height: 100px; - --branding--logo--max-width-mobile: 96px; - --branding--logo--max-height-mobile: 96px; - - /* Main navigation */ - --primary-nav--font-family: var(--global--font-secondary); - --primary-nav--font-family-mobile: var(--global--font-primary); - --primary-nav--font-size: var(--global--font-size-md); - --primary-nav--font-size-sub-menu: var(--global--font-size-xs); - --primary-nav--font-size-mobile: var(--global--font-size-sm); - --primary-nav--font-size-sub-menu-mobile: var(--global--font-size-sm); - --primary-nav--font-size-button: var(--global--font-size-xs); - --primary-nav--font-style: normal; - --primary-nav--font-style-sub-menu-mobile: normal; - --primary-nav--font-weight: normal; - --primary-nav--font-weight-button: 500; - --primary-nav--color-link: var(--global--color-primary); - --primary-nav--color-link-hover: var(--global--color-primary-hover); - --primary-nav--color-text: var(--global--color-primary); - --primary-nav--padding: calc(0.66 * var(--global--spacing-unit)); - --primary-nav--border-color: var(--global--color-primary); - - /* Pagination */ - --pagination--color-text: var(--global--color-primary); - --pagination--color-link-hover: var(--global--color-primary-hover); - --pagination--font-family: var(--global--font-secondary); - --pagination--font-size: var(--global--font-size-lg); - --pagination--font-weight: normal; - --pagination--font-weight-strong: 600; - - /* Footer */ - --footer--color-text: var(--global--color-primary); - --footer--color-link: var(--global--color-primary); - --footer--color-link-hover: var(--global--color-primary-hover); - --footer--font-family: var(--global--font-primary); - --footer--font-size: var(--global--font-size-sm); - - /* Block: Pull quote */ - --pullquote--font-family: var(--global--font-primary); - --pullquote--font-size: var(--heading--font-size-h3); - --pullquote--font-style: normal; - --pullquote--letter-spacing: var(--heading--letter-spacing-h4); - --pullquote--line-height: var(--global--line-height-heading); - --pullquote--border-width: 3px; - --pullquote--border-color: var(--global--color-primary); - --pullquote--color-foreground: var(--global--color-primary); - --pullquote--color-background: var(--global--color-background); - - --quote--font-family: var(--global--font-secondary); - --quote--font-size: var(--global--font-size-md); - --quote--font-size-large: var(--global--font-size-xl); - --quote--font-style: normal; - --quote--font-weight: 700; - --quote--font-weight-strong: bolder; - --quote--font-style-large: normal; - --quote--font-style-cite: normal; - --quote--line-height: var(--global--line-height-body); - --quote--line-height-large: 1.35; - - --separator--border-color: var(--global--color-border); - --separator--height: 1px; - - /* Block: Table */ - --table--stripes-border-color: var(--global--color-light-gray); - --table--stripes-background-color: var(--global--color-light-gray); - --table--has-background-text-color: var(--global--color-dark-gray); - - /* Widgets */ - --widget--line-height-list: 1.9; - --widget--line-height-title: 1.4; - --widget--font-weight-title: 700; - --widget--spacing-menu: calc(0.66 * var(--global--spacing-unit)); - - /* Admin-bar height */ - --global--admin-bar--height: 0; -} - -.admin-bar { - --global--admin-bar--height: 32px; - - @media only screen and (max-width: 782px) { - --global--admin-bar--height: 46px; - } -} - -@media only screen and (min-width: 652px) { // Not using the mixin because it's compiled after this file - :root { - --global--font-size-xl: 2.5rem; // 40px / 16px - --global--font-size-xxl: 6rem; // 96px / 16px - --global--font-size-xxxl: 9rem; // 144px / 16px - --heading--font-size-h3: 2rem; // 32px / 16px - --heading--font-size-h2: 3rem; // 48px / 16px - } -} +/* Variables */ + +// Vertical Rhythm Multiplier +$baseline-unit: 10px; + +:root { + + /* Font Family */ + --global--font-primary: var(--font-headings, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + --global--font-secondary: var(--font-base, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + + /* Font Size */ + --global--font-size-base: 1.25rem; // 20px / 16px + --global--font-size-xs: 1rem; // 16px / 16px + --global--font-size-sm: 1.125rem; // 18px / 16px + --global--font-size-md: 1.25rem; // 20px / 16px + --global--font-size-lg: 1.5rem; // 24px / 16px + --global--font-size-xl: 2.25rem; // 36px / 16px + --global--font-size-xxl: 4rem; // 64px / 16px + --global--font-size-xxxl: 5rem; // 80px / 16px + --global--font-size-page-title: var(--global--font-size-xxl); + --global--letter-spacing: normal; + + /* Line Height */ + --global--line-height-body: 1.7; + --global--line-height-heading: 1.3; + --global--line-height-page-title: 1.1; + + /* Headings */ + --heading--font-family: var(--global--font-primary); + + --heading--font-size-h6: var(--global--font-size-xs); + --heading--font-size-h5: var(--global--font-size-sm); + --heading--font-size-h4: var(--global--font-size-lg); + --heading--font-size-h3: calc(1.25 * var(--global--font-size-lg)); + --heading--font-size-h2: var(--global--font-size-xl); + --heading--font-size-h1: var(--global--font-size-page-title); + + --heading--letter-spacing-h6: 0.05em; + --heading--letter-spacing-h5: 0.05em; + --heading--letter-spacing-h4: var(--global--letter-spacing); + --heading--letter-spacing-h3: var(--global--letter-spacing); + --heading--letter-spacing-h2: var(--global--letter-spacing); + --heading--letter-spacing-h1: var(--global--letter-spacing); + + --heading--line-height-h6: var(--global--line-height-heading); + --heading--line-height-h5: var(--global--line-height-heading); + --heading--line-height-h4: var(--global--line-height-heading); + --heading--line-height-h3: var(--global--line-height-heading); + --heading--line-height-h2: var(--global--line-height-heading); + --heading--line-height-h1: var(--global--line-height-page-title); + + --heading--font-weight: normal; + --heading--font-weight-page-title: 300; + --heading--font-weight-strong: 600; + + /* Block: Latest posts */ + --latest-posts--title-font-family: var(--heading--font-family); + --latest-posts--title-font-size: var(--heading--font-size-h3); + --latest-posts--description-font-family: var(--global--font-secondary); + --latest-posts--description-font-size: var(--global--font-size-sm); + + --list--font-family: var(--global--font-secondary); + --definition-term--font-family: var(--global--font-primary); + + /* Colors */ + --global--color-black: #000; + --global--color-dark-gray: #28303d; + --global--color-gray: #39414d; + --global--color-light-gray: #f0f0f0; + --global--color-green: #d1e4dd; + --global--color-blue: #d1dfe4; + --global--color-purple: #d1d1e4; + --global--color-red: #e4d1d1; + --global--color-orange: #e4dad1; + --global--color-yellow: #eeeadd; + --global--color-white: #fff; + --global--color-white-50: rgba(255, 255, 255, 0.5); // Used for disabled buttons + --global--color-white-90: rgba(255, 255, 255, 0.9); // Used in form fields. + + --global--color-primary: var(--global--color-dark-gray); /* Body text color, site title, footer text color. */ + --global--color-secondary: var(--global--color-gray); /* Headings */ + --global--color-primary-hover: var(--global--color-primary); + --global--color-background: var(--global--color-green); /* Mint, default body background */ + --global--color-border: var(--global--color-primary); /* Used for borders (separators) */ + + /* Spacing */ + --global--spacing-unit: #{2 * $baseline-unit}; // 20px + --global--spacing-measure: unset; // Use ch units here. ie: 60ch = 60 character max-width + --global--spacing-horizontal: #{2.5 * $baseline-unit}; // 25px + --global--spacing-vertical: #{3 * $baseline-unit}; // 30px. + + /* Elevation */ + --global--elevation: 1px 1px 3px 0 rgba(0, 0, 0, 0.2); + + /* Forms */ + --form--font-family: var(--global--font-secondary); + --form--font-size: var(--global--font-size-sm); + --form--line-height: var(--global--line-height-body); + --form--color-text: var(--global--color-dark-gray); // Text color in input fields is always dark over light background. + --form--color-ranged: var(--global--color-secondary); + --form--label-weight: 500; + --form--border-color: var(--global--color-secondary); + --form--border-width: 3px; + --form--border-radius: 0; + --form--spacing-unit: calc(0.5 * var(--global--spacing-unit)); + + /* Cover block */ + --cover--height: calc(15 * var(--global--spacing-vertical)); + --cover--color-foreground: var(--global--color-white); + --cover--color-background: var(--global--color-black); + + /* Buttons */ + // Colors + --button--color-text: var(--global--color-background); + --button--color-text-hover: var(--global--color-secondary); + --button--color-text-active: var(--global--color-secondary); + --button--color-background: var(--global--color-secondary); + --button--color-background-active: var(--global--color-background); + // Fonts + --button--font-family: var(--global--font-primary); + --button--font-size: var(--global--font-size-base); + --button--font-weight: 500; + --button--line-height: 1.5; + // Borders + --button--border-width: 3px; + --button--border-radius: 0; + // Spacing + --button--padding-vertical: 15px; + --button--padding-horizontal: calc(2 * var(--button--padding-vertical)); + + /* entry */ + --entry-header--color: var(--global--color-primary); + --entry-header--color-link: currentColor; + --entry-header--color-hover: var(--global--color-primary-hover); + --entry-header--color-focus: var(--global--color-secondary); + --entry-header--font-size: var(--heading--font-size-h2); + --entry-content--font-family: var(--global--font-secondary); + --entry-author-bio--font-family: var(--heading--font-family); + --entry-author-bio--font-size: var(--heading--font-size-h4); + + /* Header */ + --branding--color-text: var(--global--color-primary); + --branding--color-link: var(--global--color-primary); + --branding--color-link-hover: var(--global--color-secondary); + --branding--title--font-family: var(--global--font-primary); + --branding--title--font-size: var(--global--font-size-lg); + --branding--title--font-size-mobile: var(--heading--font-size-h4); + --branding--title--font-weight: normal; + --branding--title--text-transform: uppercase; + --branding--description--font-family: var(--global--font-secondary); + --branding--description--font-size: var(--global--font-size-sm); + --branding--description--font-family: var(--global--font-secondary); + + --branding--logo--max-width: 300px; + --branding--logo--max-height: 100px; + --branding--logo--max-width-mobile: 96px; + --branding--logo--max-height-mobile: 96px; + + /* Main navigation */ + --primary-nav--font-family: var(--global--font-secondary); + --primary-nav--font-family-mobile: var(--global--font-primary); + --primary-nav--font-size: var(--global--font-size-md); + --primary-nav--font-size-sub-menu: var(--global--font-size-xs); + --primary-nav--font-size-mobile: var(--global--font-size-sm); + --primary-nav--font-size-sub-menu-mobile: var(--global--font-size-sm); + --primary-nav--font-size-button: var(--global--font-size-xs); + --primary-nav--font-style: normal; + --primary-nav--font-style-sub-menu-mobile: normal; + --primary-nav--font-weight: normal; + --primary-nav--font-weight-button: 500; + --primary-nav--color-link: var(--global--color-primary); + --primary-nav--color-link-hover: var(--global--color-primary-hover); + --primary-nav--color-text: var(--global--color-primary); + --primary-nav--padding: calc(0.66 * var(--global--spacing-unit)); + --primary-nav--border-color: var(--global--color-primary); + + /* Pagination */ + --pagination--color-text: var(--global--color-primary); + --pagination--color-link-hover: var(--global--color-primary-hover); + --pagination--font-family: var(--global--font-secondary); + --pagination--font-size: var(--global--font-size-lg); + --pagination--font-weight: normal; + --pagination--font-weight-strong: 600; + + /* Footer */ + --footer--color-text: var(--global--color-primary); + --footer--color-link: var(--global--color-primary); + --footer--color-link-hover: var(--global--color-primary-hover); + --footer--font-family: var(--global--font-primary); + --footer--font-size: var(--global--font-size-sm); + + /* Block: Pull quote */ + --pullquote--font-family: var(--global--font-primary); + --pullquote--font-size: var(--heading--font-size-h3); + --pullquote--font-style: normal; + --pullquote--letter-spacing: var(--heading--letter-spacing-h4); + --pullquote--line-height: var(--global--line-height-heading); + --pullquote--border-width: 3px; + --pullquote--border-color: var(--global--color-primary); + --pullquote--color-foreground: var(--global--color-primary); + --pullquote--color-background: var(--global--color-background); + + --quote--font-family: var(--global--font-secondary); + --quote--font-size: var(--global--font-size-md); + --quote--font-size-large: var(--global--font-size-xl); + --quote--font-style: normal; + --quote--font-weight: 700; + --quote--font-weight-strong: bolder; + --quote--font-style-large: normal; + --quote--font-style-cite: normal; + --quote--line-height: var(--global--line-height-body); + --quote--line-height-large: 1.35; + + --separator--border-color: var(--global--color-border); + --separator--height: 1px; + + /* Block: Table */ + --table--stripes-border-color: var(--global--color-light-gray); + --table--stripes-background-color: var(--global--color-light-gray); + --table--has-background-text-color: var(--global--color-dark-gray); + + /* Widgets */ + --widget--line-height-list: 1.9; + --widget--line-height-title: 1.4; + --widget--font-weight-title: 700; + --widget--spacing-menu: calc(0.66 * var(--global--spacing-unit)); + + /* Admin-bar height */ + --global--admin-bar--height: 0px; +} + +.admin-bar { + --global--admin-bar--height: 32px; + + @media only screen and (max-width: 782px) { + --global--admin-bar--height: 46px; + } +} + +@media only screen and (min-width: 652px) { // Not using the mixin because it's compiled after this file + :root { + --global--font-size-xl: 2.5rem; // 40px / 16px + --global--font-size-xxl: 6rem; // 96px / 16px + --global--font-size-xxxl: 9rem; // 144px / 16px + --heading--font-size-h3: 2rem; // 32px / 16px + --heading--font-size-h2: 3rem; // 48px / 16px + } +} diff --git a/themes/twentytwentyone/assets/sass/02-tools/functions.scss b/themes/twentytwentyone/assets/sass/02-tools/functions.scss index 97531ba8..831bbdc4 100644 --- a/themes/twentytwentyone/assets/sass/02-tools/functions.scss +++ b/themes/twentytwentyone/assets/sass/02-tools/functions.scss @@ -1,178 +1,178 @@ -// Remove the unit of a length -// @param {Number} $number - Number to remove unit from -// @return {Number} - Unitless number -@function strip-unit($number) { - @if type-of($number) == "number" and not unitless($number) { - @return $number / ($number * 0 + 1); - } - - @return $number; -} - -// ---- -// Sass (v3.3.14) -// Compass (v1.0.0.rc.1) -// ---- - -@function pow($x, $y) { - $ret: 1; - - @if $y > 0 { - @for $i from 1 through $y { - $ret: $ret * $x; - } - } @else { - @for $i from $y to 0 { - $ret: $ret / $x; - } - } - - @return $ret; -} - -// Map deep get -// @author Hugo Giraudel -// @access public -// @param {Map} $map - Map -// @param {Arglist} $keys - Key chain -// @return {*} - Desired value -// -// Example: -// $m-breakpoint: map-deep-get($__prefix-default-config, "layouts", "M"); -@function map-deep-get($map, $keys...) { - @each $key in $keys { - $map: map-get($map, $key); - } - @return $map; -} - -// Deep set function to set a value in nested maps -// @author Hugo Giraudel -// @access public -// @param {Map} $map - Map -// @param {List} $keys - Key chaine -// @param {*} $value - Value to assign -// @return {Map} -// -// Example: -// $__prefix-default-config: map-deep-set($__prefix-default-config, "layouts" "M", 650px); -@function map-deep-set($map, $keys, $value) { - $maps: ($map); - $result: null; - - // If the last key is a map already - // Warn the user we will be overriding it with $value - @if type-of(nth($keys, -1)) == "map" { - @warn "The last key you specified is a map; it will be overridden with `#{$value}`."; - } - - // If $keys is a single key - // Just merge and return - @if length($keys) == 1 { - @return map-merge($map, ($keys: $value)); - } - - // Loop from the first to the second to last key from $keys - // Store the associated map to this key in the $maps list - // If the key doesn't exist, throw an error - @for $i from 1 through length($keys) - 1 { - $current-key: nth($keys, $i); - $current-map: nth($maps, -1); - $current-get: map-get($current-map, $current-key); - @if $current-get == null { - @error "Key `#{$key}` doesn't exist at current level in map."; - } - $maps: append($maps, $current-get); - } - - // Loop from the last map to the first one - // Merge it with the previous one - @for $i from length($maps) through 1 { - $current-map: nth($maps, $i); - $current-key: nth($keys, $i); - $current-val: if($i == length($maps), $value, $result); - $result: map-merge($current-map, ($current-key: $current-val)); - } - - // Return result - @return $result; -} - -// jQuery-style extend function -// - Child themes can use this function to `reset` the values in -// config maps without editing the `master` Sass files. -// - src: https://www.sitepoint.com/extra-map-functions-sass/ -// - About `map-merge()`: -// - - only takes 2 arguments -// - - is not recursive -// @param {Map} $map - first map -// @param {ArgList} $maps - other maps -// @param {Bool} $deep - recursive mode -// @return {Map} - -// Examples: - -// $grid-configuration-default: ( -// 'columns': 12, -// 'layouts': ( -// 'small': 800px, -// 'medium': 1000px, -// 'large': 1200px, -// ), -// ); - -// $grid-configuration-custom: ( -// 'layouts': ( -// 'large': 1300px, -// 'huge': 1500px -// ), -// ); - -// $grid-configuration-user: ( -// 'direction': 'ltr', -// 'columns': 16, -// 'layouts': ( -// 'large': 1300px, -// 'huge': 1500px -// ), -// ); - -// $deep: false -// $grid-configuration: map-extend($grid-configuration-default, $grid-configuration-custom, $grid-configuration-user); -// --> ("columns": 16, "layouts": (("large": 1300px, "huge": 1500px)), "direction": "ltr") - -// $deep: true -// $grid-configuration: map-extend($grid-configuration-default, $grid-configuration-custom, $grid-configuration-user, true); -// --> ("columns": 16, "layouts": (("small": 800px, "medium": 1000px, "large": 1300px, "huge": 1500px)), "direction": "ltr") - -@function map-extend($map, $maps.../*, $deep */) { - $last: nth($maps, -1); - $deep: $last == true; - $max: if($deep, length($maps) - 1, length($maps)); - - // Loop through all maps in $maps... - @for $i from 1 through $max { - // Store current map - $current: nth($maps, $i); - - // If not in deep mode, simply merge current map with map - @if not $deep { - $map: map-merge($map, $current); - } @else { - // If in deep mode, loop through all tuples in current map - @each $key, $value in $current { - - // If value is a nested map and same key from map is a nested map as well - @if type-of($value) == "map" and type-of(map-get($map, $key)) == "map" { - // Recursive extend - $value: map-extend(map-get($map, $key), $value, true); - } - - // Merge current tuple with map - $map: map-merge($map, ($key: $value)); - } - } - } - - @return $map; -} +// Remove the unit of a length +// @param {Number} $number - Number to remove unit from +// @return {Number} - Unitless number +@function strip-unit($number) { + @if type-of($number) == "number" and not unitless($number) { + @return $number / ($number * 0 + 1); + } + + @return $number; +} + +// ---- +// Sass (v3.3.14) +// Compass (v1.0.0.rc.1) +// ---- + +@function pow($x, $y) { + $ret: 1; + + @if $y > 0 { + @for $i from 1 through $y { + $ret: $ret * $x; + } + } @else { + @for $i from $y to 0 { + $ret: $ret / $x; + } + } + + @return $ret; +} + +// Map deep get +// @author Hugo Giraudel +// @access public +// @param {Map} $map - Map +// @param {Arglist} $keys - Key chain +// @return {*} - Desired value +// +// Example: +// $m-breakpoint: map-deep-get($__prefix-default-config, "layouts", "M"); +@function map-deep-get($map, $keys...) { + @each $key in $keys { + $map: map-get($map, $key); + } + @return $map; +} + +// Deep set function to set a value in nested maps +// @author Hugo Giraudel +// @access public +// @param {Map} $map - Map +// @param {List} $keys - Key chaine +// @param {*} $value - Value to assign +// @return {Map} +// +// Example: +// $__prefix-default-config: map-deep-set($__prefix-default-config, "layouts" "M", 650px); +@function map-deep-set($map, $keys, $value) { + $maps: ($map); + $result: null; + + // If the last key is a map already + // Warn the user we will be overriding it with $value + @if type-of(nth($keys, -1)) == "map" { + @warn "The last key you specified is a map; it will be overridden with `#{$value}`."; + } + + // If $keys is a single key + // Just merge and return + @if length($keys) == 1 { + @return map-merge($map, ($keys: $value)); + } + + // Loop from the first to the second to last key from $keys + // Store the associated map to this key in the $maps list + // If the key doesn't exist, throw an error + @for $i from 1 through length($keys) - 1 { + $current-key: nth($keys, $i); + $current-map: nth($maps, -1); + $current-get: map-get($current-map, $current-key); + @if $current-get == null { + @error "Key `#{$key}` doesn't exist at current level in map."; + } + $maps: append($maps, $current-get); + } + + // Loop from the last map to the first one + // Merge it with the previous one + @for $i from length($maps) through 1 { + $current-map: nth($maps, $i); + $current-key: nth($keys, $i); + $current-val: if($i == length($maps), $value, $result); + $result: map-merge($current-map, ($current-key: $current-val)); + } + + // Return result + @return $result; +} + +// jQuery-style extend function +// - Child themes can use this function to `reset` the values in +// config maps without editing the `master` Sass files. +// - src: https://www.sitepoint.com/extra-map-functions-sass/ +// - About `map-merge()`: +// - - only takes 2 arguments +// - - is not recursive +// @param {Map} $map - first map +// @param {ArgList} $maps - other maps +// @param {Bool} $deep - recursive mode +// @return {Map} + +// Examples: + +// $grid-configuration-default: ( +// 'columns': 12, +// 'layouts': ( +// 'small': 800px, +// 'medium': 1000px, +// 'large': 1200px, +// ), +// ); + +// $grid-configuration-custom: ( +// 'layouts': ( +// 'large': 1300px, +// 'huge': 1500px +// ), +// ); + +// $grid-configuration-user: ( +// 'direction': 'ltr', +// 'columns': 16, +// 'layouts': ( +// 'large': 1300px, +// 'huge': 1500px +// ), +// ); + +// $deep: false +// $grid-configuration: map-extend($grid-configuration-default, $grid-configuration-custom, $grid-configuration-user); +// --> ("columns": 16, "layouts": (("large": 1300px, "huge": 1500px)), "direction": "ltr") + +// $deep: true +// $grid-configuration: map-extend($grid-configuration-default, $grid-configuration-custom, $grid-configuration-user, true); +// --> ("columns": 16, "layouts": (("small": 800px, "medium": 1000px, "large": 1300px, "huge": 1500px)), "direction": "ltr") + +@function map-extend($map, $maps.../*, $deep */) { + $last: nth($maps, -1); + $deep: $last == true; + $max: if($deep, length($maps) - 1, length($maps)); + + // Loop through all maps in $maps... + @for $i from 1 through $max { + // Store current map + $current: nth($maps, $i); + + // If not in deep mode, simply merge current map with map + @if not $deep { + $map: map-merge($map, $current); + } @else { + // If in deep mode, loop through all tuples in current map + @each $key, $value in $current { + + // If value is a nested map and same key from map is a nested map as well + @if type-of($value) == "map" and type-of(map-get($map, $key)) == "map" { + // Recursive extend + $value: map-extend(map-get($map, $key), $value, true); + } + + // Merge current tuple with map + $map: map-merge($map, ($key: $value)); + } + } + } + + @return $map; +} diff --git a/themes/twentytwentyone/assets/sass/02-tools/mixins.scss b/themes/twentytwentyone/assets/sass/02-tools/mixins.scss index a6b6dc01..144a3878 100644 --- a/themes/twentytwentyone/assets/sass/02-tools/mixins.scss +++ b/themes/twentytwentyone/assets/sass/02-tools/mixins.scss @@ -1,73 +1,100 @@ -// Responsive breakpoints mixin -@mixin add_variables( $view: frontend ) { - - @if frontend == $view { - - :root { - @content; - } - } - - @if editor == $view { - - :root, - body { - @content; - } - } -} - -// Button style -// - Applies button styles to blocks and elements that share them. -@mixin button-style() { - line-height: var(--button--line-height); - color: var(--button--color-text); - cursor: pointer; - font-weight: var(--button--font-weight); - font-family: var(--button--font-family); - font-size: var(--button--font-size); - background-color: var(--button--color-background); - border-radius: var(--button--border-radius); - border: var(--button--border-width) solid var(--button--color-background); - text-decoration: none; - padding: var(--button--padding-vertical) var(--button--padding-horizontal); - - &:focus { - background: transparent; - outline-offset: -6px; - outline: 2px dotted currentColor; - - .is-dark-theme & { - color: var(--button--color-background); - } - - &:not(.has-background) { - color: var(--button--color-text-hover); - } - } - - &:disabled { - background-color: var(--global--color-white-50); - border-color: var(--global--color-white-50); - color: var(--button--color-text-active); - } -} - -@mixin innerblock-margin-clear($container) { - - // Clear the top margin for the first-child. - > #{$container} > *:first-child { - margin-top: 0; - } - - // Last child that is not the appender. - > #{$container} > *:last-child:not(.block-list-appender) { - margin-bottom: 0; - } - - // When selected, the last item becomes the second last because of the appender. - &.has-child-selected > #{$container} > *:nth-last-child(2), - &.is-selected > #{$container} > *:nth-last-child(2) { - margin-bottom: 0; - } -} +// Responsive breakpoints mixin +@mixin add_variables( $view: frontend ) { + + @if frontend == $view { + + :root { + @content; + } + } + + @if editor == $view { + + :root, + body { + @content; + } + } +} + +// Button style +// - Applies button styles to blocks and elements that share them. +@mixin button-style() { + border: var(--button--border-width) solid transparent; + border-radius: var(--button--border-radius); + cursor: pointer; + font-weight: var(--button--font-weight); + font-family: var(--button--font-family); + font-size: var(--button--font-size); + line-height: var(--button--line-height); + padding: var(--button--padding-vertical) var(--button--padding-horizontal); + text-decoration: none; + + // Standard Button Color Relationship Logic + &:not(:hover):not(:active) { + + // Text colors + &:not(.has-text-color) { + color: var(--global--color-background); + + // Nested + .has-background & { + color: var(--local--color-background, var(--global--color-primary)); + + &.has-background { + color: var(--global--color-primary); + } + } + } + + // Background-colors + &:not(.has-background) { + background-color: var(--global--color-primary); + + // Nested + .has-background & { + background-color: var(--local--color-primary, var(--global--color-primary)); + } + } + } + + // Hover Button color should match parent element foreground color + &:hover, + &:active { + background-color: transparent; + border-color: currentColor; + color: inherit; + } + + // Focus Button outline color should always match the current text color + &:focus { + outline-offset: -6px; + outline: 2px dotted currentColor; + } + + // Disabled Button colors + &:disabled { + background-color: var(--global--color-white-50); + border-color: var(--global--color-white-50); + color: var(--button--color-text-active); + } +} + +@mixin innerblock-margin-clear($container) { + + // Clear the top margin for the first-child. + > #{$container} > *:first-child { + margin-top: 0; + } + + // Last child that is not the appender. + > #{$container} > *:last-child:not(.block-list-appender) { + margin-bottom: 0; + } + + // When selected, the last item becomes the second last because of the appender. + &.has-child-selected > #{$container} > *:nth-last-child(2), + &.is-selected > #{$container} > *:nth-last-child(2) { + margin-bottom: 0; + } +} diff --git a/themes/twentytwentyone/assets/sass/03-generic/breakpoints.scss b/themes/twentytwentyone/assets/sass/03-generic/breakpoints.scss index 776200a1..254c8136 100644 --- a/themes/twentytwentyone/assets/sass/03-generic/breakpoints.scss +++ b/themes/twentytwentyone/assets/sass/03-generic/breakpoints.scss @@ -1,217 +1,217 @@ -/** - * Responsive Styles - */ - -/** - * Required Variables - */ - -$default_width: 610px; -$max_content_width: 1240px; -$breakpoint_sm: 482px; -$breakpoint_md: 592px; -$breakpoint_lg: 652px; -$breakpoint_xl: 822px; -$breakpoint_xxl: 1024px; - -// Responsive breakpoints mixin -@mixin media( $res ) { - - @if mobile-only == $res { - @media only screen and (max-width: #{$breakpoint_sm - 1}) { - @content; - } - } - - @if mobile == $res { - @media only screen and (min-width: #{$breakpoint_sm}) { - @content; - } - } - - @if tablet-only == $res { - @media only screen and (max-width: #{$breakpoint_md - 1}) { - @content; - } - } - - @if tablet == $res { - @media only screen and (min-width: #{$breakpoint_md}) { - @content; - } - } - - @if laptop-only == $res { - @media only screen and (max-width: #{$breakpoint_lg - 1}) { - @content; - } - } - - @if laptop == $res { - @media only screen and (min-width: #{$breakpoint_lg}) { - @content; - } - } - - @if desktop-only == $res { - @media only screen and (max-width: #{$breakpoint_xl - 1}) { - @content; - } - } - - @if desktop == $res { - @media only screen and (min-width: #{$breakpoint_xl}) { - @content; - } - } - - @if wide-only == $res { - @media only screen and (max-width: #{$breakpoint_xxl - 1}) { - @content; - } - } - - @if wide == $res { - @media only screen and (min-width: #{$breakpoint_xxl}) { - @content; - } - } -} - -/** - * Root Media Query Variables - */ -:root { - --responsive--spacing-horizontal: calc(2 * var(--global--spacing-horizontal) * 0.6); - --responsive--aligndefault-width: calc(100vw - var(--responsive--spacing-horizontal)); - --responsive--alignwide-width: calc(100vw - var(--responsive--spacing-horizontal)); - --responsive--alignfull-width: 100%; - --responsive--alignright-margin: var(--global--spacing-horizontal); - --responsive--alignleft-margin: var(--global--spacing-horizontal); -} - -@include media(mobile) { - - :root { - --responsive--aligndefault-width: min(calc(100vw - 4 * var(--global--spacing-horizontal)), #{$default_width}); - --responsive--alignwide-width: calc(100vw - 4 * var(--global--spacing-horizontal)); - --responsive--alignright-margin: calc(0.5 * (100vw - var(--responsive--aligndefault-width))); - --responsive--alignleft-margin: calc(0.5 * (100vw - var(--responsive--aligndefault-width))); - } -} - -@include media(desktop) { - - :root { - --responsive--aligndefault-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), #{$default_width}); - --responsive--alignwide-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), #{$max_content_width}); - } -} - -/** - * Extends - */ -%responsive-aligndefault-width { - max-width: var(--responsive--aligndefault-width); - margin-left: auto; - margin-right: auto; -} - -%responsive-alignwide-width { - max-width: var(--responsive--alignwide-width); - margin-left: auto; - margin-right: auto; -} - -%responsive-alignfull-width-mobile { - max-width: var(--responsive--alignfull-width); - width: var(--responsive--alignfull-width); - margin-left: auto; - margin-right: auto; -} - -@include media(mobile) { - %responsive-alignfull-width { - max-width: var(--responsive--alignfull-width); - width: auto; - margin-left: auto; - margin-right: auto; - } -} - -%responsive-alignwide-width-nested { - margin-left: auto; - margin-right: auto; - width: var(--responsive--alignwide-width); - max-width: var(--responsive--alignfull-width); -} - -%responsive-alignfull-width-nested { - margin-left: auto; - margin-right: auto; - width: calc(var(--responsive--alignfull-width) - calc(2 * var(--responsive--spacing-horizontal))); - max-width: var(--responsive--alignfull-width); -} - -@include media(desktop) { - %responsive-alignfull-width-nested { - margin-left: auto; - margin-right: auto; - width: calc(var(--responsive--alignfull-width) - calc(4 * var(--responsive--spacing-horizontal))); - max-width: var(--responsive--alignfull-width); - } -} - - -%responsive-alignleft-mobile { - - /*rtl:ignore*/ - margin-left: 0; - - /*rtl:ignore*/ - margin-right: var(--responsive--spacing-horizontal); -} - -@include media(mobile) { - %responsive-alignleft { - - /*rtl:ignore*/ - margin-left: var(--responsive--alignleft-margin); - - /*rtl:ignore*/ - margin-right: var(--global--spacing-horizontal); - } -} - -%responsive-alignright-mobile { - - /*rtl:ignore*/ - margin-left: var(--responsive--spacing-horizontal); - - /*rtl:ignore*/ - margin-right: 0; -} - -@include media(mobile) { - %responsive-alignright { - - /*rtl:ignore*/ - margin-left: var(--global--spacing-horizontal); - - /*rtl:ignore*/ - margin-right: var(--responsive--alignright-margin); - } -} - -// Output -.default-max-width { - @extend %responsive-aligndefault-width; -} - -.wide-max-width { - @extend %responsive-alignwide-width; -} - -.full-max-width { - @extend %responsive-alignfull-width; -} +/** + * Responsive Styles + */ + +/** + * Required Variables + */ + +$default_width: 610px; +$max_content_width: 1240px; +$breakpoint_sm: 482px; +$breakpoint_md: 592px; +$breakpoint_lg: 652px; +$breakpoint_xl: 822px; +$breakpoint_xxl: 1024px; + +// Responsive breakpoints mixin +@mixin media( $res ) { + + @if mobile-only == $res { + @media only screen and (max-width: #{$breakpoint_sm - 1}) { + @content; + } + } + + @if mobile == $res { + @media only screen and (min-width: #{$breakpoint_sm}) { + @content; + } + } + + @if tablet-only == $res { + @media only screen and (max-width: #{$breakpoint_md - 1}) { + @content; + } + } + + @if tablet == $res { + @media only screen and (min-width: #{$breakpoint_md}) { + @content; + } + } + + @if laptop-only == $res { + @media only screen and (max-width: #{$breakpoint_lg - 1}) { + @content; + } + } + + @if laptop == $res { + @media only screen and (min-width: #{$breakpoint_lg}) { + @content; + } + } + + @if desktop-only == $res { + @media only screen and (max-width: #{$breakpoint_xl - 1}) { + @content; + } + } + + @if desktop == $res { + @media only screen and (min-width: #{$breakpoint_xl}) { + @content; + } + } + + @if wide-only == $res { + @media only screen and (max-width: #{$breakpoint_xxl - 1}) { + @content; + } + } + + @if wide == $res { + @media only screen and (min-width: #{$breakpoint_xxl}) { + @content; + } + } +} + +/** + * Root Media Query Variables + */ +:root { + --responsive--spacing-horizontal: calc(2 * var(--global--spacing-horizontal) * 0.6); + --responsive--aligndefault-width: calc(100vw - var(--responsive--spacing-horizontal)); + --responsive--alignwide-width: calc(100vw - var(--responsive--spacing-horizontal)); + --responsive--alignfull-width: 100%; + --responsive--alignright-margin: var(--global--spacing-horizontal); + --responsive--alignleft-margin: var(--global--spacing-horizontal); +} + +@include media(mobile) { + + :root { + --responsive--aligndefault-width: min(calc(100vw - 4 * var(--global--spacing-horizontal)), #{$default_width}); + --responsive--alignwide-width: calc(100vw - 4 * var(--global--spacing-horizontal)); + --responsive--alignright-margin: calc(0.5 * (100vw - var(--responsive--aligndefault-width))); + --responsive--alignleft-margin: calc(0.5 * (100vw - var(--responsive--aligndefault-width))); + } +} + +@include media(desktop) { + + :root { + --responsive--aligndefault-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), #{$default_width}); + --responsive--alignwide-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), #{$max_content_width}); + } +} + +/** + * Extends + */ +%responsive-aligndefault-width { + max-width: var(--responsive--aligndefault-width); + margin-left: auto; + margin-right: auto; +} + +%responsive-alignwide-width { + max-width: var(--responsive--alignwide-width); + margin-left: auto; + margin-right: auto; +} + +%responsive-alignfull-width-mobile { + max-width: var(--responsive--alignfull-width); + width: var(--responsive--alignfull-width); + margin-left: auto; + margin-right: auto; +} + +@include media(mobile) { + %responsive-alignfull-width { + max-width: var(--responsive--alignfull-width); + width: auto; + margin-left: auto; + margin-right: auto; + } +} + +%responsive-alignwide-width-nested { + margin-left: auto; + margin-right: auto; + width: var(--responsive--alignwide-width); + max-width: var(--responsive--alignfull-width); +} + +%responsive-alignfull-width-nested { + margin-left: auto; + margin-right: auto; + width: calc(var(--responsive--alignfull-width) - calc(2 * var(--responsive--spacing-horizontal))); + max-width: var(--responsive--alignfull-width); +} + +@include media(desktop) { + %responsive-alignfull-width-nested { + margin-left: auto; + margin-right: auto; + width: calc(var(--responsive--alignfull-width) - calc(4 * var(--responsive--spacing-horizontal))); + max-width: var(--responsive--alignfull-width); + } +} + + +%responsive-alignleft-mobile { + + /*rtl:ignore*/ + margin-left: 0; + + /*rtl:ignore*/ + margin-right: var(--responsive--spacing-horizontal); +} + +@include media(mobile) { + %responsive-alignleft { + + /*rtl:ignore*/ + margin-left: var(--responsive--alignleft-margin); + + /*rtl:ignore*/ + margin-right: var(--global--spacing-horizontal); + } +} + +%responsive-alignright-mobile { + + /*rtl:ignore*/ + margin-left: var(--responsive--spacing-horizontal); + + /*rtl:ignore*/ + margin-right: 0; +} + +@include media(mobile) { + %responsive-alignright { + + /*rtl:ignore*/ + margin-left: var(--global--spacing-horizontal); + + /*rtl:ignore*/ + margin-right: var(--responsive--alignright-margin); + } +} + +// Output +.default-max-width { + @extend %responsive-aligndefault-width; +} + +.wide-max-width { + @extend %responsive-alignwide-width; +} + +.full-max-width { + @extend %responsive-alignfull-width; +} diff --git a/themes/twentytwentyone/assets/sass/03-generic/clearings.scss b/themes/twentytwentyone/assets/sass/03-generic/clearings.scss index b3208aca..14a78877 100644 --- a/themes/twentytwentyone/assets/sass/03-generic/clearings.scss +++ b/themes/twentytwentyone/assets/sass/03-generic/clearings.scss @@ -1,25 +1,25 @@ -.clear:before, -.clear:after, -.entry-content:before, -.entry-content:after, -.comment-content:before, -.comment-content:after, -.site-header:before, -.site-header:after, -.site-content:before, -.site-content:after, -.site-footer:before, -.site-footer:after { - content: ""; - display: table; - table-layout: fixed; -} - -.clear:after, -.entry-content:after, -.comment-content:after, -.site-header:after, -.site-content:after, -.site-footer:after { - clear: both; -} +.clear:before, +.clear:after, +.entry-content:before, +.entry-content:after, +.comment-content:before, +.comment-content:after, +.site-header:before, +.site-header:after, +.site-content:before, +.site-content:after, +.site-footer:before, +.site-footer:after { + content: ""; + display: table; + table-layout: fixed; +} + +.clear:after, +.entry-content:after, +.comment-content:after, +.site-header:after, +.site-content:after, +.site-footer:after { + clear: both; +} diff --git a/themes/twentytwentyone/assets/sass/03-generic/normalize.scss b/themes/twentytwentyone/assets/sass/03-generic/normalize.scss index f0f217ad..388182a0 100644 --- a/themes/twentytwentyone/assets/sass/03-generic/normalize.scss +++ b/themes/twentytwentyone/assets/sass/03-generic/normalize.scss @@ -1,350 +1,350 @@ -/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ - -/* Document - ========================================================================== */ - -/** - * 1. Correct the line height in all browsers. - * 2. Prevent adjustments of font size after orientation changes in iOS. - */ - -html { - line-height: 1.15; /* 1 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/* Sections - ========================================================================== */ - -/** - * Remove the margin in all browsers. - */ - -body { - margin: 0; -} - -/** - * Render the `main` element consistently in IE. - */ - -main { - display: block; -} - -/** - * Correct the font size and margin on `h1` elements within `section` and - * `article` contexts in Chrome, Firefox, and Safari. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/* Grouping content - ========================================================================== */ - -/** - * 1. Add the correct box sizing in Firefox. - * 2. Show the overflow in Edge and IE. - */ - -hr { - box-sizing: content-box; /* 1 */ - height: 0; /* 1 */ - overflow: visible; /* 2 */ -} - -/** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. - */ - -pre { - font-family: monospace; /* 1 */ - font-size: 1em; /* 2 */ -} - -/* Text-level semantics - ========================================================================== */ - -/** - * Remove the gray background on active links in IE 10. - */ - -a { - background-color: transparent; - text-decoration-thickness: 1px; -} - -/** - * 1. Remove the bottom border in Chrome 57- - * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. - */ - -abbr[title] { - border-bottom: none; /* 1 */ - text-decoration: underline; /* 2 */ - text-decoration-style: dotted; /* 2 */ -} - -/** - * Add the correct font weight in Chrome, Edge, and Safari. - */ - -b, -strong { - font-weight: bolder; -} - -/** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. - */ - -code, -kbd, -samp { - font-family: monospace; /* 1 */ - font-size: 1em; /* 2 */ -} - -/** - * Add the correct font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` elements from affecting the line height in - * all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.5em; -} - -/* Embedded content - ========================================================================== */ - -/** - * Remove the border on images inside links in IE 10. - */ - -img { - border-style: none; -} - -/* Forms - ========================================================================== */ - -/** - * 1. Change the font styles in all browsers. - * 2. Remove the margin in Firefox and Safari. - */ - -button, -input, -optgroup, -select, -textarea { - font-family: inherit; /* 1 */ - font-size: 100%; /* 1 */ - line-height: 1.15; /* 1 */ - margin: 0; /* 2 */ -} - -/** - * Show the overflow in IE. - * 1. Show the overflow in Edge. - */ - -button, -input { /* 1 */ - overflow: visible; -} - -/** - * Remove the inheritance of text transform in Edge, Firefox, and IE. - * 1. Remove the inheritance of text transform in Firefox. - */ - -button, -select { /* 1 */ - text-transform: none; -} - -/** - * Correct the inability to style clickable types in iOS and Safari. - */ - -button, -[type="button"], -[type="reset"], -[type="submit"] { - -webkit-appearance: button; -} - -/** - * Remove the inner border and padding in Firefox. - */ - -button::-moz-focus-inner, -[type="button"]::-moz-focus-inner, -[type="reset"]::-moz-focus-inner, -[type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; -} - -/** - * Restore the focus styles unset by the previous rule. - */ - -button:-moz-focusring, -[type="button"]:-moz-focusring, -[type="reset"]:-moz-focusring, -[type="submit"]:-moz-focusring { - outline: 1px dotted ButtonText; -} - -/** - * Correct the padding in Firefox. - */ - -fieldset { - padding: 0.35em 0.75em 0.625em; -} - -/** - * 1. Correct the text wrapping in Edge and IE. - * 2. Correct the color inheritance from `fieldset` elements in IE. - * 3. Remove the padding so developers are not caught out when they zero out - * `fieldset` elements in all browsers. - */ - -legend { - box-sizing: border-box; /* 1 */ - color: inherit; /* 2 */ - display: table; /* 1 */ - max-width: 100%; /* 1 */ - padding: 0; /* 3 */ - white-space: normal; /* 1 */ -} - -/** - * Add the correct vertical alignment in Chrome, Firefox, and Opera. - */ - -progress { - vertical-align: baseline; -} - -/** - * Remove the default vertical scrollbar in IE 10+. - */ - -textarea { - overflow: auto; -} - -/** - * 1. Add the correct box sizing in IE 10. - * 2. Remove the padding in IE 10. - */ - -[type="checkbox"], -[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Correct the cursor style of increment and decrement buttons in Chrome. - */ - -[type="number"]::-webkit-inner-spin-button, -[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Correct the odd appearance in Chrome and Safari. - * 2. Correct the outline style in Safari. - */ - -[type="search"] { - -webkit-appearance: textfield; /* 1 */ - outline-offset: -2px; /* 2 */ -} - -/** - * Remove the inner padding in Chrome and Safari on macOS. - */ - -[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * 1. Correct the inability to style clickable types in iOS and Safari. - * 2. Change font properties to `inherit` in Safari. - */ - -::-webkit-file-upload-button { - -webkit-appearance: button; /* 1 */ - font: inherit; /* 2 */ -} - -/* Interactive - ========================================================================== */ - -/* - * Add the correct display in Edge, IE 10+, and Firefox. - */ - -details { - display: block; -} - -/* - * Add the correct display in all browsers. - */ - -summary { - display: list-item; -} - -/* Misc - ========================================================================== */ - -/** - * Add the correct display in IE 10+. - */ - -template { - display: none; -} - -/** - * Add the correct display in IE 10. - */ - -[hidden] { - display: none; -} +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Render the `main` element consistently in IE. + */ + +main { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; + text-decoration-thickness: 1px; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration-style: dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { /* 1 */ + text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} diff --git a/themes/twentytwentyone/assets/sass/03-generic/reset.scss b/themes/twentytwentyone/assets/sass/03-generic/reset.scss index 38d2fcf3..d539b0eb 100644 --- a/themes/twentytwentyone/assets/sass/03-generic/reset.scss +++ b/themes/twentytwentyone/assets/sass/03-generic/reset.scss @@ -1,75 +1,75 @@ -/** - * Reset specific elements to make them easier to style in other contexts. - */ - -html, -body, -p, -ol, -ul, -li, -dl, -dt, -dd, -blockquote, -figure, -fieldset, -form, -legend, -textarea, -pre, -iframe, -hr, -h1, -h2, -h3, -h4, -h5, -h6 { - padding: 0; - margin: 0; - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; -} - -/** - * Apply generic border-box to all elements. - * See: - * https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ - */ - -html { - - /* Apply border-box across the entire page. */ - box-sizing: border-box; - - // HTML resets - font-family: var(--global--font-secondary); - line-height: var(--global--line-height-body); -} - -/** - * Relax the definition a bit, to allow components to override it manually. - */ -* { - - &, - &::before, - &::after { - box-sizing: inherit; - } -} - -// body resets -body { - font-size: var(--global--font-size-base); - font-weight: normal; - color: var(--global--color-primary); - text-align: left; - background-color: var(--global--color-background); -} - - -button { - cursor: pointer; -} +/** + * Reset specific elements to make them easier to style in other contexts. + */ + +html, +body, +p, +ol, +ul, +li, +dl, +dt, +dd, +blockquote, +figure, +fieldset, +form, +legend, +textarea, +pre, +iframe, +hr, +h1, +h2, +h3, +h4, +h5, +h6 { + padding: 0; + margin: 0; + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; +} + +/** + * Apply generic border-box to all elements. + * See: + * https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ + */ + +html { + + /* Apply border-box across the entire page. */ + box-sizing: border-box; + + // HTML resets + font-family: var(--global--font-secondary); + line-height: var(--global--line-height-body); +} + +/** + * Relax the definition a bit, to allow components to override it manually. + */ +* { + + &, + &::before, + &::after { + box-sizing: inherit; + } +} + +// body resets +body { + font-size: var(--global--font-size-base); + font-weight: normal; + color: var(--global--color-primary); + text-align: left; + background-color: var(--global--color-background); +} + + +button { + cursor: pointer; +} diff --git a/themes/twentytwentyone/assets/sass/03-generic/vertical-margins.scss b/themes/twentytwentyone/assets/sass/03-generic/vertical-margins.scss index c69e50a0..d0f81cf2 100644 --- a/themes/twentytwentyone/assets/sass/03-generic/vertical-margins.scss +++ b/themes/twentytwentyone/assets/sass/03-generic/vertical-margins.scss @@ -1,172 +1,172 @@ -/** - * Site Structure - * - * - Set vertical margins and responsive widths on - * top-level wrappers and content wrappers - * - `--global--width-content` is a responsive variable - * - See: globals/_global-width-responsive.scss - */ - -/** - * Top Level Wrappers (header, main, footer) - * - Set vertical padding and horizontal margins - */ -.site-header, -.site-main, -.widget-area, -.site-footer { - padding-top: var(--global--spacing-vertical); - padding-bottom: var(--global--spacing-vertical); - margin-left: auto; - margin-right: auto; -} - -.site-header { - padding-top: calc(0.75 * var(--global--spacing-vertical)); - padding-bottom: calc(2 * var(--global--spacing-vertical)); - - @include media(mobile) { - padding-bottom: calc(3 * var(--global--spacing-vertical)); - } -} - -/** - * Site-main children wrappers - * - Add double vertical margins here for clearer hierarchy - */ -.site-main > * { - margin-top: calc(3 * var(--global--spacing-vertical)); - margin-bottom: calc(3 * var(--global--spacing-vertical)); - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } -} - -/** - * Set the default maximum responsive content-width - */ -.default-max-width { - @extend %responsive-aligndefault-width; -} - -/** - * Set the wide maximum responsive content-width - */ -.wide-max-width { - @extend %responsive-alignwide-width; -} - -/** - * Set the full maximum responsive content-width - */ -.full-max-width { - @extend %responsive-alignfull-width-mobile; - @extend %responsive-alignfull-width; -} - -/* - * Block & non-gutenberg content wrappers - * - Set margins - */ -.entry-header, -.post-thumbnail, -.entry-content, -.entry-footer, -.author-bio { - margin-top: var(--global--spacing-vertical); - margin-right: auto; - margin-bottom: var(--global--spacing-vertical); - margin-left: auto; -} - -/* - * Block & non-gutenberg content wrapper children - * - Sets spacing-vertical margin logic - */ -.site-main > article > *, // apply vertical margins to article level -.site-main > .not-found > *, // apply vertical margins to article level -.entry-content > *, -[class*="inner-container"] > *, -.wp-block-template-part > * { - - margin-top: calc(0.666 * var(--global--spacing-vertical)); - margin-bottom: calc(0.666 * var(--global--spacing-vertical)); - - @include media(mobile) { - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); - } - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } -} - -.site-footer > *, -.widget-area > * { - margin-top: calc(0.666 * var(--global--spacing-vertical)); - margin-bottom: calc(0.666 * var(--global--spacing-vertical)); - - @include media(mobile) { - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); - } -} - -/* - * Block & non-gutenberg content wrapper children - * - Sets spacing-unit margins - */ -//.site-header > *, // Removed, to align site title and menu. -.entry-header > *, -.post-thumbnail > *, -.page-content > *, -.comment-content > *, -.widget > * { - margin-top: var(--global--spacing-unit); - margin-bottom: var(--global--spacing-unit); - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } -} - - -/* - * .entry-content children specific controls - * - Adds special margin overrides for alignment utility classes - */ -.entry-content > * { - - &.alignleft, - &.alignright, - &.alignleft:first-child + *, - &.alignright:first-child + *, - &.alignfull.has-background { - margin-top: 0; - } - - &:last-child, - &.alignfull.has-background { - margin-bottom: 0; - } - - /* Reset alignleft and alignright margins after alignfull */ - &.alignfull + .alignleft, - &.alignfull + .alignright { - margin-top: var(--global--spacing-vertical); - } -} +/** + * Site Structure + * + * - Set vertical margins and responsive widths on + * top-level wrappers and content wrappers + * - `--global--width-content` is a responsive variable + * - See: globals/_global-width-responsive.scss + */ + +/** + * Top Level Wrappers (header, main, footer) + * - Set vertical padding and horizontal margins + */ +.site-header, +.site-main, +.widget-area, +.site-footer { + padding-top: var(--global--spacing-vertical); + padding-bottom: var(--global--spacing-vertical); + margin-left: auto; + margin-right: auto; +} + +.site-header { + padding-top: calc(0.75 * var(--global--spacing-vertical)); + padding-bottom: calc(2 * var(--global--spacing-vertical)); + + @include media(mobile) { + padding-bottom: calc(3 * var(--global--spacing-vertical)); + } +} + +/** + * Site-main children wrappers + * - Add double vertical margins here for clearer hierarchy + */ +.site-main > * { + margin-top: calc(3 * var(--global--spacing-vertical)); + margin-bottom: calc(3 * var(--global--spacing-vertical)); + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } +} + +/** + * Set the default maximum responsive content-width + */ +.default-max-width { + @extend %responsive-aligndefault-width; +} + +/** + * Set the wide maximum responsive content-width + */ +.wide-max-width { + @extend %responsive-alignwide-width; +} + +/** + * Set the full maximum responsive content-width + */ +.full-max-width { + @extend %responsive-alignfull-width-mobile; + @extend %responsive-alignfull-width; +} + +/* + * Block & non-gutenberg content wrappers + * - Set margins + */ +.entry-header, +.post-thumbnail, +.entry-content, +.entry-footer, +.author-bio { + margin-top: var(--global--spacing-vertical); + margin-right: auto; + margin-bottom: var(--global--spacing-vertical); + margin-left: auto; +} + +/* + * Block & non-gutenberg content wrapper children + * - Sets spacing-vertical margin logic + */ +.site-main > article > *, // apply vertical margins to article level +.site-main > .not-found > *, // apply vertical margins to article level +.entry-content > *, +[class*="inner-container"] > *, +.wp-block-template-part > * { + + margin-top: calc(0.666 * var(--global--spacing-vertical)); + margin-bottom: calc(0.666 * var(--global--spacing-vertical)); + + @include media(mobile) { + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); + } + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } +} + +.site-footer > *, +.widget-area > * { + margin-top: calc(0.666 * var(--global--spacing-vertical)); + margin-bottom: calc(0.666 * var(--global--spacing-vertical)); + + @include media(mobile) { + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); + } +} + +/* + * Block & non-gutenberg content wrapper children + * - Sets spacing-unit margins + */ +//.site-header > *, // Removed, to align site title and menu. +.entry-header > *, +.post-thumbnail > *, +.page-content > *, +.comment-content > *, +.widget > * { + margin-top: var(--global--spacing-unit); + margin-bottom: var(--global--spacing-unit); + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } +} + + +/* + * .entry-content children specific controls + * - Adds special margin overrides for alignment utility classes + */ +.entry-content > * { + + &.alignleft, + &.alignright, + &.alignleft:first-child + *, + &.alignright:first-child + *, + &.alignfull.has-background { + margin-top: 0; + } + + &:last-child, + &.alignfull.has-background { + margin-bottom: 0; + } + + /* Reset alignleft and alignright margins after alignfull */ + &.alignfull + .alignleft, + &.alignfull + .alignright { + margin-top: var(--global--spacing-vertical); + } +} diff --git a/themes/twentytwentyone/assets/sass/04-elements/blockquote.scss b/themes/twentytwentyone/assets/sass/04-elements/blockquote.scss index 3cc1d828..e599b0b2 100644 --- a/themes/twentytwentyone/assets/sass/04-elements/blockquote.scss +++ b/themes/twentytwentyone/assets/sass/04-elements/blockquote.scss @@ -1,81 +1,81 @@ -blockquote { - padding: 0; - position: relative; - margin: var(--global--spacing-vertical) 0 var(--global--spacing-vertical) var(--global--spacing-horizontal); - - > * { - margin-top: var(--global--spacing-unit); - margin-bottom: var(--global--spacing-unit); - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } - } - - p { - letter-spacing: var(--heading--letter-spacing-h4); - font-family: var(--quote--font-family); - font-size: var(--quote--font-size); - font-style: var(--quote--font-style); - font-weight: var(--quote--font-weight); - line-height: var(--quote--line-height); - } - - cite, - footer { - font-weight: normal; - color: var(--global--color-primary); - font-size: var(--global--font-size-xs); - letter-spacing: var(--global--letter-spacing); - } - - &.alignleft, - &.alignright { - - padding-left: inherit; - - p { - font-size: var(--heading--font-size-h5); - max-width: inherit; - width: inherit; - } - - cite, - footer { - font-size: var(--global--font-size-xs); - letter-spacing: var(--global--letter-spacing); - } - } - - strong { - font-weight: var(--quote--font-weight-strong); - } - - &:before { - content: "\201C"; - font-size: var(--quote--font-size); - line-height: var(--quote--line-height); - position: absolute; - left: calc(-0.5 * var(--global--spacing-horizontal)); - } - - .wp-block-quote__citation, - cite, - footer { - color: var(--global--color-primary); - font-size: var(--global--font-size-xs); - font-style: var(--quote--font-style-cite); - } - - @include media(mobile-only) { - padding-left: calc(0.5 * var(--global--spacing-horizontal)); - - &:before { - left: 0; - } - } -} +blockquote { + padding: 0; + position: relative; + margin: var(--global--spacing-vertical) 0 var(--global--spacing-vertical) var(--global--spacing-horizontal); + + > * { + margin-top: var(--global--spacing-unit); + margin-bottom: var(--global--spacing-unit); + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } + } + + p { + letter-spacing: var(--heading--letter-spacing-h4); + font-family: var(--quote--font-family); + font-size: var(--quote--font-size); + font-style: var(--quote--font-style); + font-weight: var(--quote--font-weight); + line-height: var(--quote--line-height); + } + + cite, + footer { + font-weight: normal; + color: var(--global--color-primary); + font-size: var(--global--font-size-xs); + letter-spacing: var(--global--letter-spacing); + } + + &.alignleft, + &.alignright { + + padding-left: inherit; + + p { + font-size: var(--heading--font-size-h5); + max-width: inherit; + width: inherit; + } + + cite, + footer { + font-size: var(--global--font-size-xs); + letter-spacing: var(--global--letter-spacing); + } + } + + strong { + font-weight: var(--quote--font-weight-strong); + } + + &:before { + content: "\201C"; + font-size: var(--quote--font-size); + line-height: var(--quote--line-height); + position: absolute; + left: calc(-0.5 * var(--global--spacing-horizontal)); + } + + .wp-block-quote__citation, + cite, + footer { + color: var(--global--color-primary); + font-size: var(--global--font-size-xs); + font-style: var(--quote--font-style-cite); + } + + @include media(mobile-only) { + padding-left: calc(0.5 * var(--global--spacing-horizontal)); + + &:before { + left: 0; + } + } +} diff --git a/themes/twentytwentyone/assets/sass/04-elements/forms-editor.scss b/themes/twentytwentyone/assets/sass/04-elements/forms-editor.scss index 935c29ed..5879c238 100644 --- a/themes/twentytwentyone/assets/sass/04-elements/forms-editor.scss +++ b/themes/twentytwentyone/assets/sass/04-elements/forms-editor.scss @@ -1,12 +1,12 @@ -select { - border: var(--form--border-width) solid var(--form--border-color); - border-radius: var(--form--border-radius); - color: var(--form--color-text); - font-size: var(--form--font-size); - -moz-appearance: none; - -webkit-appearance: none; - appearance: none; - padding: var(--form--spacing-unit) calc(3 * var(--form--spacing-unit)) var(--form--spacing-unit) var(--form--spacing-unit); - background: var(--global--color-white) url("data:image/svg+xml;utf8,") no-repeat; // stylelint-disable-line function-url-quotes - background-position: right var(--form--spacing-unit) top 60%; -} +select { + border: var(--form--border-width) solid var(--form--border-color); + border-radius: var(--form--border-radius); + color: var(--form--color-text); + font-size: var(--form--font-size); + -moz-appearance: none; + -webkit-appearance: none; + appearance: none; + padding: var(--form--spacing-unit) calc(3 * var(--form--spacing-unit)) var(--form--spacing-unit) var(--form--spacing-unit); + background: var(--global--color-white) url("data:image/svg+xml;utf8,") no-repeat; // stylelint-disable-line function-url-quotes + background-position: right var(--form--spacing-unit) top 60%; +} diff --git a/themes/twentytwentyone/assets/sass/04-elements/forms.scss b/themes/twentytwentyone/assets/sass/04-elements/forms.scss index f1835c00..6e734aae 100644 --- a/themes/twentytwentyone/assets/sass/04-elements/forms.scss +++ b/themes/twentytwentyone/assets/sass/04-elements/forms.scss @@ -1,329 +1,329 @@ -input[type="text"], -input[type="email"], -input[type="url"], -input[type="password"], -input[type="search"], -input[type="number"], -input[type="tel"], -input[type="date"], -input[type="month"], -input[type="week"], -input[type="time"], -input[type="datetime"], -input[type="datetime-local"], -input[type="color"], -.site textarea { - border: var(--form--border-width) solid var(--form--border-color); - border-radius: var(--form--border-radius); - color: var(--form--color-text); - line-height: var(--global--line-height-body); - padding: var(--form--spacing-unit); - // Gives a little more space for the outline offset. - margin: 0 2px; - max-width: 100%; - - &:focus { - color: var(--form--color-text); - outline-offset: 2px; - outline: 2px dotted var(--form--border-color); - } - - &:disabled { - opacity: 0.7; - } - - .is-dark-theme & { - background: var(--global--color-white-90); - } -} - -// Reset the negative offset from normalize to make the thicker "border" work on focus. -input[type="search"] { - - &:focus { - outline-offset: -7px; - - .is-dark-theme & { - outline-color: var(--global--color-background); - } - } -} - -input[type="color"] { - padding: calc(var(--form--spacing-unit) / 2); - height: calc(4 * var(--form--spacing-unit)); -} - -input[type="email"], -input[type="url"] { - - /*rtl:ignore*/ - direction: ltr; -} - -select { - border: var(--form--border-width) solid var(--form--border-color); - color: var(--form--color-text); - -moz-appearance: none; - -webkit-appearance: none; - appearance: none; - line-height: var(--global--line-height-body); - padding: var(--form--spacing-unit) calc(3 * var(--form--spacing-unit)) var(--form--spacing-unit) var(--form--spacing-unit); - background: var(--global--color-white) url("data:image/svg+xml;utf8,") no-repeat; // stylelint-disable-line function-url-quotes - background-position: right var(--form--spacing-unit) top 60%; - - &:focus { - outline-offset: 2px; - outline: 2px dotted var(--form--border-color); - } - - .is-dark-theme & { - background: var(--global--color-white-90) url("data:image/svg+xml;utf8,") no-repeat; // stylelint-disable-line function-url-quotes - background-position: right var(--form--spacing-unit) top 60%; - } -} - -textarea { - width: 100%; -} - -label { - font-size: var(--form--font-size); - font-weight: var(--form--label-weight); - margin-bottom: calc(var(--global--spacing-vertical) / 3); -} - -/** -https://css-tricks.com/custom-styling-form-inputs-with-modern-css-features/ -https://codepen.io/aaroniker/pen/ZEYoxEY by Aaron Iker. -License: MIT. -*/ -@supports (-webkit-appearance: none) or (-moz-appearance: none) { - - input[type="checkbox"], - input[type="radio"] { - -webkit-appearance: none; - -moz-appearance: none; - position: relative; - width: 25px; - height: 25px; - border: var(--form--border-width) solid var(--form--border-color); - background: var(--global--color-white); - - &:disabled { - opacity: 0.7; - } - - .is-dark-theme & { - background: var(--global--color-white-90); - } - } - - input[type="checkbox"] { - - &:focus { - outline-offset: 2px; - outline: 2px dotted var(--form--border-color); - } - - &:after { - content: ""; - opacity: 0; - display: block; - left: 5px; - top: 2px; - position: absolute; - width: 7px; - height: 13px; - border: 3px solid var(--form--color-text); - border-top: 0; - border-left: 0; - transform: rotate(30deg); - } - - &:checked { - color: var(--form--color-text); - - &:after { - opacity: 1; - } - } - } - - input[type="radio"] { - border-radius: 50%; - - &:focus { - outline-offset: 2px; - outline: 2px dotted var(--form--border-color); - } - - &:after { - content: ""; - opacity: 0; - display: block; - left: 3px; - top: 3px; - position: absolute; - width: 11px; - height: 11px; - border-radius: 50%; - background: var(--form--color-text); - } - - &:checked { - border: 4px solid var(--form--border-color); - - &:after { - opacity: 1; - } - - // Focus style for checked radio buttons. - &:focus { - outline-offset: 4px; - outline: 2px dotted var(--form--border-color); - } - } - } -} - -input[type="checkbox"] + label, -input[type="radio"] + label { - display: inline-block; - padding-left: 10px; - font-size: var(--global--font-size-xs); - vertical-align: top; -} - -/** - * https://css-tricks.com/styling-cross-browser-compatible-range-inputs-css/ -*/ -@supports (-webkit-appearance: none) or (-moz-appearance: none) { - - input[type="range"] { - -webkit-appearance: none; /* Hides the slider so that custom slider can be made */ - width: 100%; /* Specific width is required for Firefox. */ - height: 6px; - background: var(--form--color-ranged); - border-radius: 6px; - outline-offset: 10px; - - &:disabled { - opacity: 0.7; - } - } - - input[type="range"]::-webkit-slider-thumb { - -webkit-appearance: none; - border: 3px solid var(--form--color-ranged); - height: 44px; - width: 44px; - border-radius: 50%; - background: var(--global--color-background); - cursor: pointer; - } - - input[type="range"]::-moz-range-thumb { - border: 3px solid var(--form--color-ranged); - height: 44px; - width: 44px; - border-radius: 50%; - background: var(--global--color-background); - cursor: pointer; - box-sizing: border-box; - } -} - -input[type="range"]::-ms-track { - width: 100%; - height: 6px; - border-radius: 6px; - border-width: 19px 0; - border-color: var(--global--color-background); - background: transparent; - color: transparent; - cursor: pointer; -} - -input[type="range"]::-ms-fill-upper { - background: var(--form--color-ranged); - border-radius: 6px; -} - -input[type="range"]::-ms-fill-lower { - background: var(--form--color-ranged); - border-radius: 6px; -} - -input[type="range"]::-ms-thumb { - border: 3px solid var(--form--color-ranged); - height: 44px; - width: 44px; - border-radius: 50%; - background: var(--global--color-background); - cursor: pointer; -} - -fieldset { - display: grid; - border-color: var(--global--color-secondary); - padding: var(--global--spacing-horizontal); - - legend { - font-size: var(--global--font-size-lg); - } - - input { - - &[type="submit"] { - max-width: max-content; - } - - &:not([type="submit"]) { - margin-bottom: var(--global--spacing-unit); - } - - &[type="radio"], - &[type="checkbox"] { - margin-bottom: 0; - } - - &[type="radio"] + label, - &[type="checkbox"] + label { - font-size: var(--form--font-size); - padding-left: 0; - margin-bottom: var(--global--spacing-unit); - } - } -} - -::-moz-placeholder { // Firefox 19+ - opacity: 1; -} - -.post-password-message { - font-size: var(--global--font-size-lg); -} - -.post-password-form { - display: flex; - flex-wrap: wrap; - - &__label { - width: 100%; - margin-bottom: 0; - } - - input[type="password"] { - flex-grow: 1; - margin-top: calc(var(--global--spacing-vertical) / 3); - margin-right: calc(0.66 * var(--global--spacing-horizontal)); - } - - &__submit { - margin-top: calc(var(--global--spacing-vertical) / 3); - @include media(tablet) { - margin-left: calc(0.4 * var(--global--spacing-horizontal)); - } - } -} +input[type="text"], +input[type="email"], +input[type="url"], +input[type="password"], +input[type="search"], +input[type="number"], +input[type="tel"], +input[type="date"], +input[type="month"], +input[type="week"], +input[type="time"], +input[type="datetime"], +input[type="datetime-local"], +input[type="color"], +.site textarea { + border: var(--form--border-width) solid var(--form--border-color); + border-radius: var(--form--border-radius); + color: var(--form--color-text); + line-height: var(--global--line-height-body); + padding: var(--form--spacing-unit); + // Gives a little more space for the outline offset. + margin: 0 2px; + max-width: 100%; + + &:focus { + color: var(--form--color-text); + outline-offset: 2px; + outline: 2px dotted var(--form--border-color); + } + + &:disabled { + opacity: 0.7; + } + + .is-dark-theme & { + background: var(--global--color-white-90); + } +} + +// Reset the negative offset from normalize to make the thicker "border" work on focus. +input[type="search"] { + + &:focus { + outline-offset: -7px; + + .is-dark-theme & { + outline-color: var(--global--color-background); + } + } +} + +input[type="color"] { + padding: calc(var(--form--spacing-unit) / 2); + height: calc(4 * var(--form--spacing-unit)); +} + +input[type="email"], +input[type="url"] { + + /*rtl:ignore*/ + direction: ltr; +} + +select { + border: var(--form--border-width) solid var(--form--border-color); + color: var(--form--color-text); + -moz-appearance: none; + -webkit-appearance: none; + appearance: none; + line-height: var(--global--line-height-body); + padding: var(--form--spacing-unit) calc(3 * var(--form--spacing-unit)) var(--form--spacing-unit) var(--form--spacing-unit); + background: var(--global--color-white) url("data:image/svg+xml;utf8,") no-repeat; // stylelint-disable-line function-url-quotes + background-position: right var(--form--spacing-unit) top 60%; + + &:focus { + outline-offset: 2px; + outline: 2px dotted var(--form--border-color); + } + + .is-dark-theme & { + background: var(--global--color-white-90) url("data:image/svg+xml;utf8,") no-repeat; // stylelint-disable-line function-url-quotes + background-position: right var(--form--spacing-unit) top 60%; + } +} + +textarea { + width: 100%; +} + +label { + font-size: var(--form--font-size); + font-weight: var(--form--label-weight); + margin-bottom: calc(var(--global--spacing-vertical) / 3); +} + +/** +https://css-tricks.com/custom-styling-form-inputs-with-modern-css-features/ +https://codepen.io/aaroniker/pen/ZEYoxEY by Aaron Iker. +License: MIT. +*/ +@supports (-webkit-appearance: none) or (-moz-appearance: none) { + + input[type="checkbox"], + input[type="radio"] { + -webkit-appearance: none; + -moz-appearance: none; + position: relative; + width: 25px; + height: 25px; + border: var(--form--border-width) solid var(--form--border-color); + background: var(--global--color-white); + + &:disabled { + opacity: 0.7; + } + + .is-dark-theme & { + background: var(--global--color-white-90); + } + } + + input[type="checkbox"] { + + &:focus { + outline-offset: 2px; + outline: 2px dotted var(--form--border-color); + } + + &:after { + content: ""; + opacity: 0; + display: block; + left: 5px; + top: 2px; + position: absolute; + width: 7px; + height: 13px; + border: 3px solid var(--form--color-text); + border-top: 0; + border-left: 0; + transform: rotate(30deg); + } + + &:checked { + color: var(--form--color-text); + + &:after { + opacity: 1; + } + } + } + + input[type="radio"] { + border-radius: 50%; + + &:focus { + outline-offset: 2px; + outline: 2px dotted var(--form--border-color); + } + + &:after { + content: ""; + opacity: 0; + display: block; + left: 3px; + top: 3px; + position: absolute; + width: 11px; + height: 11px; + border-radius: 50%; + background: var(--form--color-text); + } + + &:checked { + border: 4px solid var(--form--border-color); + + &:after { + opacity: 1; + } + + // Focus style for checked radio buttons. + &:focus { + outline-offset: 4px; + outline: 2px dotted var(--form--border-color); + } + } + } +} + +input[type="checkbox"] + label, +input[type="radio"] + label { + display: inline-block; + padding-left: 10px; + font-size: var(--global--font-size-xs); + vertical-align: top; +} + +/** + * https://css-tricks.com/styling-cross-browser-compatible-range-inputs-css/ +*/ +@supports (-webkit-appearance: none) or (-moz-appearance: none) { + + input[type="range"] { + -webkit-appearance: none; /* Hides the slider so that custom slider can be made */ + width: 100%; /* Specific width is required for Firefox. */ + height: 6px; + background: var(--form--color-ranged); + border-radius: 6px; + outline-offset: 10px; + + &:disabled { + opacity: 0.7; + } + } + + input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + border: 3px solid var(--form--color-ranged); + height: 44px; + width: 44px; + border-radius: 50%; + background: var(--global--color-background); + cursor: pointer; + } + + input[type="range"]::-moz-range-thumb { + border: 3px solid var(--form--color-ranged); + height: 44px; + width: 44px; + border-radius: 50%; + background: var(--global--color-background); + cursor: pointer; + box-sizing: border-box; + } +} + +input[type="range"]::-ms-track { + width: 100%; + height: 6px; + border-radius: 6px; + border-width: 19px 0; + border-color: var(--global--color-background); + background: transparent; + color: transparent; + cursor: pointer; +} + +input[type="range"]::-ms-fill-upper { + background: var(--form--color-ranged); + border-radius: 6px; +} + +input[type="range"]::-ms-fill-lower { + background: var(--form--color-ranged); + border-radius: 6px; +} + +input[type="range"]::-ms-thumb { + border: 3px solid var(--form--color-ranged); + height: 44px; + width: 44px; + border-radius: 50%; + background: var(--global--color-background); + cursor: pointer; +} + +fieldset { + display: grid; + border-color: var(--global--color-secondary); + padding: var(--global--spacing-horizontal); + + legend { + font-size: var(--global--font-size-lg); + } + + input { + + &[type="submit"] { + max-width: max-content; + } + + &:not([type="submit"]) { + margin-bottom: var(--global--spacing-unit); + } + + &[type="radio"], + &[type="checkbox"] { + margin-bottom: 0; + } + + &[type="radio"] + label, + &[type="checkbox"] + label { + font-size: var(--form--font-size); + padding-left: 0; + margin-bottom: var(--global--spacing-unit); + } + } +} + +::-moz-placeholder { // Firefox 19+ + opacity: 1; +} + +.post-password-message { + font-size: var(--global--font-size-lg); +} + +.post-password-form { + display: flex; + flex-wrap: wrap; + + &__label { + width: 100%; + margin-bottom: 0; + } + + input[type="password"] { + flex-grow: 1; + margin-top: calc(var(--global--spacing-vertical) / 3); + margin-right: calc(0.66 * var(--global--spacing-horizontal)); + } + + &__submit { + margin-top: calc(var(--global--spacing-vertical) / 3); + @include media(tablet) { + margin-left: calc(0.4 * var(--global--spacing-horizontal)); + } + } +} diff --git a/themes/twentytwentyone/assets/sass/04-elements/links.scss b/themes/twentytwentyone/assets/sass/04-elements/links.scss index 23c48d7c..6c121e04 100644 --- a/themes/twentytwentyone/assets/sass/04-elements/links.scss +++ b/themes/twentytwentyone/assets/sass/04-elements/links.scss @@ -1,68 +1,77 @@ -/* - * text-underline-offset doesn't work in Chrome at all 👎 - * But looks nice in Safari/Firefox, so let's keep it and - * maybe Chrome will support it soon. - */ -a { - cursor: pointer; - color: var(--wp--style--color--link, var(--global--color-primary)); - text-underline-offset: 3px; - text-decoration-skip-ink: all; -} - -a:hover { - text-decoration-style: dotted; - text-decoration-skip-ink: none; -} - -.site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) { - - /* Only visible in Windows High Contrast mode */ - outline: 2px solid transparent; - - text-decoration: underline 1px dotted currentColor; - text-decoration-skip-ink: none; - background: rgba(255, 255, 255, .9); - - // Change text color when the body background is dark. - .is-dark-theme &, - .is-dark-theme & .meta-nav { - color: var(--wp--style--color--link, var(--global--color-background)); - } - - // Change colors when the body background is white. - .has-background-white & { - background: rgba(0, 0, 0, .9); - color: var(--wp--style--color--link, var(--global--color-white)); - - .meta-nav { - color: var(--wp--style--color--link, var(--global--color-white)); - } - } - - &.skip-link { - - /* Only visible in Windows High Contrast mode */ - outline: 2px solid transparent; - outline-offset: -2px; - - &:focus { - color: #21759b; - background-color: #f1f1f1; - } - } - - img { - outline: 2px dotted var(--wp--style--color--link, var(--global--color-primary)); - } -} - -// Enforce the custom link color even if a custom background color has been set. -// The extra specificity here is required to override the background color styles. -.has-background { - // Target both current level and nested block. - .has-link-color a, - &.has-link-color a { - color: var(--wp--style--color--link, var(--global--color-primary)); - } -} +/* + * text-underline-offset doesn't work in Chrome at all 👎 + * But looks nice in Safari/Firefox, so let's keep it and + * maybe Chrome will support it soon. + */ +a { + cursor: pointer; + color: var(--wp--style--color--link, var(--global--color-primary)); + text-underline-offset: 3px; + text-decoration-skip-ink: all; +} + +a:hover { + text-decoration-style: dotted; + text-decoration-skip-ink: none; +} + +.site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) { + + /* Only visible in Windows High Contrast mode */ + outline: 2px solid transparent; + + text-decoration: underline 1px dotted currentColor; + text-decoration-skip-ink: none; + background: rgba(255, 255, 255, .9); + + // Change text color when the body background is dark. + .is-dark-theme & { + background: var(--global--color-black); + color: var(--global--color-white); + text-decoration: none; + + .meta-nav { + color: var(--wp--style--color--link, var(--global--color-white)); + } + } + + // Change colors when the body background is white. + .has-background-white & { + background: rgba(0, 0, 0, .9); + color: var(--wp--style--color--link, var(--global--color-white)); + + .meta-nav { + color: var(--wp--style--color--link, var(--global--color-white)); + } + } + + &.skip-link { + + /* Only visible in Windows High Contrast mode */ + outline: 2px solid transparent; + outline-offset: -2px; + + &:focus { + color: #21759b; + background-color: #f1f1f1; + } + } + + &.custom-logo-link { + background: none; + } + + img { + outline: 2px dotted var(--wp--style--color--link, var(--global--color-primary)); + } +} + +// Enforce the custom link color even if a custom background color has been set. +// The extra specificity here is required to override the background color styles. +.has-background { + // Target both current level and nested block. + .has-link-color a, + &.has-link-color a { + color: var(--wp--style--color--link, var(--global--color-primary)); + } +} diff --git a/themes/twentytwentyone/assets/sass/04-elements/media.scss b/themes/twentytwentyone/assets/sass/04-elements/media.scss index 9401d15a..b141fb51 100644 --- a/themes/twentytwentyone/assets/sass/04-elements/media.scss +++ b/themes/twentytwentyone/assets/sass/04-elements/media.scss @@ -1,46 +1,46 @@ -img { - display: block; - height: auto; - max-width: 100%; -} - -/* Classic editor images */ -.entry-content img { - max-width: 100%; -} - -/* Make sure embeds and iframes fit their containers. */ -embed, -iframe, -object, -video { - max-width: 100%; -} - -/* Media captions */ -figcaption, -.wp-caption, -.wp-caption-text, -.wp-block-embed figcaption { - color: currentColor; - font-size: var(--global--font-size-xs); - line-height: var(--global--line-height-body); - margin-top: calc(0.5 * var(--global--spacing-unit)); - margin-bottom: var(--global--spacing-unit); - text-align: center; - - .alignleft &, - .alignright & { - margin-bottom: 0; - } -} - -/* WP Smiley */ -.page-content .wp-smiley, -.entry-content .wp-smiley, -.comment-content .wp-smiley { - border: none; - margin-bottom: 0; - margin-top: 0; - padding: 0; -} +img { + height: auto; + max-width: 100%; + vertical-align: middle; +} + +/* Classic editor images */ +.entry-content img { + max-width: 100%; +} + +/* Make sure embeds and iframes fit their containers. */ +embed, +iframe, +object, +video { + max-width: 100%; +} + +/* Media captions */ +figcaption, +.wp-caption, +.wp-caption-text, +.wp-block-embed figcaption { + color: currentColor; + font-size: var(--global--font-size-xs); + line-height: var(--global--line-height-body); + margin-top: calc(0.5 * var(--global--spacing-unit)); + margin-bottom: var(--global--spacing-unit); + text-align: center; + + .alignleft &, + .alignright & { + margin-bottom: 0; + } +} + +/* WP Smiley */ +.page-content .wp-smiley, +.entry-content .wp-smiley, +.comment-content .wp-smiley { + border: none; + margin-bottom: 0; + margin-top: 0; + padding: 0; +} diff --git a/themes/twentytwentyone/assets/sass/04-elements/misc.scss b/themes/twentytwentyone/assets/sass/04-elements/misc.scss index 37af94df..9fe7247a 100644 --- a/themes/twentytwentyone/assets/sass/04-elements/misc.scss +++ b/themes/twentytwentyone/assets/sass/04-elements/misc.scss @@ -1,17 +1,17 @@ -/* Over here, place any elements that do not need to have their own file. */ -b, -strong { - font-weight: 700; -} - -dfn, -cite, -em, -i { - font-style: italic; -} - -pre { - white-space: pre; - overflow-x: auto; -} +/* Over here, place any elements that do not need to have their own file. */ +b, +strong { + font-weight: 700; +} + +dfn, +cite, +em, +i { + font-style: italic; +} + +pre { + white-space: pre; + overflow-x: auto; +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/_config.scss b/themes/twentytwentyone/assets/sass/05-blocks/_config.scss index cba90a3c..481c544c 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/_config.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/_config.scss @@ -1,7 +1,7 @@ -// Variable Configuration -// - Import all config files for display in -// the editor, customizer, and front end. - - -@import "separator/config"; -@import "utilities/config"; +// Variable Configuration +// - Import all config files for display in +// the editor, customizer, and front end. + + +@import "separator/config"; +@import "utilities/config"; diff --git a/themes/twentytwentyone/assets/sass/05-blocks/audio/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/audio/_style.scss index 0f5dadce..0e2d1d0b 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/audio/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/audio/_style.scss @@ -1,7 +1,7 @@ -.wp-block-audio { - - audio:focus { - outline-offset: 5px; - outline: 2px solid var(--global--color-primary); - } -} +.wp-block-audio { + + audio:focus { + outline-offset: 5px; + outline: 2px solid var(--global--color-primary); + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/blocks-editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/blocks-editor.scss index 9bd20dd1..d7758c31 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/blocks-editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/blocks-editor.scss @@ -1,35 +1,35 @@ -// Block Styles for the Editor -// - These styles replace key Gutenberg Block styles for fonts, colors, and -// spacing with CSS-variables overrides in the Block Editor -// - In the future the Block styles may get compiled to individual .css -// files and conditionally loaded - -@import "button/editor"; -@import "code/editor"; -@import "cover/editor"; -@import "columns/editor"; -@import "file/editor"; -@import "gallery/editor"; -@import "group/editor"; -@import "heading/editor"; -@import "html/editor"; -@import "image/editor"; -@import "latest-comments/editor"; -@import "latest-posts/editor"; -@import "legacy/editor"; // "Blocks" from the legacy WP editor, ie: galleries, .button class, etc. -@import "list/editor"; -@import "media-text/editor"; -@import "navigation/editor"; -@import "paragraph/editor"; -@import "preformatted/editor"; -@import "pullquote/editor"; -@import "quote/editor"; -@import "rss/editor"; -@import "search/editor"; -@import "separator/editor"; -@import "social-icons/editor"; -@import "table/editor"; -@import "tag-clould/editor"; -@import "verse/editor"; -@import "utilities/font-sizes"; -@import "utilities/editor"; // Import LAST to cascade properly +// Block Styles for the Editor +// - These styles replace key Gutenberg Block styles for fonts, colors, and +// spacing with CSS-variables overrides in the Block Editor +// - In the future the Block styles may get compiled to individual .css +// files and conditionally loaded + +@import "button/editor"; +@import "code/editor"; +@import "cover/editor"; +@import "columns/editor"; +@import "file/editor"; +@import "gallery/editor"; +@import "group/editor"; +@import "heading/editor"; +@import "html/editor"; +@import "image/editor"; +@import "latest-comments/editor"; +@import "latest-posts/editor"; +@import "legacy/editor"; // "Blocks" from the legacy WP editor, ie: galleries, .button class, etc. +@import "list/editor"; +@import "media-text/editor"; +@import "navigation/editor"; +@import "paragraph/editor"; +@import "preformatted/editor"; +@import "pullquote/editor"; +@import "quote/editor"; +@import "rss/editor"; +@import "search/editor"; +@import "separator/editor"; +@import "social-icons/editor"; +@import "table/editor"; +@import "tag-clould/editor"; +@import "verse/editor"; +@import "utilities/font-sizes"; +@import "utilities/editor"; // Import LAST to cascade properly diff --git a/themes/twentytwentyone/assets/sass/05-blocks/blocks.scss b/themes/twentytwentyone/assets/sass/05-blocks/blocks.scss index c4c80e95..f04cd7ee 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/blocks.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/blocks.scss @@ -1,37 +1,37 @@ -// Blocks -// - These styles replace key Gutenberg Block styles with font, color, and -// spacing with CSS-variables overrides -// - In the future the Block styles may get compiled to individual .css -// files and conditionally loaded - -@import "audio/style"; -@import "button/style"; -@import "code/style"; -@import "columns/style"; -@import "cover/style"; -@import "file/style"; -@import "gallery/style"; -@import "group/style"; -@import "heading/style"; -@import "image/style"; -@import "latest-comments/style"; -@import "latest-posts/style"; -@import "legacy/style"; // "Blocks" from the legacy WP editor, ie: galleries, .button class, etc. -@import "list/style"; -@import "media-text/style"; -@import "navigation/style"; -@import "paragraph/style"; -@import "preformatted/style"; -@import "pullquote/style"; -@import "quote/style"; -@import "rss/style"; -@import "search/style"; -@import "separator/style"; -@import "social-icons/style"; -@import "spacer/style"; -@import "table/style"; -@import "tag-clould/style"; -@import "verse/style"; -@import "video/style"; -@import "utilities/font-sizes"; -@import "utilities/style"; // Import LAST to cascade properly +// Blocks +// - These styles replace key Gutenberg Block styles with font, color, and +// spacing with CSS-variables overrides +// - In the future the Block styles may get compiled to individual .css +// files and conditionally loaded + +@import "audio/style"; +@import "button/style"; +@import "code/style"; +@import "columns/style"; +@import "cover/style"; +@import "file/style"; +@import "gallery/style"; +@import "group/style"; +@import "heading/style"; +@import "image/style"; +@import "latest-comments/style"; +@import "latest-posts/style"; +@import "legacy/style"; // "Blocks" from the legacy WP editor, ie: galleries, .button class, etc. +@import "list/style"; +@import "media-text/style"; +@import "navigation/style"; +@import "paragraph/style"; +@import "preformatted/style"; +@import "pullquote/style"; +@import "quote/style"; +@import "rss/style"; +@import "search/style"; +@import "separator/style"; +@import "social-icons/style"; +@import "spacer/style"; +@import "table/style"; +@import "tag-clould/style"; +@import "verse/style"; +@import "video/style"; +@import "utilities/font-sizes"; +@import "utilities/style"; // Import LAST to cascade properly diff --git a/themes/twentytwentyone/assets/sass/05-blocks/button/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/button/_editor.scss index 9480a70b..f8ec69e1 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/button/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/button/_editor.scss @@ -1,118 +1,141 @@ -.wp-block-button__link { - // Extend button style - @include button-style(); -} - -/** - * Block Options - */ - -// The parent container does not need outer margins applied. -// The children should all have top and bottom margins. -[data-block].wp-block-buttons { - margin-top: 0; - margin-bottom: 0; - - .wp-block-button:first-child { - margin-top: var(--global--spacing-vertical); - } - - .wp-block-button:last-child { - margin-bottom: var(--global--spacing-vertical); - } -} - -.wp-block-button { - - // Target the default and filled button states. - &:not(.is-style-outline) { - - .wp-block-button__link { - - &:active { - color: var(--button--color-text-active) !important; - background: transparent !important; - border-color: var(--button--color-background); - } - - &:hover { - color: var(--button--color-text-hover) !important; - background: transparent !important; - border-color: var(--button--color-background); - } - } - } - - // Outline Style. - &.is-style-outline { - - .wp-block-button__link { - color: var(--button--color-background); - background: transparent; - border: var(--button--border-width) solid currentColor; - padding: var(--button--padding-vertical) var(--button--padding-horizontal); - - &:active, - &:hover { - background-color: var(--button--color-background); - color: var(--button--color-text); - border-color: var(--button--color-background); - } - - &.has-background { - border-color: var(--button--color-background); - - &:active, - &:hover { - background-color: var(--button--color-background) !important; - } - } - - &.has-background:not(.has-text-color) { - color: var(--global--color-dark-gray); - } - - &.has-background.has-gray-background-color:not(.has-text-color), - &.has-background.has-dark-gray-background-color:not(.has-text-color), - &.has-background.has-black-background-color:not(.has-text-color) { - color: var(--global--color-white); - } - - .is-dark-theme & { - - &:not(.has-text-color) { - - &.has-background.has-white-background-color, - &.has-background.has-green-background-color, - &.has-background.has-blue-background-color, - &.has-background.has-purple-background-color, - &.has-background.has-red-background-color, - &.has-background.has-orange-background-color, - &.has-background.has-yellow-background-color { - color: var(--global--color-dark-gray); - } - } - } - - &.has-text-color { - border-color: currentColor; - - &:active, - &:hover { - color: var(--button--color-text) !important; - border-color: var(--button--color-background); - } - } - } - } - - // Squared Style - &.is-style-squared { - border-radius: 0; - } -} - -.is-style-outline .wp-block-button__link[style*="radius"], -.wp-block-button__link[style*="radius"] { - outline-offset: 2px; -} +.wp-block-button__link { + // Extend button style + @include button-style(); +} + +/** + * Block Options + */ + +// The parent container does not need outer margins applied. +// The children should all have top and bottom margins. +[data-block].wp-block-buttons { + margin-top: 0; + margin-bottom: 0; + + .wp-block-button:first-child { + margin-top: var(--global--spacing-vertical); + } + + .wp-block-button:last-child { + margin-bottom: var(--global--spacing-vertical); + } +} + +.wp-block-button { + + // Target the default and filled button states. + &:not(.is-style-outline) { + + .wp-block-button__link:not(:hover):not(:active) { + + // Text colors + &:not(.has-text-color) { + color: var(--global--color-background); + + // Nested + .has-background & { + color: var(--local--color-background, var(--global--color-background)); + + &.has-background { + color: var(--global--color-primary); + } + } + } + + // Background-colors + &:not(.has-background) { + background-color: var(--global--color-primary); + + // Nested + .has-background & { + background-color: var(--local--color-primary, var(--global--color-primary)); + } + } + } + + // Hover Button color should match parent element foreground color + .wp-block-button__link:hover, + .wp-block-button__link:active { + border-color: currentColor !important; + background-color: transparent !important; + color: inherit !important; + } + + // Remove :focus styles in the editor + .wp-block-button__link:focus { + outline-offset: inherit; + outline: inherit; + } + } + + // Outline Style. + &.is-style-outline { + + .wp-block-button__link:not(:hover):not(:active) { + + // Border colors + &:not(.has-text-color), + &:not(.has-background), + &.has-background { + border-color: currentColor; + } + + // Text colors + &:not(.has-text-color) { + color: var(--global--color-primary); + + // Nested + .has-background & { + color: var(--local--color-primary, var(--global--color-primary)); + } + } + + &.has-background { + // Nested + .has-background &:not(.has-text-color) { + color: inherit; + } + } + + // Background-colors + &:not(.has-background) { + background-color: transparent; + } + } + + // Hover Button color should match default button style + .wp-block-button__link:hover, + .wp-block-button__link:active { + + background-color: var(--global--color-primary) !important; + border-color: transparent !important; + color: var(--global--color-background) !important; + + .has-background & { + background-color: var(--local--color-primary, var(--global--color-primary)) !important; + color: var(--local--color-background, var(--global--color-background)) !important; + } + + .has-text-color & { + color: var(--local--color-background, var(--global--color-background)) !important; + } + } + + // Remove :focus styles in the editor + .wp-block-button__link:focus { + outline-offset: inherit; + outline: inherit; + } + } + + // Squared Style + &.is-style-squared { + border-radius: 0; + } +} + +.is-style-outline .wp-block-button__link[style*="radius"], +.wp-block-button__link[style*="radius"] { + outline-offset: 2px; +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/button/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/button/_style.scss index 856a1566..180707e7 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/button/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/button/_style.scss @@ -1,134 +1,122 @@ -/** - * Button - */ -.site .button, -input[type="submit"], -input[type="reset"], -.wp-block-search__button, -.wp-block-button .wp-block-button__link { - // Extend button style - @include button-style(); -} - -.site .button, -input[type="submit"], -input[type="reset"], -.wp-block-search .wp-block-search__button, -.wp-block-file .wp-block-file__button { - - &:active { - color: var(--button--color-text-active); - background-color: var(--button--color-background-active); - } - - &:hover { - color: var(--button--color-text-hover); - background: transparent; - } -} - -/** - * Block Options - */ -.wp-block-button { - - // Target the default and filled button states. - &:not(.is-style-outline) { - - .wp-block-button__link { - - &:active { - color: var(--button--color-text-active) !important; - background: transparent !important; - border-color: var(--button--color-background); - } - - &:hover { - color: var(--button--color-text-hover) !important; - background: transparent !important; - border-color: var(--button--color-background); - } - - &:focus { - color: var(--button--color-text) !important; - background: var(--button--color-background) !important; - } - } - } - - // Outline Style. - &.is-style-outline { - - .wp-block-button__link { - padding: var(--button--padding-vertical) var(--button--padding-horizontal); - - &:not(.has-background) { - background: transparent; - } - - &:not(.has-background):not(.has-text-color) { - background: transparent; - color: var(--button--color-background); - border-color: var(--button--color-background); - } - - &.has-background:not(.has-text-color) { - color: currentColor; - } - - &.has-background.has-gray-background-color:not(.has-text-color), - &.has-background.has-dark-gray-background-color:not(.has-text-color), - &.has-background.has-black-background-color:not(.has-text-color) { - color: var(--global--color-white); - } - - .is-dark-theme & { - - &:not(.has-text-color) { - - &.has-background { - color: var(--global--color-dark-gray); - } - - &.has-background.has-gray-background-color, - &.has-background.has-dark-gray-background-color, - &.has-background.has-black-background-color { - color: var(--global--color-white); - } - } - } - - &.has-text-color, - &.has-background.has-text-color { - border-color: currentColor; - } - - &:active, - &:hover { - color: var(--button--color-text) !important; - background: var(--button--color-background) !important; - border-color: var(--button--color-background); - - &.has-text-color { - border-color: var(--button--color-background); - } - } - - &:focus { - color: var(--button--color-background) !important; - background: transparent !important; - } - } - } - - // Squared Style - .is-style-squared .wp-block-button__link { - border-radius: 0; - } -} - -.is-style-outline .wp-block-button__link[style*="radius"]:focus, -.wp-block-button a.wp-block-button__link[style*="radius"]:focus { - outline-offset: 2px; - outline: 2px dotted var(--button--color-background); -} +/** + * Button + */ +.site .button, +button, +input[type="submit"], +input[type="reset"], +.wp-block-search .wp-block-search__button, +.wp-block-button .wp-block-button__link, +.wp-block-file a.wp-block-file__button { + // Extend button style + @include button-style(); +} + +/** + * Block Options + */ +.wp-block-button { + + // Target the default and filled button states. + &:not(.is-style-outline) { + + .wp-block-button__link:not(:hover):not(:active) { + + // Text colors + &:not(.has-text-color) { + color: var(--global--color-background); + + // Nested + .has-background & { + color: var(--local--color-background, var(--global--color-background)); + + &.has-background { + color: var(--global--color-primary); + } + } + } + + // Background-colors + &:not(.has-background) { + background-color: var(--global--color-primary); + + // Nested + .has-background & { + background-color: var(--local--color-primary, var(--global--color-primary)); + } + } + } + + // Hover Button color should match parent element foreground color + .wp-block-button__link:hover, + .wp-block-button__link:active { + border-color: currentColor !important; + background-color: transparent !important; + color: inherit !important; + } + } + + // Outline Style. + &.is-style-outline { + + .wp-block-button__link:not(:hover):not(:active) { + + // Border colors + &:not(.has-text-color), + &:not(.has-background), + &.has-background { + border-color: currentColor; + } + + // Text colors + &:not(.has-text-color) { + color: var(--global--color-primary); + + // Nested + .has-background & { + color: var(--local--color-primary, var(--global--color-primary)); + } + } + + &.has-background { + // Nested + .has-background &:not(.has-text-color) { + color: inherit; + } + } + + // Background-colors + &:not(.has-background) { + background-color: transparent; + } + } + + .wp-block-button__link:hover, + .wp-block-button__link:active { + + border-color: transparent !important; + background-color: var(--global--color-primary) !important; + color: var(--global--color-background) !important; + + .has-background & { + background-color: var(--local--color-primary, var(--global--color-primary)) !important; + color: var(--local--color-background, var(--global--color-background)) !important; + } + + .has-text-color & { + color: var(--local--color-background, var(--global--color-background)) !important; + } + } + } + + // Squared Style + .is-style-squared .wp-block-button__link { + border-radius: 0; + } +} + +.is-style-outline .wp-block-button__link[style*="radius"]:focus, +.wp-block-button a.wp-block-button__link[style*="radius"]:focus { + outline-offset: 2px; + outline: 2px dotted var(--button--color-background); +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/code/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/code/_editor.scss index 023694f8..0fc99c9c 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/code/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/code/_editor.scss @@ -1,14 +1,13 @@ -.wp-block-code code { - font-size: var(--global--font-size-xs); - white-space: pre !important; - overflow-x: auto; -} - -.wp-block-code { - border-color: var(--global--color-border); - border-radius: 0; - border-style: solid; - border-width: 0.1rem; - padding: var(--global--spacing-unit); - color: currentColor; -} +.wp-block-code code { + white-space: pre !important; + overflow-x: auto; +} + +.wp-block-code { + border-color: var(--global--color-border); + border-radius: 0; + border-style: solid; + border-width: 0.1rem; + padding: var(--global--spacing-unit); + color: currentColor; +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/code/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/code/_style.scss index daa6f768..2867559d 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/code/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/code/_style.scss @@ -1,15 +1,14 @@ -.wp-block-code { - border-color: var(--global--color-border); - border-radius: 0; - border-style: solid; - border-width: 0.1rem; - padding: var(--global--spacing-unit); - - code { - color: var(--global--color-primary); - font-size: var(--global--font-size-xs); - white-space: pre; - overflow-x: auto; - display: block; - } -} +.wp-block-code { + border-color: var(--global--color-border); + border-radius: 0; + border-style: solid; + border-width: 0.1rem; + padding: var(--global--spacing-unit); + + code { + color: var(--global--color-primary); + white-space: pre; + overflow-x: auto; + display: block; + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/columns/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/columns/_editor.scss index 16248412..7e259aad 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/columns/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/columns/_editor.scss @@ -1,68 +1,68 @@ -.wp-block-columns { - - &:not(.alignwide):not(.alignfull) { - clear: both; - } - - .wp-block, - .wp-block-column { - // Allow Gutenberg to set the width of a block that lives inside the columns block. - max-width: inherit; - } - - @include innerblock-margin-clear(".wp-block-column"); - - &.is-style-twentytwentyone-columns-overlap { - - @include media(laptop) { - - .wp-block-column:nth-child(2n) { - margin-left: calc(-2 * var(--global--spacing-horizontal)); - margin-top: calc(2.5 * var(--global--spacing-horizontal)); - z-index: 2; - - // Provide text-based child blocks with a default background color to ensure they're readable. - > p, - > h1, - > h2, - > h3, - > h4, - > h5, - > h6, - > ul, - > ol, - > pre { - - &:not(.has-background) { - background-color: var(--global--color-background); - padding: var(--global--spacing-unit); - } - } - - // Lists should still have their usual left padding. - > ul:not(.has-background), - > ol:not(.has-background) { - padding-left: calc(2 * var(--global--spacing-horizontal)); - } - - &.is-vertically-aligned-center { - margin-top: 0; - } - } - } - } - - .wp-block[data-align="full"] > & { - - p:not(.has-background), - h1:not(.has-background), - h2:not(.has-background), - h3:not(.has-background), - h4:not(.has-background), - h5:not(.has-background), - h6:not(.has-background) { - padding-left: var(--global--spacing-unit); - padding-right: var(--global--spacing-unit); - } - } -} +.wp-block-columns { + + &:not(.alignwide):not(.alignfull) { + clear: both; + } + + .wp-block, + .wp-block-column { + // Allow Gutenberg to set the width of a block that lives inside the columns block. + max-width: inherit; + } + + @include innerblock-margin-clear(".wp-block-column"); + + &.is-style-twentytwentyone-columns-overlap { + + @include media(laptop) { + + .wp-block-column:nth-child(2n) { + margin-left: calc(-2 * var(--global--spacing-horizontal)); + margin-top: calc(2.5 * var(--global--spacing-horizontal)); + z-index: 2; + + // Provide text-based child blocks with a default background color to ensure they're readable. + > p, + > h1, + > h2, + > h3, + > h4, + > h5, + > h6, + > ul, + > ol, + > pre { + + &:not(.has-background) { + background-color: var(--global--color-background); + padding: var(--global--spacing-unit); + } + } + + // Lists should still have their usual left padding. + > ul:not(.has-background), + > ol:not(.has-background) { + padding-left: calc(2 * var(--global--spacing-horizontal)); + } + + &.is-vertically-aligned-center { + margin-top: 0; + } + } + } + } + + .wp-block[data-align="full"] > & { + + p:not(.has-background), + h1:not(.has-background), + h2:not(.has-background), + h3:not(.has-background), + h4:not(.has-background), + h5:not(.has-background), + h6:not(.has-background) { + padding-left: var(--global--spacing-unit); + padding-right: var(--global--spacing-unit); + } + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/columns/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/columns/_style.scss index d1f985fe..8fb713af 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/columns/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/columns/_style.scss @@ -1,105 +1,105 @@ -.wp-block-columns { - - &:not(.alignwide):not(.alignfull) { - clear: both; - } - - .wp-block-column { - - > * { - margin-top: calc(0.66 * var(--global--spacing-vertical)); - margin-bottom: calc(0.66 * var(--global--spacing-vertical)); - - @include media(mobile) { - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); - } - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } - } - - &:last-child { - margin-bottom: 0; - } - } - - .wp-block-column:not(:last-child) { - margin-bottom: calc(0.66 * var(--global--spacing-vertical)); - - @include media(mobile) { - margin-bottom: var(--global--spacing-vertical); - } - - @include media(desktop) { - margin-bottom: 0; - } - } - - &.is-style-twentytwentyone-columns-overlap { - - justify-content: space-around; - - @include media(laptop) { - - .wp-block-column { - - &:nth-child(2n) { - margin-left: calc(-2 * var(--global--spacing-horizontal)); - margin-top: calc(2.5 * var(--global--spacing-horizontal)); - z-index: 2; - - // Provide text-based child blocks with a default background color to ensure they're readable. - > p, - > h1, - > h2, - > h3, - > h4, - > h5, - > h6, - > ul, - > ol, - > pre { - - &:not(.has-background) { - background-color: var(--global--color-background); - padding: var(--global--spacing-unit); - } - } - - // Lists should still have their usual left padding. - > ul:not(.has-background), - > ol:not(.has-background) { - padding-left: calc(2 * var(--global--spacing-horizontal)); - } - - &.is-vertically-aligned-center { - margin-top: 0; - } - } - } - } - } - - &.alignfull { - - .wp-block-column { - - p:not(.has-background), - h1:not(.has-background), - h2:not(.has-background), - h3:not(.has-background), - h4:not(.has-background), - h5:not(.has-background), - h6:not(.has-background) { - padding-left: var(--global--spacing-unit); - padding-right: var(--global--spacing-unit); - } - } - } -} +.wp-block-columns { + + &:not(.alignwide):not(.alignfull) { + clear: both; + } + + .wp-block-column { + + > * { + margin-top: calc(0.66 * var(--global--spacing-vertical)); + margin-bottom: calc(0.66 * var(--global--spacing-vertical)); + + @include media(mobile) { + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); + } + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } + } + + &:last-child { + margin-bottom: 0; + } + } + + .wp-block-column:not(:last-child) { + margin-bottom: calc(0.66 * var(--global--spacing-vertical)); + + @include media(mobile) { + margin-bottom: var(--global--spacing-vertical); + } + + @include media(desktop) { + margin-bottom: 0; + } + } + + &.is-style-twentytwentyone-columns-overlap { + + justify-content: space-around; + + @include media(laptop) { + + .wp-block-column { + + &:nth-child(2n) { + margin-left: calc(-2 * var(--global--spacing-horizontal)); + margin-top: calc(2.5 * var(--global--spacing-horizontal)); + z-index: 2; + + // Provide text-based child blocks with a default background color to ensure they're readable. + > p, + > h1, + > h2, + > h3, + > h4, + > h5, + > h6, + > ul, + > ol, + > pre { + + &:not(.has-background) { + background-color: var(--global--color-background); + padding: var(--global--spacing-unit); + } + } + + // Lists should still have their usual left padding. + > ul:not(.has-background), + > ol:not(.has-background) { + padding-left: calc(2 * var(--global--spacing-horizontal)); + } + + &.is-vertically-aligned-center { + margin-top: 0; + } + } + } + } + } + + &.alignfull { + + .wp-block-column { + + p:not(.has-background), + h1:not(.has-background), + h2:not(.has-background), + h3:not(.has-background), + h4:not(.has-background), + h5:not(.has-background), + h6:not(.has-background) { + padding-left: var(--global--spacing-unit); + padding-right: var(--global--spacing-unit); + } + } + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/cover/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/cover/_editor.scss index 6584179e..b0c5b9a5 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/cover/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/cover/_editor.scss @@ -1,72 +1,77 @@ -.wp-block-cover, -.wp-block-cover-image { - - &:not(.alignwide):not(.alignfull) { - clear: both; - } - - background-color: var(--cover--color-background); - min-height: var(--cover--height); - margin-top: inherit; - margin-bottom: inherit; - - [data-align="full"] & { - margin-top: 0; - margin-bottom: 0; - } - - @include innerblock-margin-clear(".wp-block-cover__inner-container"); - - .wp-block-cover__inner-container, - .wp-block-cover-image-text, - .wp-block-cover-text, - .block-editor-block-list__block { - color: currentColor; // uses text color specified with background-color options in /blocks/utilities/_style.scss - - a { - color: currentColor; - } - - .has-link-color a { - color: var(--wp--style--color--link, var(--global--color-primary)); - } - } - - // Default & custom background-color - &:not([class*="background-color"]) { - - .wp-block-cover__inner-container, - .wp-block-cover-image-text, - .wp-block-cover-text, - .block-editor-block-list__block { - color: var(--cover--color-foreground); - } - } - - // Treating H2 separately to account for legacy /core styles - h2 { - font-size: var(--heading--font-size-h2); - letter-spacing: var(--heading--letter-spacing-h2); - line-height: var(--heading--line-height-h2); - padding: 0; - max-width: inherit; // undo opinionated styles - text-align: inherit; - - &.has-text-align-left { - text-align: left; - } - - &.has-text-align-center { - text-align: center; - } - - &.has-text-align-right { - text-align: right; - } - } - - // Block Styles - &.is-style-twentytwentyone-border { - border: calc(3 * var(--separator--height)) solid var(--global--color-border); - } -} +.wp-block-cover, +.wp-block-cover-image { + + &:not(.alignwide):not(.alignfull) { + clear: both; + } + + background-color: var(--cover--color-background); + min-height: var(--cover--height); + margin-top: inherit; + margin-bottom: inherit; + + [data-align="full"] & { + margin-top: 0; + margin-bottom: 0; + } + + @include innerblock-margin-clear(".wp-block-cover__inner-container"); + + .wp-block-cover__inner-container, + .wp-block-cover-image-text, + .wp-block-cover-text, + .block-editor-block-list__block { + color: currentColor; // uses text color specified with background-color options in /blocks/utilities/_style.scss + + a { + color: currentColor; + } + + .has-link-color a { + color: var(--wp--style--color--link, var(--global--color-primary)); + } + } + + // Default & custom background-color + &:not([class*="background-color"]) { + + .wp-block-cover__inner-container, + .wp-block-cover-image-text, + .wp-block-cover-text, + .block-editor-block-list__block { + color: var(--cover--color-foreground); + } + } + + // Treating H2 separately to account for legacy /core styles + h2 { + font-size: var(--heading--font-size-h2); + letter-spacing: var(--heading--letter-spacing-h2); + line-height: var(--heading--line-height-h2); + padding: 0; + max-width: inherit; // undo opinionated styles + text-align: inherit; + + &.has-text-align-left { + text-align: left; + } + + &.has-text-align-center { + text-align: center; + } + + &.has-text-align-right { + text-align: right; + } + } + + // Block Styles + &.is-style-twentytwentyone-border { + border: calc(3 * var(--separator--height)) solid var(--global--color-border); + } + + // The background color class is used just for the overlay, and does not need to be applied to the inner container. + &[class*="-background-color"][class] .wp-block-cover__inner-container { + background-color: unset; + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/cover/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/cover/_style.scss index afb8b7e0..7114cfd4 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/cover/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/cover/_style.scss @@ -1,111 +1,116 @@ -.wp-block-cover, -.wp-block-cover-image { - - &:not(.alignwide):not(.alignfull) { - clear: both; - } - - &.alignfull { - margin-top: 0; - margin-bottom: 0; - } - - background-color: var(--cover--color-background); - min-height: var(--cover--height); - margin-top: inherit; - margin-bottom: inherit; - - .wp-block-cover__inner-container, - .wp-block-cover-image-text, - .wp-block-cover-text { - color: currentColor; // Uses text color specified with background-color options in 07-utilities\color-palette.scss - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); - - a:not(.wp-block-button__link):not(.wp-block-file__button) { - color: currentColor; - } - - .has-link-color a { - color: var(--wp--style--color--link, var(--global--color-primary)); - } - } - - /* default & custom background-color */ - &:not([class*="background-color"]) { - - .wp-block-cover__inner-container, - .wp-block-cover-image-text, - .wp-block-cover-text { - color: var(--cover--color-foreground); - } - } - - /* Treating H2 separately to account for legacy /core styles */ - h2 { - font-size: var(--heading--font-size-h2); - letter-spacing: var(--heading--letter-spacing-h2); - line-height: var(--heading--line-height-h2); - max-width: inherit; // undo opinionated styles - text-align: inherit; // undo opinionated styles - padding: 0; - - &.has-text-align-left { - text-align: left; - } - - &.has-text-align-center { - text-align: center; - } - - &.has-text-align-right { - text-align: right; - } - } - - .wp-block-cover__inner-container { - - width: calc(100% - calc(2 * var(--global--spacing-vertical))); - - > * { - margin-top: calc(0.666 * var(--global--spacing-vertical)); - margin-bottom: calc(0.666 * var(--global--spacing-vertical)); - - @include media(mobile) { - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); - } - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } - } - } - - &.alignleft, - &.alignright { - margin-top: 0; - - > * { - margin-top: calc(2 * var(--global--spacing-vertical)); - margin-bottom: calc(2 * var(--global--spacing-vertical)); - padding-left: var(--global--spacing-horizontal); - padding-right: var(--global--spacing-horizontal); - width: 100%; - } - } - - &.has-left-content, - &.has-right-content { - justify-content: center; - } - - /* Block Styles */ - &.is-style-twentytwentyone-border { - border: calc(3 * var(--separator--height)) solid var(--global--color-border); - } -} +.wp-block-cover, +.wp-block-cover-image { + + &:not(.alignwide):not(.alignfull) { + clear: both; + } + + &.alignfull { + margin-top: 0; + margin-bottom: 0; + } + + background-color: var(--cover--color-background); + min-height: var(--cover--height); + margin-top: inherit; + margin-bottom: inherit; + + .wp-block-cover__inner-container, + .wp-block-cover-image-text, + .wp-block-cover-text { + color: currentColor; // Uses text color specified with background-color options in 07-utilities\color-palette.scss + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); + + a:not(.wp-block-button__link):not(.wp-block-file__button) { + color: currentColor; + } + + .has-link-color a { + color: var(--wp--style--color--link, var(--global--color-primary)); + } + } + + /* default & custom background-color */ + &:not([class*="background-color"]) { + + .wp-block-cover__inner-container, + .wp-block-cover-image-text, + .wp-block-cover-text { + color: var(--cover--color-foreground); + } + } + + /* Treating H2 separately to account for legacy /core styles */ + h2 { + font-size: var(--heading--font-size-h2); + letter-spacing: var(--heading--letter-spacing-h2); + line-height: var(--heading--line-height-h2); + max-width: inherit; // undo opinionated styles + text-align: inherit; // undo opinionated styles + padding: 0; + + &.has-text-align-left { + text-align: left; + } + + &.has-text-align-center { + text-align: center; + } + + &.has-text-align-right { + text-align: right; + } + } + + .wp-block-cover__inner-container { + + width: calc(100% - calc(2 * var(--global--spacing-vertical))); + + > * { + margin-top: calc(0.666 * var(--global--spacing-vertical)); + margin-bottom: calc(0.666 * var(--global--spacing-vertical)); + + @include media(mobile) { + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); + } + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } + } + } + + &.alignleft, + &.alignright { + margin-top: 0; + + > * { + margin-top: calc(2 * var(--global--spacing-vertical)); + margin-bottom: calc(2 * var(--global--spacing-vertical)); + padding-left: var(--global--spacing-horizontal); + padding-right: var(--global--spacing-horizontal); + width: 100%; + } + } + + &.has-left-content, + &.has-right-content { + justify-content: center; + } + + /* Block Styles */ + &.is-style-twentytwentyone-border { + border: calc(3 * var(--separator--height)) solid var(--global--color-border); + } + + /* The background color class is used just for the overlay, and does not need to be applied to the inner container. */ + &[class*="-background-color"][class] .wp-block-cover__inner-container { + background-color: unset; + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/file/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/file/_editor.scss index 3a01997f..b3a19479 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/file/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/file/_editor.scss @@ -1,24 +1,25 @@ -.wp-block-file { - - .wp-block-file__textlink { - text-decoration: underline; - text-decoration-style: solid; - text-decoration-thickness: 1px; - - &:hover { - text-decoration: underline; - text-decoration-style: dotted; - } - } - - .wp-block-file__button { - // Extend button style - @include button-style(); - display: inline-block; - - &:hover { - color: var(--button--color-text-hover); - background: transparent; - } - } -} +.wp-block-file { + + .wp-block-file__textlink { + text-decoration: underline; + text-decoration-style: solid; + text-decoration-thickness: 1px; + + &:hover { + text-decoration: underline; + text-decoration-style: dotted; + } + } + + .wp-block-file__button { + // Extend button style + @include button-style(); + display: inline-block; + + // Remove :focus styles in the editor + &:focus { + outline-offset: inherit; + outline: inherit; + } + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/file/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/file/_style.scss index 137d5113..5426f8a1 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/file/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/file/_style.scss @@ -1,24 +1,13 @@ -.wp-block-file { - - // Undo Gutenberg hover defaults - a.wp-block-file__button:active, - a.wp-block-file__button:focus, - a.wp-block-file__button:hover { - color: var(--button--color-text-hover); - opacity: inherit; - } - - a.wp-block-file__button:visited { - color: var(--button--color-text); - - &:hover { - color: var(--button--color-text-hover); - } - } - - .wp-block-file__button { - // Extend button style - @include button-style(); - display: inline-block; - } -} +.wp-block-file { + + // Undo Gutenberg hover defaults + a.wp-block-file__button:active, + a.wp-block-file__button:focus, + a.wp-block-file__button:hover { + opacity: inherit; + } + + a.wp-block-file__button { + display: inline-block; + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/gallery/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/gallery/_editor.scss index c30b0f5e..f08dfa54 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/gallery/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/gallery/_editor.scss @@ -1,10 +1,10 @@ -.wp-block-gallery { - - figcaption { - margin-bottom: 0; - - a { - color: var(--global--color-white); - } - } -} +.wp-block-gallery { + + figcaption { + margin-bottom: 0; + + a { + color: var(--global--color-white); + } + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/gallery/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/gallery/_style.scss index 76723433..81c9d1ac 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/gallery/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/gallery/_style.scss @@ -1,33 +1,33 @@ -.wp-block-gallery { - - margin: 0 auto; - - .blocks-gallery-image, - .blocks-gallery-item { - - // On mobile and responsive viewports, we allow only 1 or 2 columns at the most. - width: calc((100% - var(--global--spacing-unit)) / 2); - - figcaption { - margin: 0; - // Text color is always white to account for default gradient background - color: var(--global--color-white); - font-size: var(--global--font-size-xs); - - a { - color: var(--global--color-white); - - &:focus { - background-color: transparent; - outline: 2px solid var(--wp--style--color--link, var(--global--color-primary)); - text-decoration: none; - } - } - } - - a:focus img { - outline-offset: 2px; - } - - } -} +.wp-block-gallery { + + margin: 0 auto; + + .blocks-gallery-image, + .blocks-gallery-item { + + // On mobile and responsive viewports, we allow only 1 or 2 columns at the most. + width: calc((100% - var(--global--spacing-unit)) / 2); + + figcaption { + margin: 0; + // Text color is always white to account for default gradient background + color: var(--global--color-white); + font-size: var(--global--font-size-xs); + + a { + color: var(--global--color-white); + + &:focus { + background-color: transparent; + outline: 2px solid var(--wp--style--color--link, var(--global--color-primary)); + text-decoration: none; + } + } + } + + a:focus img { + outline-offset: 2px; + } + + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/group/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/group/_editor.scss index ddccb429..c3f2bd62 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/group/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/group/_editor.scss @@ -1,45 +1,45 @@ -.wp-block-group { - // Start IE clearfix. - // This hack is only necessary because we want to support IE11. - // If we don't want to support IE11, then "display: flow-root" would suffice. - display: block; - clear: both; - - display: flow-root; // stylelint-disable-line declaration-block-no-duplicate-properties - - &:before, - &:after { - content: ""; - display: block; - clear: both; - } - // End IE clearfix. - - &.has-background { - padding: var(--global--spacing-vertical); - - [data-align="full"] & { - margin-top: 0; - margin-bottom: 0; - } - } - - // Block Styles - &.is-style-twentytwentyone-border { - border: calc(3 * var(--separator--height)) solid var(--global--color-border); - padding: var(--global--spacing-vertical); - - .wp-block-group__inner-container > [data-align="full"] { - max-width: calc(var(--responsive--alignfull-width) + (2 * var(--global--spacing-vertical))); - width: calc(var(--responsive--alignfull-width) + (2 * var(--global--spacing-vertical))); - margin-left: calc(-1 * var(--global--spacing-vertical)); - } - } - - @include innerblock-margin-clear(".wp-block-group__inner-container"); -} - -.wp-block-group .wp-block-group.has-background > .block-editor-block-list__layout > [data-align="full"] { - margin: 0; - width: 100%; -} +.wp-block-group { + // Start IE clearfix. + // This hack is only necessary because we want to support IE11. + // If we don't want to support IE11, then "display: flow-root" would suffice. + display: block; + clear: both; + + display: flow-root; // stylelint-disable-line declaration-block-no-duplicate-properties + + &:before, + &:after { + content: ""; + display: block; + clear: both; + } + // End IE clearfix. + + &.has-background { + padding: var(--global--spacing-vertical); + + [data-align="full"] & { + margin-top: 0; + margin-bottom: 0; + } + } + + // Block Styles + &.is-style-twentytwentyone-border { + border: calc(3 * var(--separator--height)) solid var(--global--color-border); + padding: var(--global--spacing-vertical); + + .wp-block-group__inner-container > [data-align="full"] { + max-width: calc(var(--responsive--alignfull-width) + (2 * var(--global--spacing-vertical))); + width: calc(var(--responsive--alignfull-width) + (2 * var(--global--spacing-vertical))); + margin-left: calc(-1 * var(--global--spacing-vertical)); + } + } + + @include innerblock-margin-clear(".wp-block-group__inner-container"); +} + +.wp-block-group .wp-block-group.has-background > .block-editor-block-list__layout > [data-align="full"] { + margin: 0; + width: 100%; +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/group/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/group/_style.scss index cd16887a..72c756d3 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/group/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/group/_style.scss @@ -1,70 +1,70 @@ -.wp-block-group { - // Start IE clearfix. - // This hack is only necessary because we want to support IE11. - // If we don't want to support IE11, then "display: flow-root" would suffice. - display: block; - clear: both; - - display: flow-root; // stylelint-disable-line declaration-block-no-duplicate-properties - - &:before, - &:after { - content: ""; - display: block; - clear: both; - } - // End IE clearfix. - - .wp-block-group__inner-container { - margin-left: auto; - margin-right: auto; - - > * { - margin-top: calc(0.666 * var(--global--spacing-vertical)); - margin-bottom: calc(0.666 * var(--global--spacing-vertical)); - - &.alignfull { - @extend %responsive-alignfull-width-mobile; - } - - @include media(mobile) { - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); - } - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } - } - } - - &.has-background { - padding: calc(0.666 * var(--global--spacing-vertical)); - - @include media(mobile) { - padding: var(--global--spacing-vertical); - } - } - - // Block Styles - &.is-style-twentytwentyone-border { - border: calc(3 * var(--separator--height)) solid var(--global--color-border); - padding: var(--global--spacing-vertical); - } - - // Adjust alignfull items to account for left and right padding. - &.has-background, - &.is-style-twentytwentyone-border { - - .wp-block-group__inner-container > .alignfull, - .wp-block-group__inner-container > hr.wp-block-separator:not(.is-style-dots):not(.alignwide).alignfull { - max-width: calc(var(--responsive--alignfull-width) + (2 * var(--global--spacing-vertical))); - width: calc(var(--responsive--alignfull-width) + (2 * var(--global--spacing-vertical))); - margin-left: calc(-1 * var(--global--spacing-vertical)); - } - } -} +.wp-block-group { + // Start IE clearfix. + // This hack is only necessary because we want to support IE11. + // If we don't want to support IE11, then "display: flow-root" would suffice. + display: block; + clear: both; + + display: flow-root; // stylelint-disable-line declaration-block-no-duplicate-properties + + &:before, + &:after { + content: ""; + display: block; + clear: both; + } + // End IE clearfix. + + .wp-block-group__inner-container { + margin-left: auto; + margin-right: auto; + + > * { + margin-top: calc(0.666 * var(--global--spacing-vertical)); + margin-bottom: calc(0.666 * var(--global--spacing-vertical)); + + &.alignfull { + @extend %responsive-alignfull-width-mobile; + } + + @include media(mobile) { + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); + } + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } + } + } + + &.has-background { + padding: calc(0.666 * var(--global--spacing-vertical)); + + @include media(mobile) { + padding: var(--global--spacing-vertical); + } + } + + // Block Styles + &.is-style-twentytwentyone-border { + border: calc(3 * var(--separator--height)) solid var(--global--color-border); + padding: var(--global--spacing-vertical); + } + + // Adjust alignfull items to account for left and right padding. + &.has-background, + &.is-style-twentytwentyone-border { + + .wp-block-group__inner-container > .alignfull, + .wp-block-group__inner-container > hr.wp-block-separator:not(.is-style-dots):not(.alignwide).alignfull { + max-width: calc(var(--responsive--alignfull-width) + (2 * var(--global--spacing-vertical))); + width: calc(var(--responsive--alignfull-width) + (2 * var(--global--spacing-vertical))); + margin-left: calc(-1 * var(--global--spacing-vertical)); + } + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/heading/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/heading/_editor.scss index 4796cd54..b1c6a9ee 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/heading/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/heading/_editor.scss @@ -1,81 +1,81 @@ -.wp-block-heading h1, -h1, -.h1, -.wp-block-heading h2, -h2, -.h2, -.wp-block-heading h3, -h3, -.h3, -.wp-block-heading h4, -h4, -.h4, -.wp-block-heading h5, -h5, -.h5, -.wp-block-heading h6, -h6, -.h6 { - clear: both; - font-family: var(--heading--font-family); - font-weight: var(--heading--font-weight); - - strong { - font-weight: var(--heading--font-weight-strong); - } - - &[style*="--wp--typography--line-height"] { - line-height: var(--wp--typography--line-height, --global--line-height-body); - } -} - -.wp-block-heading h1, -h1, -.h1 { - font-size: var(--heading--font-size-h1); - letter-spacing: var(--heading--letter-spacing-h1); - line-height: var(--heading--line-height-h1); -} - -.wp-block-heading h2, -h2, -.h2 { - font-size: var(--heading--font-size-h2); - letter-spacing: var(--heading--letter-spacing-h2); - line-height: var(--heading--line-height-h2); -} - -.wp-block-heading h3, -h3, -.h3 { - font-size: var(--heading--font-size-h3); - letter-spacing: var(--heading--letter-spacing-h3); - line-height: var(--heading--line-height-h3); -} - -.wp-block-heading h4, -h4, -.h4 { - font-size: var(--heading--font-size-h4); - font-weight: var(--heading--font-weight-strong); - letter-spacing: var(--heading--letter-spacing-h4); - line-height: var(--heading--line-height-h4); -} - -.wp-block-heading h5, -h5, -.h5 { - font-size: var(--heading--font-size-h5); - font-weight: var(--heading--font-weight-strong); - letter-spacing: var(--heading--letter-spacing-h5); - line-height: var(--heading--line-height-h5); -} - -.wp-block-heading h6, -h6, -.h6 { - font-size: var(--heading--font-size-h6); - font-weight: var(--heading--font-weight-strong); - letter-spacing: var(--heading--letter-spacing-h6); - line-height: var(--heading--line-height-h6); -} +.wp-block-heading h1, +h1, +.h1, +.wp-block-heading h2, +h2, +.h2, +.wp-block-heading h3, +h3, +.h3, +.wp-block-heading h4, +h4, +.h4, +.wp-block-heading h5, +h5, +.h5, +.wp-block-heading h6, +h6, +.h6 { + clear: both; + font-family: var(--heading--font-family); + font-weight: var(--heading--font-weight); + + strong { + font-weight: var(--heading--font-weight-strong); + } + + &[style*="--wp--typography--line-height"] { + line-height: var(--wp--typography--line-height, var(--global--line-height-body)); + } +} + +.wp-block-heading h1, +h1, +.h1 { + font-size: var(--heading--font-size-h1); + letter-spacing: var(--heading--letter-spacing-h1); + line-height: var(--heading--line-height-h1); +} + +.wp-block-heading h2, +h2, +.h2 { + font-size: var(--heading--font-size-h2); + letter-spacing: var(--heading--letter-spacing-h2); + line-height: var(--heading--line-height-h2); +} + +.wp-block-heading h3, +h3, +.h3 { + font-size: var(--heading--font-size-h3); + letter-spacing: var(--heading--letter-spacing-h3); + line-height: var(--heading--line-height-h3); +} + +.wp-block-heading h4, +h4, +.h4 { + font-size: var(--heading--font-size-h4); + font-weight: var(--heading--font-weight-strong); + letter-spacing: var(--heading--letter-spacing-h4); + line-height: var(--heading--line-height-h4); +} + +.wp-block-heading h5, +h5, +.h5 { + font-size: var(--heading--font-size-h5); + font-weight: var(--heading--font-weight-strong); + letter-spacing: var(--heading--letter-spacing-h5); + line-height: var(--heading--line-height-h5); +} + +.wp-block-heading h6, +h6, +.h6 { + font-size: var(--heading--font-size-h6); + font-weight: var(--heading--font-weight-strong); + letter-spacing: var(--heading--letter-spacing-h6); + line-height: var(--heading--line-height-h6); +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/heading/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/heading/_style.scss index 943ae65a..5e5e3070 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/heading/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/heading/_style.scss @@ -1,65 +1,65 @@ -h1, -.h1, -h2, -.h2, -h3, -.h3, -h4, -.h4, -h5, -.h5, -h6, -.h6 { - clear: both; - font-family: var(--heading--font-family); - font-weight: var(--heading--font-weight); - - strong { - font-weight: var(--heading--font-weight-strong); - } -} - -h1, -.h1 { - font-size: var(--heading--font-size-h1); - letter-spacing: var(--heading--letter-spacing-h1); - line-height: var(--heading--line-height-h1); -} - -h2, -.h2 { - font-size: var(--heading--font-size-h2); - letter-spacing: var(--heading--letter-spacing-h2); - line-height: var(--heading--line-height-h2); -} - -h3, -.h3 { - font-size: var(--heading--font-size-h3); - letter-spacing: var(--heading--letter-spacing-h3); - line-height: var(--heading--line-height-h3); -} - -h4, -.h4 { - font-size: var(--heading--font-size-h4); - font-weight: var(--heading--font-weight-strong); - letter-spacing: var(--heading--letter-spacing-h4); - line-height: var(--heading--line-height-h4); -} - -h5, -.h5 { - font-size: var(--heading--font-size-h5); - font-weight: var(--heading--font-weight-strong); - letter-spacing: var(--heading--letter-spacing-h5); - line-height: var(--heading--line-height-h5); -} - -h6, -.h6 { - font-size: var(--heading--font-size-h6); - font-weight: var(--heading--font-weight-strong); - letter-spacing: var(--heading--letter-spacing-h6); - line-height: var(--heading--line-height-h6); -} +h1, +.h1, +h2, +.h2, +h3, +.h3, +h4, +.h4, +h5, +.h5, +h6, +.h6 { + clear: both; + font-family: var(--heading--font-family); + font-weight: var(--heading--font-weight); + + strong { + font-weight: var(--heading--font-weight-strong); + } +} + +h1, +.h1 { + font-size: var(--heading--font-size-h1); + letter-spacing: var(--heading--letter-spacing-h1); + line-height: var(--heading--line-height-h1); +} + +h2, +.h2 { + font-size: var(--heading--font-size-h2); + letter-spacing: var(--heading--letter-spacing-h2); + line-height: var(--heading--line-height-h2); +} + +h3, +.h3 { + font-size: var(--heading--font-size-h3); + letter-spacing: var(--heading--letter-spacing-h3); + line-height: var(--heading--line-height-h3); +} + +h4, +.h4 { + font-size: var(--heading--font-size-h4); + font-weight: var(--heading--font-weight-strong); + letter-spacing: var(--heading--letter-spacing-h4); + line-height: var(--heading--line-height-h4); +} + +h5, +.h5 { + font-size: var(--heading--font-size-h5); + font-weight: var(--heading--font-weight-strong); + letter-spacing: var(--heading--letter-spacing-h5); + line-height: var(--heading--line-height-h5); +} + +h6, +.h6 { + font-size: var(--heading--font-size-h6); + font-weight: var(--heading--font-weight-strong); + letter-spacing: var(--heading--letter-spacing-h6); + line-height: var(--heading--line-height-h6); +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/html/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/html/_editor.scss index 5215ecc2..eae872ea 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/html/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/html/_editor.scss @@ -1,6 +1,6 @@ -[data-type="core/html"] textarea { - // Make sure that the color is not white on white when a dark body background is used. - color: var(--global--color-dark-gray); - border-radius: 0; - padding: var(--global--spacing-unit); -} +[data-type="core/html"] textarea { + // Make sure that the color is not white on white when a dark body background is used. + color: var(--global--color-dark-gray); + border-radius: 0; + padding: var(--global--spacing-unit); +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/image/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/image/_editor.scss index 20c1531f..e4ed9d7a 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/image/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/image/_editor.scss @@ -1,20 +1,20 @@ -/* Center image block by default in the editor */ - -.wp-block-image > div { - text-align: center; -} - -[data-type="core/image"] .block-editor-block-list__block-edit figure.is-resized { - margin: 0 auto; -} - -/* Block Styles */ - -.wp-block-image.is-style-twentytwentyone-border img, -.wp-block-image.is-style-twentytwentyone-image-frame img { - border: calc(3 * var(--separator--height)) solid var(--global--color-border); -} - -.wp-block-image.is-style-twentytwentyone-image-frame img { - padding: var(--global--spacing-unit); -} +/* Center image block by default in the editor */ + +.wp-block-image > div { + text-align: center; +} + +[data-type="core/image"] .block-editor-block-list__block-edit figure.is-resized { + margin: 0 auto; +} + +/* Block Styles */ + +.wp-block-image.is-style-twentytwentyone-border img, +.wp-block-image.is-style-twentytwentyone-image-frame img { + border: calc(3 * var(--separator--height)) solid var(--global--color-border); +} + +.wp-block-image.is-style-twentytwentyone-image-frame img { + padding: var(--global--spacing-unit); +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/image/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/image/_style.scss index f2eb3c8c..989f0606 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/image/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/image/_style.scss @@ -1,69 +1,63 @@ -.wp-block-image { - text-align: center; - - figcaption { - color: var(--global--color-primary); - font-size: var(--global--font-size-xs); - line-height: var(--global--line-height-body); - margin-top: calc(0.5 * var(--global--spacing-unit)); - margin-bottom: var(--global--spacing-unit); - text-align: center; - } - - .alignright { - margin-left: var(--global--spacing-horizontal); - } - - .alignleft { - margin-right: var(--global--spacing-horizontal); - } - - a:focus img { - outline-offset: 2px; - } -} - -// Remove vertical margins from image block wrappers when floated -.entry-content > *[class="wp-block-image"], -.entry-content [class*="inner-container"] > *[class="wp-block-image"] { - margin-top: 0; - margin-bottom: 0; - - // Remove top margins from the following element when previous image block is floated - + * { - margin-top: 0; - } -} - -img { - height: auto; - max-width: 100%; - vertical-align: middle; -} - -// Block Styles -.wp-block-image.is-style-twentytwentyone-border img, -.wp-block-image.is-style-twentytwentyone-image-frame img { - border: calc(3 * var(--separator--height)) solid var(--global--color-border); -} - -.wp-block-image.is-style-twentytwentyone-image-frame img { - padding: var(--global--spacing-unit); -} - -.entry-content { - - > .wp-block-image { - - > .alignleft, - > .alignright { - @include media(mobile) { - max-width: 50%; - } - @include media(mobile-only) { - margin-left: 0; - margin-right: 0; - } - } - } -} +.wp-block-image { + text-align: center; + + figcaption { + color: var(--global--color-primary); + font-size: var(--global--font-size-xs); + line-height: var(--global--line-height-body); + margin-top: calc(0.5 * var(--global--spacing-unit)); + margin-bottom: var(--global--spacing-unit); + text-align: center; + } + + .alignright { + margin-left: var(--global--spacing-horizontal); + } + + .alignleft { + margin-right: var(--global--spacing-horizontal); + } + + a:focus img { + outline-offset: 2px; + } +} + +// Remove vertical margins from image block wrappers when floated +.entry-content > *[class="wp-block-image"], +.entry-content [class*="inner-container"] > *[class="wp-block-image"] { + margin-top: 0; + margin-bottom: 0; + + // Remove top margins from the following element when previous image block is floated + + * { + margin-top: 0; + } +} + +// Block Styles +.wp-block-image.is-style-twentytwentyone-border img, +.wp-block-image.is-style-twentytwentyone-image-frame img { + border: calc(3 * var(--separator--height)) solid var(--global--color-border); +} + +.wp-block-image.is-style-twentytwentyone-image-frame img { + padding: var(--global--spacing-unit); +} + +.entry-content { + + > .wp-block-image { + + > .alignleft, + > .alignright { + @include media(mobile) { + max-width: 50%; + } + @include media(mobile-only) { + margin-left: 0; + margin-right: 0; + } + } + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/latest-comments/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/latest-comments/_editor.scss index 60ef3485..fa7703d5 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/latest-comments/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/latest-comments/_editor.scss @@ -1,3 +1,3 @@ -.wp-block-latest-comments { - padding-left: 0; -} +.wp-block-latest-comments { + padding-left: 0; +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/latest-comments/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/latest-comments/_style.scss index b627d4de..1ab27486 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/latest-comments/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/latest-comments/_style.scss @@ -1,35 +1,35 @@ -.wp-block-latest-comments { - padding-left: 0; - - .wp-block-latest-comments__comment { - font-size: var(--global--font-size-sm); - line-height: var(--global--line-height-body); - - /* Vertical margins logic */ - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } - } - - .wp-block-latest-comments__comment-meta { - font-family: var(--heading--font-family); - } - - .wp-block-latest-comments__comment-date { - color: var(--global--color-primary); - font-size: var(--global--font-size-sm); - } - - .wp-block-latest-comments__comment-excerpt p { - font-size: var(--global--font-size-sm); - line-height: var(--global--line-height-body); - margin: 0; - } -} +.wp-block-latest-comments { + padding-left: 0; + + .wp-block-latest-comments__comment { + font-size: var(--global--font-size-sm); + line-height: var(--global--line-height-body); + + /* Vertical margins logic */ + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } + } + + .wp-block-latest-comments__comment-meta { + font-family: var(--heading--font-family); + } + + .wp-block-latest-comments__comment-date { + color: var(--global--color-primary); + font-size: var(--global--font-size-sm); + } + + .wp-block-latest-comments__comment-excerpt p { + font-size: var(--global--font-size-sm); + line-height: var(--global--line-height-body); + margin: 0; + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/latest-posts/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/latest-posts/_editor.scss index 2067d851..a5cf5c40 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/latest-posts/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/latest-posts/_editor.scss @@ -1,144 +1,144 @@ -.wp-block-latest-posts { - padding-left: 0; - - // Vertical margins logic - &:not(.is-grid) > li { - margin-top: calc(1.666 * var(--global--spacing-vertical)); - margin-bottom: calc(1.666 * var(--global--spacing-vertical)); - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } - } - - &.is-grid { - word-wrap: break-word; - word-break: break-word; - - > li { - margin-bottom: var(--global--spacing-vertical); - - &:last-child { - margin-bottom: 0; - } - } - } - - > li > * { - margin-top: calc(0.333 * var(--global--spacing-vertical)); - margin-bottom: calc(0.333 * var(--global--spacing-vertical)); - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } - } - - // Post title - > li > a { - display: inline-block; - font-family: var(--latest-posts--title-font-family); - font-size: var(--latest-posts--title-font-size); - font-weight: var(--heading--font-weight); - line-height: var(--global--line-height-heading); - margin-bottom: calc(0.333 * var(--global--spacing-vertical)); - } - - // Post author - .wp-block-latest-posts__post-author { - color: var(--global--color-primary); - font-size: var(--global--font-size-md); - line-height: var(--global--line-height-body); - } - - // Post date - .wp-block-latest-posts__post-date { - color: var(--global--color-primary); - font-size: var(--global--font-size-xs); - line-height: var(--global--line-height-body); - - [class*="inner-container"] &, - .has-background & { - color: currentColor; - } - } - - // Post content - .wp-block-latest-posts__post-excerpt, - .wp-block-latest-posts__post-full-content { - font-family: var(--latest-posts--description-font-family); - font-size: var(--latest-posts--description-font-size); - line-height: var(--global--line-height-body); - margin-top: calc(0.666 * var(--global--spacing-vertical)); - } - - // Block Styles - &.is-style-twentytwentyone-latest-posts-dividers { - border-top: calc(3 * var(--separator--height)) solid var(--global--color-border); - border-bottom: calc(3 * var(--separator--height)) solid var(--global--color-border); - - &:not(.is-grid) > li, - > li { - padding-bottom: var(--global--spacing-vertical); - border-bottom: var(--separator--height) solid var(--global--color-border); - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); - - &:last-child { - padding-bottom: 0; - border-bottom: none; - } - } - - &.is-grid { - // Border moves up 1px to overlap the li borders in the last row. - box-shadow: inset 0 -1px 0 0 var(--global--color-border); - border-bottom: calc(2 * var(--separator--height)) solid var(--global--color-border); - - li { - margin: 0; - padding-top: var(--global--spacing-vertical); - padding-right: var(--global--spacing-horizontal); - - &:last-child { - padding-bottom: var(--global--spacing-vertical); - } - } - - // This is using a non-standard media query because it is directly overriding the gutenberg-provided widths. - // https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/latest-posts/style.scss#L28-L34 - @media screen and (min-width: 600px) { - @for $i from 2 through 6 { - &.columns-#{ $i } li { - width: calc((100% / #{ $i })); - } - } - } - } - } - - &.is-style-twentytwentyone-latest-posts-borders { - - li { - border: calc(3 * var(--separator--height)) solid var(--global--color-border); - padding: var(--global--spacing-vertical) var(--global--spacing-horizontal); - - &:last-child { - padding-bottom: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); - } - } - - &:not(.is-grid) li { - margin-top: var(--global--spacing-horizontal); - margin-bottom: var(--global--spacing-horizontal); - } - } -} +.wp-block-latest-posts { + padding-left: 0; + + // Vertical margins logic + &:not(.is-grid) > li { + margin-top: calc(1.666 * var(--global--spacing-vertical)); + margin-bottom: calc(1.666 * var(--global--spacing-vertical)); + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } + } + + &.is-grid { + word-wrap: break-word; + word-break: break-word; + + > li { + margin-bottom: var(--global--spacing-vertical); + + &:last-child { + margin-bottom: 0; + } + } + } + + > li > * { + margin-top: calc(0.333 * var(--global--spacing-vertical)); + margin-bottom: calc(0.333 * var(--global--spacing-vertical)); + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } + } + + // Post title + > li > a { + display: inline-block; + font-family: var(--latest-posts--title-font-family); + font-size: var(--latest-posts--title-font-size); + font-weight: var(--heading--font-weight); + line-height: var(--global--line-height-heading); + margin-bottom: calc(0.333 * var(--global--spacing-vertical)); + } + + // Post author + .wp-block-latest-posts__post-author { + color: var(--global--color-primary); + font-size: var(--global--font-size-md); + line-height: var(--global--line-height-body); + } + + // Post date + .wp-block-latest-posts__post-date { + color: var(--global--color-primary); + font-size: var(--global--font-size-xs); + line-height: var(--global--line-height-body); + + [class*="inner-container"] &, + .has-background & { + color: currentColor; + } + } + + // Post content + .wp-block-latest-posts__post-excerpt, + .wp-block-latest-posts__post-full-content { + font-family: var(--latest-posts--description-font-family); + font-size: var(--latest-posts--description-font-size); + line-height: var(--global--line-height-body); + margin-top: calc(0.666 * var(--global--spacing-vertical)); + } + + // Block Styles + &.is-style-twentytwentyone-latest-posts-dividers { + border-top: calc(3 * var(--separator--height)) solid var(--global--color-border); + border-bottom: calc(3 * var(--separator--height)) solid var(--global--color-border); + + &:not(.is-grid) > li, + > li { + padding-bottom: var(--global--spacing-vertical); + border-bottom: var(--separator--height) solid var(--global--color-border); + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); + + &:last-child { + padding-bottom: 0; + border-bottom: none; + } + } + + &.is-grid { + // Border moves up 1px to overlap the li borders in the last row. + box-shadow: inset 0 -1px 0 0 var(--global--color-border); + border-bottom: calc(2 * var(--separator--height)) solid var(--global--color-border); + + li { + margin: 0; + padding-top: var(--global--spacing-vertical); + padding-right: var(--global--spacing-horizontal); + + &:last-child { + padding-bottom: var(--global--spacing-vertical); + } + } + + // This is using a non-standard media query because it is directly overriding the gutenberg-provided widths. + // https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/latest-posts/style.scss#L28-L34 + @media screen and (min-width: 600px) { + @for $i from 2 through 6 { + &.columns-#{ $i } li { + width: calc((100% / #{ $i })); + } + } + } + } + } + + &.is-style-twentytwentyone-latest-posts-borders { + + li { + border: calc(3 * var(--separator--height)) solid var(--global--color-border); + padding: var(--global--spacing-vertical) var(--global--spacing-horizontal); + + &:last-child { + padding-bottom: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); + } + } + + &:not(.is-grid) li { + margin-top: var(--global--spacing-horizontal); + margin-bottom: var(--global--spacing-horizontal); + } + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/latest-posts/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/latest-posts/_style.scss index 3a5d356d..f9bf6dc3 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/latest-posts/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/latest-posts/_style.scss @@ -1,169 +1,169 @@ -.wp-block-latest-posts { - padding-left: 0; - - // Vertical margins logic - &:not(.is-grid) > li { - margin-top: calc(1.666 * var(--global--spacing-vertical)); - margin-bottom: calc(1.666 * var(--global--spacing-vertical)); - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } - } - - &.is-grid { - word-wrap: break-word; - word-break: break-word; - - > li { - margin-bottom: var(--global--spacing-vertical); - - &:last-child { - margin-bottom: 0; - } - } - - // Remove bottom margins in grid columns - &.columns-2 > li:nth-last-child(-n + 2):nth-child(2n + 1), - &.columns-2 > li:nth-last-child(-n + 2):nth-child(2n + 1) ~ li, - &.columns-3 > li:nth-last-child(-n + 3):nth-child(3n + 1), - &.columns-3 > li:nth-last-child(-n + 3):nth-child(3n + 1) ~ li, - &.columns-4 > li:nth-last-child(-n + 4):nth-child(4n + 1), - &.columns-4 > li:nth-last-child(-n + 4):nth-child(4n + 1) ~ li, - &.columns-5 > li:nth-last-child(-n + 5):nth-child(5n + 1), - &.columns-5 > li:nth-last-child(-n + 5):nth-child(5n + 1) ~ li, - &.columns-6 > li:nth-last-child(-n + 6):nth-child(6n + 1), - &.columns-6 > li:nth-last-child(-n + 6):nth-child(6n + 1) ~ li { - margin-bottom: 0; - } - } - - > li > * { - margin-top: calc(0.333 * var(--global--spacing-vertical)); - margin-bottom: calc(0.333 * var(--global--spacing-vertical)); - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } - } - - // Post title - > li > a { - display: inline-block; - font-family: var(--latest-posts--title-font-family); - font-size: var(--latest-posts--title-font-size); - font-weight: var(--heading--font-weight); - line-height: var(--global--line-height-heading); - margin-bottom: calc(0.333 * var(--global--spacing-vertical)); - } - - // Post author - .wp-block-latest-posts__post-author { - color: var(--global--color-primary); - font-size: var(--global--font-size-md); - line-height: var(--global--line-height-body); - } - - // Post date - .wp-block-latest-posts__post-date { - color: var(--global--color-primary); - font-size: var(--global--font-size-xs); - line-height: var(--global--line-height-body); - - [class*="inner-container"] &, - .has-background & { - color: currentColor; - } - } - - // Post content - .wp-block-latest-posts__post-excerpt, - .wp-block-latest-posts__post-full-content { - font-family: var(--latest-posts--description-font-family); - font-size: var(--latest-posts--description-font-size); - line-height: var(--global--line-height-body); - margin-top: calc(0.666 * var(--global--spacing-vertical)); - } - - // Utility classes - &.alignfull { - padding-left: var(--global--spacing-unit); - padding-right: var(--global--spacing-unit); - - .entry-content [class*="inner-container"] &, - .entry-content .has-background & { - padding-left: 0; - padding-right: 0; - } - } - - // Block Styles - &.is-style-twentytwentyone-latest-posts-dividers { - border-top: calc(3 * var(--separator--height)) solid var(--global--color-border); - border-bottom: calc(3 * var(--separator--height)) solid var(--global--color-border); - - &:not(.is-grid) > li, - > li { - padding-bottom: var(--global--spacing-vertical); - border-bottom: var(--separator--height) solid var(--global--color-border); - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); - - &:last-child { - padding-bottom: 0; - border-bottom: none; - } - } - - &.is-grid { - // Border moves up 1px to overlap the li borders in the last row. - box-shadow: inset 0 -1px 0 0 var(--global--color-border); - border-bottom: calc(2 * var(--separator--height)) solid var(--global--color-border); - - li { - margin: 0; - padding-top: var(--global--spacing-vertical); - padding-right: var(--global--spacing-horizontal); - - &:last-child { - padding-bottom: var(--global--spacing-vertical); - } - } - - // This is using a non-standard media query because it is directly overriding the gutenberg-provided widths. - // https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/latest-posts/style.scss#L28-L34 - @media screen and (min-width: 600px) { - @for $i from 2 through 6 { - &.columns-#{ $i } li { - width: calc((100% / #{ $i })); - } - } - } - } - } - - &.is-style-twentytwentyone-latest-posts-borders { - - li { - border: calc(3 * var(--separator--height)) solid var(--global--color-border); - padding: var(--global--spacing-vertical) var(--global--spacing-horizontal); - - &:last-child { - padding-bottom: var(--global--spacing-vertical); - } - } - - &:not(.is-grid) li { - margin-top: var(--global--spacing-horizontal); - margin-bottom: var(--global--spacing-horizontal); - } - } -} +.wp-block-latest-posts { + padding-left: 0; + + // Vertical margins logic + &:not(.is-grid) > li { + margin-top: calc(1.666 * var(--global--spacing-vertical)); + margin-bottom: calc(1.666 * var(--global--spacing-vertical)); + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } + } + + &.is-grid { + word-wrap: break-word; + word-break: break-word; + + > li { + margin-bottom: var(--global--spacing-vertical); + + &:last-child { + margin-bottom: 0; + } + } + + // Remove bottom margins in grid columns + &.columns-2 > li:nth-last-child(-n + 2):nth-child(2n + 1), + &.columns-2 > li:nth-last-child(-n + 2):nth-child(2n + 1) ~ li, + &.columns-3 > li:nth-last-child(-n + 3):nth-child(3n + 1), + &.columns-3 > li:nth-last-child(-n + 3):nth-child(3n + 1) ~ li, + &.columns-4 > li:nth-last-child(-n + 4):nth-child(4n + 1), + &.columns-4 > li:nth-last-child(-n + 4):nth-child(4n + 1) ~ li, + &.columns-5 > li:nth-last-child(-n + 5):nth-child(5n + 1), + &.columns-5 > li:nth-last-child(-n + 5):nth-child(5n + 1) ~ li, + &.columns-6 > li:nth-last-child(-n + 6):nth-child(6n + 1), + &.columns-6 > li:nth-last-child(-n + 6):nth-child(6n + 1) ~ li { + margin-bottom: 0; + } + } + + > li > * { + margin-top: calc(0.333 * var(--global--spacing-vertical)); + margin-bottom: calc(0.333 * var(--global--spacing-vertical)); + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } + } + + // Post title + > li > a { + display: inline-block; + font-family: var(--latest-posts--title-font-family); + font-size: var(--latest-posts--title-font-size); + font-weight: var(--heading--font-weight); + line-height: var(--global--line-height-heading); + margin-bottom: calc(0.333 * var(--global--spacing-vertical)); + } + + // Post author + .wp-block-latest-posts__post-author { + color: var(--global--color-primary); + font-size: var(--global--font-size-md); + line-height: var(--global--line-height-body); + } + + // Post date + .wp-block-latest-posts__post-date { + color: var(--global--color-primary); + font-size: var(--global--font-size-xs); + line-height: var(--global--line-height-body); + + [class*="inner-container"] &, + .has-background & { + color: currentColor; + } + } + + // Post content + .wp-block-latest-posts__post-excerpt, + .wp-block-latest-posts__post-full-content { + font-family: var(--latest-posts--description-font-family); + font-size: var(--latest-posts--description-font-size); + line-height: var(--global--line-height-body); + margin-top: calc(0.666 * var(--global--spacing-vertical)); + } + + // Utility classes + &.alignfull { + padding-left: var(--global--spacing-unit); + padding-right: var(--global--spacing-unit); + + .entry-content [class*="inner-container"] &, + .entry-content .has-background & { + padding-left: 0; + padding-right: 0; + } + } + + // Block Styles + &.is-style-twentytwentyone-latest-posts-dividers { + border-top: calc(3 * var(--separator--height)) solid var(--global--color-border); + border-bottom: calc(3 * var(--separator--height)) solid var(--global--color-border); + + &:not(.is-grid) > li, + > li { + padding-bottom: var(--global--spacing-vertical); + border-bottom: var(--separator--height) solid var(--global--color-border); + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); + + &:last-child { + padding-bottom: 0; + border-bottom: none; + } + } + + &.is-grid { + // Border moves up 1px to overlap the li borders in the last row. + box-shadow: inset 0 -1px 0 0 var(--global--color-border); + border-bottom: calc(2 * var(--separator--height)) solid var(--global--color-border); + + li { + margin: 0; + padding-top: var(--global--spacing-vertical); + padding-right: var(--global--spacing-horizontal); + + &:last-child { + padding-bottom: var(--global--spacing-vertical); + } + } + + // This is using a non-standard media query because it is directly overriding the gutenberg-provided widths. + // https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/latest-posts/style.scss#L28-L34 + @media screen and (min-width: 600px) { + @for $i from 2 through 6 { + &.columns-#{ $i } li { + width: calc((100% / #{ $i })); + } + } + } + } + } + + &.is-style-twentytwentyone-latest-posts-borders { + + li { + border: calc(3 * var(--separator--height)) solid var(--global--color-border); + padding: var(--global--spacing-vertical) var(--global--spacing-horizontal); + + &:last-child { + padding-bottom: var(--global--spacing-vertical); + } + } + + &:not(.is-grid) li { + margin-top: var(--global--spacing-horizontal); + margin-bottom: var(--global--spacing-horizontal); + } + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/legacy/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/legacy/_editor.scss index c5202bf7..c3b540ff 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/legacy/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/legacy/_editor.scss @@ -1,42 +1,42 @@ -.gallery-item { - display: inline-block; - text-align: center; - vertical-align: top; - width: 100%; - - .gallery-columns-2 & { - max-width: 50%; - } - - .gallery-columns-3 & { - max-width: 33.33%; - } - - .gallery-columns-4 & { - max-width: 25%; - } - - .gallery-columns-5 & { - max-width: 20%; - } - - .gallery-columns-6 & { - max-width: 16.66%; - } - - .gallery-columns-7 & { - max-width: 14.28%; - } - - .gallery-columns-8 & { - max-width: 12.5%; - } - - .gallery-columns-9 & { - max-width: 11.11%; - } -} - -.gallery-caption { - display: block; -} +.gallery-item { + display: inline-block; + text-align: center; + vertical-align: top; + width: 100%; + + .gallery-columns-2 & { + max-width: 50%; + } + + .gallery-columns-3 & { + max-width: 33.33%; + } + + .gallery-columns-4 & { + max-width: 25%; + } + + .gallery-columns-5 & { + max-width: 20%; + } + + .gallery-columns-6 & { + max-width: 16.66%; + } + + .gallery-columns-7 & { + max-width: 14.28%; + } + + .gallery-columns-8 & { + max-width: 12.5%; + } + + .gallery-columns-9 & { + max-width: 11.11%; + } +} + +.gallery-caption { + display: block; +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/legacy/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/legacy/_style.scss index ad67d580..efbc1bf1 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/legacy/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/legacy/_style.scss @@ -1,55 +1,55 @@ -.gallery-item { - display: inline-block; - text-align: center; - vertical-align: top; - width: 100%; - - a { - display: block; - } - - a:focus img { - outline-offset: -2px; - } - - .gallery-columns-2 & { - max-width: 50%; - } - - .gallery-columns-3 & { - max-width: 33.33%; - } - - .gallery-columns-4 & { - max-width: 25%; - } - - .gallery-columns-5 & { - max-width: 20%; - } - - .gallery-columns-6 & { - max-width: 16.66%; - } - - .gallery-columns-7 & { - max-width: 14.28%; - } - - .gallery-columns-8 & { - max-width: 12.5%; - } - - .gallery-columns-9 & { - max-width: 11.11%; - } -} - -.gallery-caption { - display: block; -} - -// Legacy images, linked -figure.wp-caption a:focus img { - outline-offset: 2px; -} +.gallery-item { + display: inline-block; + text-align: center; + vertical-align: top; + width: 100%; + + a { + display: block; + } + + a:focus img { + outline-offset: -2px; + } + + .gallery-columns-2 & { + max-width: 50%; + } + + .gallery-columns-3 & { + max-width: 33.33%; + } + + .gallery-columns-4 & { + max-width: 25%; + } + + .gallery-columns-5 & { + max-width: 20%; + } + + .gallery-columns-6 & { + max-width: 16.66%; + } + + .gallery-columns-7 & { + max-width: 14.28%; + } + + .gallery-columns-8 & { + max-width: 12.5%; + } + + .gallery-columns-9 & { + max-width: 11.11%; + } +} + +.gallery-caption { + display: block; +} + +// Legacy images, linked +figure.wp-caption a:focus img { + outline-offset: 2px; +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/list/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/list/_editor.scss index 27bbdc6f..1b27b3c3 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/list/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/list/_editor.scss @@ -1,32 +1,32 @@ -ul, -ol { - font-family: var(--list--font-family); - margin: var(--global--spacing-vertical) 0; - padding-left: calc(2 * var(--global--spacing-horizontal)); - - // Utility classes - &.aligncenter { - list-style-position: inside; - padding: 0; - text-align: center; - } - - &.alignright { - list-style-position: inside; - padding: 0; - text-align: right; - } -} - -li { - - > ul, - > ol { - margin: 0; - } -} - -dt { - font-family: var(--definition-term--font-family); - font-weight: bold; -} +ul, +ol { + font-family: var(--list--font-family); + margin: var(--global--spacing-vertical) 0; + padding-left: calc(2 * var(--global--spacing-horizontal)); + + // Utility classes + &.aligncenter { + list-style-position: inside; + padding: 0; + text-align: center; + } + + &.alignright { + list-style-position: inside; + padding: 0; + text-align: right; + } +} + +li { + + > ul, + > ol { + margin: 0; + } +} + +dt { + font-family: var(--definition-term--font-family); + font-weight: bold; +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/list/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/list/_style.scss index f89a2fdb..3b22604b 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/list/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/list/_style.scss @@ -1,36 +1,42 @@ -ul, -ol { - font-family: var(--list--font-family); - margin: 0; - padding-left: calc(2 * var(--global--spacing-horizontal)); - - // Utility classes - &.aligncenter { - list-style-position: inside; - padding: 0; - } - - &.alignright { - list-style-position: inside; - text-align: right; - padding: 0; - } -} - -ul { - list-style-type: disc; -} - -ol { - list-style-type: decimal; -} - -dt { - font-family: var(--definition-term--font-family); - font-weight: bold; -} - -dd { - margin: 0; - padding-left: calc(2 * var(--global--spacing-horizontal)); -} +ul, +ol { + font-family: var(--list--font-family); + margin: 0; + padding-left: calc(2 * var(--global--spacing-horizontal)); + + // Utility classes + &.aligncenter { + list-style-position: inside; + padding: 0; + } + + &.alignright { + list-style-position: inside; + text-align: right; + padding: 0; + } +} + +ul { + list-style-type: disc; + ul { + list-style-type: circle; + } +} + +ol { + list-style-type: decimal; + ul { + list-style-type: circle; + } +} + +dt { + font-family: var(--definition-term--font-family); + font-weight: bold; +} + +dd { + margin: 0; + padding-left: calc(2 * var(--global--spacing-horizontal)); +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/media-text/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/media-text/_editor.scss index 1bdc2479..583dc3d9 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/media-text/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/media-text/_editor.scss @@ -1,18 +1,18 @@ -.wp-block-media-text { - - [data-align="full"] & { - margin-top: 0; - margin-bottom: 0; - } - - @include innerblock-margin-clear(".wp-block-media-text__content"); - - .wp-block-media-text__content { - padding: var(--global--spacing-horizontal); - } - - // Block Styles - &.is-style-twentytwentyone-border { - border: calc(3 * var(--separator--height)) solid var(--global--color-border); - } -} +.wp-block-media-text { + + [data-align="full"] & { + margin-top: 0; + margin-bottom: 0; + } + + @include innerblock-margin-clear(".wp-block-media-text__content"); + + .wp-block-media-text__content { + padding: var(--global--spacing-horizontal); + } + + // Block Styles + &.is-style-twentytwentyone-border { + border: calc(3 * var(--separator--height)) solid var(--global--color-border); + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/media-text/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/media-text/_style.scss index babbcdb0..7879886f 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/media-text/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/media-text/_style.scss @@ -1,53 +1,53 @@ -.wp-block-media-text { - - &.alignfull { - margin-top: 0; - margin-bottom: 0; - } - - a:focus img { - outline-offset: -1px; - } - - .wp-block-media-text__content { - padding: var(--global--spacing-horizontal); - - @include media(tablet) { - padding: var(--global--spacing-vertical); - } - - > * { - margin-top: calc(0.666 * var(--global--spacing-vertical)); - margin-bottom: calc(0.666 * var(--global--spacing-vertical)); - - @include media(mobile) { - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); - } - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } - } - } - - /** - * Block Options - */ - - &.is-stacked-on-mobile .wp-block-media-text__content { - @include media(mobile) { - padding-top: var(--global--spacing-vertical); - padding-bottom: var(--global--spacing-vertical); - } - } - - // Block Styles - &.is-style-twentytwentyone-border { - border: calc(3 * var(--separator--height)) solid var(--global--color-border); - } -} +.wp-block-media-text { + + &.alignfull { + margin-top: 0; + margin-bottom: 0; + } + + a:focus img { + outline-offset: -1px; + } + + .wp-block-media-text__content { + padding: var(--global--spacing-horizontal); + + @include media(tablet) { + padding: var(--global--spacing-vertical); + } + + > * { + margin-top: calc(0.666 * var(--global--spacing-vertical)); + margin-bottom: calc(0.666 * var(--global--spacing-vertical)); + + @include media(mobile) { + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); + } + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } + } + } + + /** + * Block Options + */ + + &.is-stacked-on-mobile .wp-block-media-text__content { + @include media(mobile) { + padding-top: var(--global--spacing-vertical); + padding-bottom: var(--global--spacing-vertical); + } + } + + // Block Styles + &.is-style-twentytwentyone-border { + border: calc(3 * var(--separator--height)) solid var(--global--color-border); + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/navigation/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/navigation/_editor.scss index e98419d9..028376da 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/navigation/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/navigation/_editor.scss @@ -1,45 +1,45 @@ -.wp-block-navigation { - - .wp-block-navigation__container { - background: var(--global--color-background); - padding: 0; - } - - .wp-block-navigation-link { - - .wp-block-navigation-link__content { - padding: var(--primary-nav--padding); - } - - .wp-block-navigation-link__label { - font-family: var(--primary-nav--font-family); - font-size: var(--primary-nav--font-size); - font-weight: var(--primary-nav--font-weight); - } - } - - .has-child { - - .wp-block-navigation__container { - box-shadow: var(--global--elevation); - } - } - - &:not(.has-text-color) { - - .wp-block-navigation-link { - - > a { - - &:hover, - &:focus { - color: var(--primary-nav--color-link-hover); - } - } - } - - .wp-block-navigation-link__content { - color: currentColor; - } - } -} +.wp-block-navigation { + + .wp-block-navigation__container { + background: var(--global--color-background); + padding: 0; + } + + .wp-block-navigation-link { + + .wp-block-navigation-link__content { + padding: var(--primary-nav--padding); + } + + .wp-block-navigation-link__label { + font-family: var(--primary-nav--font-family); + font-size: var(--primary-nav--font-size); + font-weight: var(--primary-nav--font-weight); + } + } + + .has-child { + + .wp-block-navigation__container { + box-shadow: var(--global--elevation); + } + } + + &:not(.has-text-color) { + + .wp-block-navigation-link { + + > a { + + &:hover, + &:focus { + color: var(--primary-nav--color-link-hover); + } + } + } + + .wp-block-navigation-link__content { + color: currentColor; + } + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/navigation/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/navigation/_style.scss index fecc6d98..3e3b1ca3 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/navigation/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/navigation/_style.scss @@ -1,128 +1,128 @@ -.wp-block-navigation { - - .wp-block-navigation-link { - padding: 0; - - .wp-block-navigation-link__content { - padding: var(--primary-nav--padding); - } - - .wp-block-navigation-link__label { - font-family: var(--primary-nav--font-family); - font-size: var(--primary-nav--font-size); - font-weight: var(--primary-nav--font-weight); - } - } - - .wp-block-navigation-link__submenu-icon { - padding: 0; - } - - // Top level navigation container. - > .wp-block-navigation__container { - - .has-child { - - .wp-block-navigation-link { - display: inherit; - } - - .wp-block-navigation__container { - border: none; - left: 0; - margin-left: var(--primary-nav--padding); - min-width: max-content; - opacity: 0; - padding: 0; - position: inherit; - top: inherit; - - .wp-block-navigation-link { - - .wp-block-navigation-link__content { - display: inline-block; - padding: calc(0.5 * var(--primary-nav--padding)) var(--primary-nav--padding); - } - } - - .wp-block-navigation-link__submenu-icon { - display: none; - } - } - - &:hover, - &:focus-within { - - .wp-block-navigation__container { - display: block; - opacity: 1; - visibility: visible; - } - } - } - - > .has-child { - - > .wp-block-navigation__container { - background: var(--global--color-background); - margin: 0; - padding: 0; - position: absolute; - top: 100%; - border: 1px solid var(--primary-nav--border-color); - - &:before, - &:after { - content: ""; - display: block; - position: absolute; - width: 0; - top: -10px; - left: var(--global--spacing-horizontal); - border-style: solid; - border-color: var(--primary-nav--border-color) transparent; - border-width: 0 7px 10px 7px; - } - - &:after { - top: -9px; - border-color: var(--global--color-background) transparent; - } - } - } - } - - &:not(.has-background) { - - .wp-block-navigation__container { - background: var(--global--color-background); - - .wp-block-navigation__container { - background: var(--global--color-background); - } - } - } - - &:not(.has-text-color) { - - .wp-block-navigation-link { - - > a { - - &:hover, - &:focus { - color: var(--primary-nav--color-link-hover); - } - - &:hover { - text-decoration: underline; - text-decoration-style: dotted; - } - } - } - - .wp-block-navigation-link__content { - color: currentColor; - } - } -} +.wp-block-navigation { + + .wp-block-navigation-link { + padding: 0; + + .wp-block-navigation-link__content { + padding: var(--primary-nav--padding); + } + + .wp-block-navigation-link__label { + font-family: var(--primary-nav--font-family); + font-size: var(--primary-nav--font-size); + font-weight: var(--primary-nav--font-weight); + } + } + + .wp-block-navigation-link__submenu-icon { + padding: 0; + } + + // Top level navigation container. + > .wp-block-navigation__container { + + .has-child { + + .wp-block-navigation-link { + display: inherit; + } + + .wp-block-navigation__container { + border: none; + left: 0; + margin-left: var(--primary-nav--padding); + min-width: max-content; + opacity: 0; + padding: 0; + position: inherit; + top: inherit; + + .wp-block-navigation-link { + + .wp-block-navigation-link__content { + display: inline-block; + padding: calc(0.5 * var(--primary-nav--padding)) var(--primary-nav--padding); + } + } + + .wp-block-navigation-link__submenu-icon { + display: none; + } + } + + &:hover, + &:focus-within { + + .wp-block-navigation__container { + display: block; + opacity: 1; + visibility: visible; + } + } + } + + > .has-child { + + > .wp-block-navigation__container { + background: var(--global--color-background); + margin: 0; + padding: 0; + position: absolute; + top: 100%; + border: 1px solid var(--primary-nav--border-color); + + &:before, + &:after { + content: ""; + display: block; + position: absolute; + width: 0; + top: -10px; + left: var(--global--spacing-horizontal); + border-style: solid; + border-color: var(--primary-nav--border-color) transparent; + border-width: 0 7px 10px 7px; + } + + &:after { + top: -9px; + border-color: var(--global--color-background) transparent; + } + } + } + } + + &:not(.has-background) { + + .wp-block-navigation__container { + background: var(--global--color-background); + + .wp-block-navigation__container { + background: var(--global--color-background); + } + } + } + + &:not(.has-text-color) { + + .wp-block-navigation-link { + + > a { + + &:hover, + &:focus { + color: var(--primary-nav--color-link-hover); + } + + &:hover { + text-decoration: underline; + text-decoration-style: dotted; + } + } + } + + .wp-block-navigation-link__content { + color: currentColor; + } + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/paragraph/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/paragraph/_editor.scss index 5c8985c7..3ee367d0 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/paragraph/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/paragraph/_editor.scss @@ -1,7 +1,7 @@ -p { - line-height: var(--wp--typography--line-height, --global--line-height-body); - - &.has-background { - padding: var(--global--spacing-unit); - } -} +p { + line-height: var(--wp--typography--line-height, var(--global--line-height-body)); + + &.has-background { + padding: var(--global--spacing-unit); + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/paragraph/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/paragraph/_style.scss index fc6644dd..46bca912 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/paragraph/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/paragraph/_style.scss @@ -1,14 +1,14 @@ -p { - - line-height: var(--wp--typography--line-height, --global--line-height-body); - - // inherits general font style set at - &.has-background { - padding: var(--global--spacing-unit); - } - - // Override `color: inherit` from Core styles. - &.has-text-color a { - color: var(--wp--style--color--link, var(--global--color-primary)); - } -} +p { + + line-height: var(--wp--typography--line-height, var(--global--line-height-body)); + + // inherits general font style set at + &.has-background { + padding: var(--global--spacing-unit); + } + + // Override `color: inherit` from Core styles. + &.has-text-color a { + color: var(--wp--style--color--link, var(--global--color-primary)); + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/preformatted/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/preformatted/_editor.scss index aa8f611d..83c26540 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/preformatted/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/preformatted/_editor.scss @@ -1,6 +1,6 @@ -pre.wp-block-preformatted { - overflow-x: auto; - white-space: pre !important; - font-size: var(--global--font-size-xs); - -} +pre.wp-block-preformatted { + overflow-x: auto; + white-space: pre !important; + font-size: var(--global--font-size-xs); + +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/preformatted/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/preformatted/_style.scss index 8f3fd74b..342b1163 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/preformatted/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/preformatted/_style.scss @@ -1,4 +1,4 @@ -pre.wp-block-preformatted { - overflow-x: auto; - white-space: pre; -} +pre.wp-block-preformatted { + overflow-x: auto; + white-space: pre; +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/pullquote/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/pullquote/_editor.scss index 87b210de..5b223b19 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/pullquote/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/pullquote/_editor.scss @@ -1,106 +1,106 @@ -.wp-block-pullquote { - padding: calc(2 * var(--global--spacing-unit)) 0; - text-align: center; - border-width: var(--pullquote--border-width); - border-bottom-style: solid; - border-top-style: solid; - color: currentColor; - border-color: currentColor; - position: relative; - - blockquote::before { - color: currentColor; - content: "\201C"; - display: block; - position: relative; // Override the absolute position. - left: 0; - font-size: 3rem; - font-weight: 500; - line-height: 1; - } - - p { - font-family: var(--pullquote--font-family); - font-size: var(--pullquote--font-size); - font-style: var(--pullquote--font-style); - font-weight: 700; - letter-spacing: var(--pullquote--letter-spacing); - line-height: var(--pullquote--line-height); - margin: 0; - } - - a { - color: currentColor; - } - - .wp-block-pullquote__citation, - cite, - footer { - font-size: var(--global--font-size-xs); - font-style: var(--pullquote--font-style); - text-transform: none; - } - - // Block Options - &:not(.is-style-solid-color) { - background: none; - } - - &.is-style-solid-color { - margin-left: auto; - margin-right: auto; - padding: calc(2.5 * var(--global--spacing-unit)); - border-width: var(--pullquote--border-width); - border-style: solid; - border-color: var(--pullquote--border-color); - - @media ( min-width: 600px ) { - padding: calc(5 * var(--global--spacing-unit)); - } - - blockquote::before { - text-align: left; - } - - &.alignleft blockquote, - &.alignright blockquote { - padding-left: var(--global--spacing-unit); - padding-right: var(--global--spacing-unit); - max-width: inherit; - } - - blockquote { - margin: 0; - max-width: 100%; - - p { - font-size: var(--pullquote--font-size); - } - } - - .wp-block-pullquote__citation, - cite, - footer { - color: currentColor; - } - } - -} - -.wp-block[data-align="full"] { - - .wp-block-pullquote:not(.is-style-solid-color) { - - blockquote { - padding: 0 calc(2 * var(--global--spacing-unit)); - } - } -} - -.wp-block[data-align="left"], -.wp-block[data-align="right"] { - - .wp-block-pullquote.is-style-solid-color { - padding: var(--global--spacing-unit); - } -} +.wp-block-pullquote { + padding: calc(2 * var(--global--spacing-unit)) 0; + text-align: center; + border-width: var(--pullquote--border-width); + border-bottom-style: solid; + border-top-style: solid; + color: currentColor; + border-color: currentColor; + position: relative; + + blockquote::before { + color: currentColor; + content: "\201C"; + display: block; + position: relative; // Override the absolute position. + left: 0; + font-size: 3rem; + font-weight: 500; + line-height: 1; + } + + p { + font-family: var(--pullquote--font-family); + font-size: var(--pullquote--font-size); + font-style: var(--pullquote--font-style); + font-weight: 700; + letter-spacing: var(--pullquote--letter-spacing); + line-height: var(--pullquote--line-height); + margin: 0; + } + + a { + color: currentColor; + } + + .wp-block-pullquote__citation, + cite, + footer { + font-size: var(--global--font-size-xs); + font-style: var(--pullquote--font-style); + text-transform: none; + } + + // Block Options + &:not(.is-style-solid-color) { + background: none; + } + + &.is-style-solid-color { + margin-left: auto; + margin-right: auto; + padding: calc(2.5 * var(--global--spacing-unit)); + border-width: var(--pullquote--border-width); + border-style: solid; + border-color: var(--pullquote--border-color); + + @media ( min-width: 600px ) { + padding: calc(5 * var(--global--spacing-unit)); + } + + blockquote::before { + text-align: left; + } + + &.alignleft blockquote, + &.alignright blockquote { + padding-left: var(--global--spacing-unit); + padding-right: var(--global--spacing-unit); + max-width: inherit; + } + + blockquote { + margin: 0; + max-width: 100%; + + p { + font-size: var(--pullquote--font-size); + } + } + + .wp-block-pullquote__citation, + cite, + footer { + color: currentColor; + } + } + +} + +.wp-block[data-align="full"] { + + .wp-block-pullquote:not(.is-style-solid-color) { + + blockquote { + padding: 0 calc(2 * var(--global--spacing-unit)); + } + } +} + +.wp-block[data-align="left"], +.wp-block[data-align="right"] { + + .wp-block-pullquote.is-style-solid-color { + padding: var(--global--spacing-unit); + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/pullquote/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/pullquote/_style.scss index fdfbe298..ad0bc2cb 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/pullquote/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/pullquote/_style.scss @@ -1,110 +1,110 @@ -.wp-block-pullquote { - padding: calc(2 * var(--global--spacing-unit)) 0; - text-align: center; - border-width: var(--pullquote--border-width); - border-bottom-style: solid; - border-top-style: solid; - color: currentColor; - border-color: currentColor; - position: relative; - - blockquote::before { - color: currentColor; - content: "\201C"; - display: block; - position: relative; // Override the absolute position. - left: 0; - font-size: 3rem; - font-weight: 500; - line-height: 1; - } - - p { - font-family: var(--pullquote--font-family); - font-size: var(--pullquote--font-size); - font-style: var(--pullquote--font-style); - font-weight: 700; - letter-spacing: var(--pullquote--letter-spacing); - line-height: var(--pullquote--line-height); - margin: 0; - } - - a { - color: currentColor; - } - - .wp-block-pullquote__citation, - cite, - footer { - color: currentColor; - display: block; - font-size: var(--global--font-size-xs); - font-style: var(--pullquote--font-style); - text-transform: none; - } - - /** - * Block Options - */ - &:not(.is-style-solid-color) { - background: none; - } - - &.alignleft:not(.is-style-solid-color) { - - blockquote:before, - cite { - text-align: center; - } - } - - &.alignwide > p, - &.alignwide blockquote { - max-width: var(--responsive--alignwide-width); - } - - &.alignfull:not(.is-style-solid-color) > p, - &.alignfull:not(.is-style-solid-color) blockquote { - padding: 0 calc(2 * var(--global--spacing-unit)); - } - - &.is-style-solid-color { - color: var(--pullquote--color-foreground); - padding: calc(2.5 * var(--global--spacing-unit)); - border-width: var(--pullquote--border-width); - border-style: solid; - border-color: var(--pullquote--border-color); - - @media (min-width: 600px) { - padding: calc(5 * var(--global--spacing-unit)); - } - - blockquote::before { - text-align: left; - } - - blockquote { - margin: 0; - max-width: inherit; - - p { - font-size: var(--pullquote--font-size); - } - } - - .wp-block-pullquote__citation, - cite, - footer { - color: currentColor; - } - - &.alignleft, - &.alignright { - padding: var(--global--spacing-unit); - - blockquote { - max-width: initial; - } - } - } -} +.wp-block-pullquote { + padding: calc(2 * var(--global--spacing-unit)) 0; + text-align: center; + border-width: var(--pullquote--border-width); + border-bottom-style: solid; + border-top-style: solid; + color: currentColor; + border-color: currentColor; + position: relative; + + blockquote::before { + color: currentColor; + content: "\201C"; + display: block; + position: relative; // Override the absolute position. + left: 0; + font-size: 3rem; + font-weight: 500; + line-height: 1; + } + + p { + font-family: var(--pullquote--font-family); + font-size: var(--pullquote--font-size); + font-style: var(--pullquote--font-style); + font-weight: 700; + letter-spacing: var(--pullquote--letter-spacing); + line-height: var(--pullquote--line-height); + margin: 0; + } + + a { + color: currentColor; + } + + .wp-block-pullquote__citation, + cite, + footer { + color: currentColor; + display: block; + font-size: var(--global--font-size-xs); + font-style: var(--pullquote--font-style); + text-transform: none; + } + + /** + * Block Options + */ + &:not(.is-style-solid-color) { + background: none; + } + + &.alignleft:not(.is-style-solid-color) { + + blockquote:before, + cite { + text-align: center; + } + } + + &.alignwide > p, + &.alignwide blockquote { + max-width: var(--responsive--alignwide-width); + } + + &.alignfull:not(.is-style-solid-color) > p, + &.alignfull:not(.is-style-solid-color) blockquote { + padding: 0 calc(2 * var(--global--spacing-unit)); + } + + &.is-style-solid-color { + color: var(--pullquote--color-foreground); + padding: calc(2.5 * var(--global--spacing-unit)); + border-width: var(--pullquote--border-width); + border-style: solid; + border-color: var(--pullquote--border-color); + + @media (min-width: 600px) { + padding: calc(5 * var(--global--spacing-unit)); + } + + blockquote::before { + text-align: left; + } + + blockquote { + margin: 0; + max-width: inherit; + + p { + font-size: var(--pullquote--font-size); + } + } + + .wp-block-pullquote__citation, + cite, + footer { + color: currentColor; + } + + &.alignleft, + &.alignright { + padding: var(--global--spacing-unit); + + blockquote { + max-width: initial; + } + } + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/quote/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/quote/_editor.scss index 2d508047..4a337676 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/quote/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/quote/_editor.scss @@ -1,150 +1,150 @@ -.wp-block-quote { - position: relative; - border-left: none; - margin: var(--global--spacing-vertical) auto var(--global--spacing-vertical) var(--global--spacing-horizontal); - - p { - font-family: var(--quote--font-family); - font-size: var(--quote--font-size); - font-style: var(--quote--font-style); - font-weight: var(--quote--font-weight); - line-height: var(--quote--line-height); - } - - strong { - font-weight: var(--quote--font-weight-strong); - } - - &:before { - content: "\201C"; - font-size: var(--quote--font-size); - line-height: var(--quote--line-height); - left: calc(-0.5 * var(--global--spacing-horizontal)); - } - - .wp-block-quote__citation { - color: var(--global--color-primary); - font-size: var(--global--font-size-xs); - font-style: var(--quote--font-style-cite); - - .has-background &, - [class*="background-color"] &, - [style*="background-color"] &, - .wp-block-cover[style*="background-image"] & { - color: currentColor; - } - } - - &.has-text-align-right { - margin: var(--global--spacing-vertical) var(--global--spacing-horizontal) var(--global--spacing-vertical) auto; - padding-right: 0; - border-right: none; - - // Hide the left aligned quote. - &:before { - display: none; - } - - // Align the quote left of the text. - p:before { - content: "\201D"; - font-size: var(--quote--font-size); - font-weight: normal; - line-height: var(--quote--line-height); - margin-right: 5px; - } - } - - &.has-text-align-center { - margin: var(--global--spacing-vertical) auto; - - &:before { - display: none; - } - } - - &.is-large, - &.is-style-large { - padding-left: 0; - - /* Resetting margins to match _block-container.scss */ - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); - - p { - font-size: var(--quote--font-size-large); - font-style: var(--quote--font-style-large); - line-height: var(--quote--line-height-large); - } - - &:before { - font-size: var(--quote--font-size-large); - line-height: var(--quote--line-height-large); - left: calc(-1 * var(--global--spacing-horizontal)); - } - - &.has-text-align-right { - - // Hide the left aligned quote. - &:before { - display: none; - } - - // Align the quote left of the text. - p:before { - content: "\201D"; - font-size: var(--quote--font-size-large); - font-weight: normal; - line-height: var(--quote--line-height-large); - margin-right: 10px; - } - } - - @include media(mobile-only) { - padding-left: var(--global--spacing-horizontal); - - &:before { - left: 0; - } - - &.has-text-align-right { - padding-left: 0; - padding-right: var(--global--spacing-horizontal); - - &:before { - right: 0; - } - } - } - } - - @include media(mobile-only) { - padding-left: calc(0.5 * var(--global--spacing-horizontal)); - - &:before { - left: 0; - } - - &.has-text-align-right { - padding-left: 0; - padding-right: calc(0.5 * var(--global--spacing-horizontal)); - - &:before { - right: 0; - } - } - - &.has-text-align-center { - padding-left: 0; - padding-right: 0; - } - } - - @include media(mobile) { - margin-left: auto; - - &.has-text-align-right { - margin-right: auto; - } - } -} +.wp-block-quote { + position: relative; + border-left: none; + margin: var(--global--spacing-vertical) auto var(--global--spacing-vertical) var(--global--spacing-horizontal); + + p { + font-family: var(--quote--font-family); + font-size: var(--quote--font-size); + font-style: var(--quote--font-style); + font-weight: var(--quote--font-weight); + line-height: var(--quote--line-height); + } + + strong { + font-weight: var(--quote--font-weight-strong); + } + + &:before { + content: "\201C"; + font-size: var(--quote--font-size); + line-height: var(--quote--line-height); + left: calc(-0.5 * var(--global--spacing-horizontal)); + } + + .wp-block-quote__citation { + color: var(--global--color-primary); + font-size: var(--global--font-size-xs); + font-style: var(--quote--font-style-cite); + + .has-background &, + [class*="background-color"] &, + [style*="background-color"] &, + .wp-block-cover[style*="background-image"] & { + color: currentColor; + } + } + + &.has-text-align-right { + margin: var(--global--spacing-vertical) var(--global--spacing-horizontal) var(--global--spacing-vertical) auto; + padding-right: 0; + border-right: none; + + // Hide the left aligned quote. + &:before { + display: none; + } + + // Align the quote left of the text. + p:before { + content: "\201D"; + font-size: var(--quote--font-size); + font-weight: normal; + line-height: var(--quote--line-height); + margin-right: 5px; + } + } + + &.has-text-align-center { + margin: var(--global--spacing-vertical) auto; + + &:before { + display: none; + } + } + + &.is-large, + &.is-style-large { + padding-left: 0; + + /* Resetting margins to match _block-container.scss */ + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); + + p { + font-size: var(--quote--font-size-large); + font-style: var(--quote--font-style-large); + line-height: var(--quote--line-height-large); + } + + &:before { + font-size: var(--quote--font-size-large); + line-height: var(--quote--line-height-large); + left: calc(-1 * var(--global--spacing-horizontal)); + } + + &.has-text-align-right { + + // Hide the left aligned quote. + &:before { + display: none; + } + + // Align the quote left of the text. + p:before { + content: "\201D"; + font-size: var(--quote--font-size-large); + font-weight: normal; + line-height: var(--quote--line-height-large); + margin-right: 10px; + } + } + + @include media(mobile-only) { + padding-left: var(--global--spacing-horizontal); + + &:before { + left: 0; + } + + &.has-text-align-right { + padding-left: 0; + padding-right: var(--global--spacing-horizontal); + + &:before { + right: 0; + } + } + } + } + + @include media(mobile-only) { + padding-left: calc(0.5 * var(--global--spacing-horizontal)); + + &:before { + left: 0; + } + + &.has-text-align-right { + padding-left: 0; + padding-right: calc(0.5 * var(--global--spacing-horizontal)); + + &:before { + right: 0; + } + } + + &.has-text-align-center { + padding-left: 0; + padding-right: 0; + } + } + + @include media(mobile) { + margin-left: auto; + + &.has-text-align-right { + margin-right: auto; + } + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/quote/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/quote/_style.scss index 6384b391..8d8e3c44 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/quote/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/quote/_style.scss @@ -1,138 +1,138 @@ -.wp-block-quote { - border-left: none; - - &:before { - content: "\201C"; - font-size: var(--quote--font-size); - line-height: var(--quote--line-height); - left: 8px; - } - - .wp-block-quote__citation, - cite, - footer { - - .has-background &, - [class*="background-color"] &, - [style*="background-color"] &, - .wp-block-cover[style*="background-image"] & { - color: currentColor; - } - } - - /** - * Block Options - */ - &.has-text-align-right { - margin: var(--global--spacing-vertical) var(--global--spacing-horizontal) var(--global--spacing-vertical) auto; - padding-right: 0; - border-right: none; - - // Hide the left aligned quote. - &:before { - display: none; - } - - // Align the quote left of the text. - p:before { - content: "\201D"; - font-size: var(--quote--font-size); - font-weight: normal; - line-height: var(--quote--line-height); - margin-right: 5px; - } - } - - &.has-text-align-center { - margin: var(--global--spacing-vertical) auto; - - &:before { - display: none; - } - } - - &.is-large, - &.is-style-large { - padding-left: 0; - padding-right: 0; - - /* Resetting margins to match _block-container.scss */ - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); - - p { - font-size: var(--quote--font-size-large); - font-style: var(--quote--font-style-large); - line-height: var(--quote--line-height-large); - } - - &:before { - font-size: var(--quote--font-size-large); - line-height: var(--quote--line-height-large); - left: calc(-1 * var(--global--spacing-horizontal)); - } - - &.has-text-align-right { - - // Hide the left aligned quote. - &:before { - display: none; - } - - // Align the quote left of the text. - p:before { - content: "\201D"; - font-size: var(--quote--font-size-large); - font-weight: normal; - line-height: var(--quote--line-height-large); - margin-right: 10px; - } - } - - .wp-block-quote__citation, - cite, - footer { - color: var(--global--color-primary); - font-size: var(--global--font-size-sm); - } - - @include media(mobile-only) { - padding-left: var(--global--spacing-horizontal); - - &:before { - left: 0; - } - - &.has-text-align-right { - padding-left: 0; - padding-right: var(--global--spacing-horizontal); - - &:before { - right: 0; - } - } - - &.has-text-align-center { - padding-left: 0; - padding-right: 0; - } - } - } - - @include media(mobile-only) { - - &.has-text-align-right { - padding-left: 0; - padding-right: calc(0.5 * var(--global--spacing-horizontal)); - - &:before { - right: 0; - } - } - - &.has-text-align-center { - padding-left: 0; - padding-right: 0; - } - } -} +.wp-block-quote { + border-left: none; + + &:before { + content: "\201C"; + font-size: var(--quote--font-size); + line-height: var(--quote--line-height); + left: 8px; + } + + .wp-block-quote__citation, + cite, + footer { + + .has-background &, + [class*="background-color"] &, + [style*="background-color"] &, + .wp-block-cover[style*="background-image"] & { + color: currentColor; + } + } + + /** + * Block Options + */ + &.has-text-align-right { + margin: var(--global--spacing-vertical) var(--global--spacing-horizontal) var(--global--spacing-vertical) auto; + padding-right: 0; + border-right: none; + + // Hide the left aligned quote. + &:before { + display: none; + } + + // Align the quote left of the text. + p:before { + content: "\201D"; + font-size: var(--quote--font-size); + font-weight: normal; + line-height: var(--quote--line-height); + margin-right: 5px; + } + } + + &.has-text-align-center { + margin: var(--global--spacing-vertical) auto; + + &:before { + display: none; + } + } + + &.is-large, + &.is-style-large { + padding-left: 0; + padding-right: 0; + + /* Resetting margins to match _block-container.scss */ + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); + + p { + font-size: var(--quote--font-size-large); + font-style: var(--quote--font-style-large); + line-height: var(--quote--line-height-large); + } + + &:before { + font-size: var(--quote--font-size-large); + line-height: var(--quote--line-height-large); + left: calc(-1 * var(--global--spacing-horizontal)); + } + + &.has-text-align-right { + + // Hide the left aligned quote. + &:before { + display: none; + } + + // Align the quote left of the text. + p:before { + content: "\201D"; + font-size: var(--quote--font-size-large); + font-weight: normal; + line-height: var(--quote--line-height-large); + margin-right: 10px; + } + } + + .wp-block-quote__citation, + cite, + footer { + color: var(--global--color-primary); + font-size: var(--global--font-size-sm); + } + + @include media(mobile-only) { + padding-left: var(--global--spacing-horizontal); + + &:before { + left: 0; + } + + &.has-text-align-right { + padding-left: 0; + padding-right: var(--global--spacing-horizontal); + + &:before { + right: 0; + } + } + + &.has-text-align-center { + padding-left: 0; + padding-right: 0; + } + } + } + + @include media(mobile-only) { + + &.has-text-align-right { + padding-left: 0; + padding-right: calc(0.5 * var(--global--spacing-horizontal)); + + &:before { + right: 0; + } + } + + &.has-text-align-center { + padding-left: 0; + padding-right: 0; + } + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/rss/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/rss/_editor.scss index bcc4447d..d1e0f636 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/rss/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/rss/_editor.scss @@ -1,109 +1,109 @@ -.wp-block-rss { - padding-left: 0; - - > li { - list-style: none; - } - - // Vertical margins logic - &:not(.is-grid) > li { - margin-top: calc(1.666 * var(--global--spacing-vertical)); - margin-bottom: calc(1.666 * var(--global--spacing-vertical)); - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } - } - - &.is-grid { - - > li { - margin-bottom: var(--global--spacing-vertical); - - &:last-child { - margin-bottom: 0; - } - } - - // Remove bottom margins in grid columns - &.columns-2 > li:nth-last-child(-n + 2):nth-child(2n + 1), - &.columns-2 > li:nth-last-child(-n + 2):nth-child(2n + 1) ~ li, - &.columns-3 > li:nth-last-child(-n + 3):nth-child(3n + 1), - &.columns-3 > li:nth-last-child(-n + 3):nth-child(3n + 1) ~ li, - &.columns-4 > li:nth-last-child(-n + 4):nth-child(4n + 1), - &.columns-4 > li:nth-last-child(-n + 4):nth-child(4n + 1) ~ li, - &.columns-5 > li:nth-last-child(-n + 5):nth-child(5n + 1), - &.columns-5 > li:nth-last-child(-n + 5):nth-child(5n + 1) ~ li, - &.columns-6 > li:nth-last-child(-n + 6):nth-child(6n + 1), - &.columns-6 > li:nth-last-child(-n + 6):nth-child(6n + 1) ~ li { - margin-bottom: 0; - } - } - - > li > * { - margin-top: calc(0.333 * var(--global--spacing-vertical)); - margin-bottom: calc(0.333 * var(--global--spacing-vertical)); - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } - } - - // Post title - .wp-block-rss__item-title > a { - display: inline-block; - font-family: var(--latest-posts--title-font-family); - font-size: var(--latest-posts--title-font-size); - font-weight: var(--heading--font-weight); - line-height: var(--global--line-height-heading); - margin-bottom: calc(0.333 * var(--global--spacing-vertical)); - } - - // Post author - .wp-block-rss__item-author { - color: var(--global--color-primary); - font-size: var(--global--font-size-md); - line-height: var(--global--line-height-body); - } - - // Post date - .wp-block-rss__item-publish-date { - color: var(--global--color-primary); - font-size: var(--global--font-size-xs); - line-height: var(--global--line-height-body); - - [class*="inner-container"] &, - .has-background & { - color: currentColor; - } - } - - // Post content - .wp-block-rss__item-excerpt, - .wp-block-rss__item-full-content { - font-family: var(--latest-posts--description-font-family); - font-size: var(--latest-posts--description-font-size); - line-height: var(--global--line-height-body); - margin-top: calc(0.666 * var(--global--spacing-vertical)); - } - - // Utility classes - &.alignfull { - padding-left: var(--global--spacing-unit); - padding-right: var(--global--spacing-unit); - - .entry-content [class*="inner-container"] &, - .entry-content .has-background & { - padding-left: 0; - padding-right: 0; - } - } -} +.wp-block-rss { + padding-left: 0; + + > li { + list-style: none; + } + + // Vertical margins logic + &:not(.is-grid) > li { + margin-top: calc(1.666 * var(--global--spacing-vertical)); + margin-bottom: calc(1.666 * var(--global--spacing-vertical)); + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } + } + + &.is-grid { + + > li { + margin-bottom: var(--global--spacing-vertical); + + &:last-child { + margin-bottom: 0; + } + } + + // Remove bottom margins in grid columns + &.columns-2 > li:nth-last-child(-n + 2):nth-child(2n + 1), + &.columns-2 > li:nth-last-child(-n + 2):nth-child(2n + 1) ~ li, + &.columns-3 > li:nth-last-child(-n + 3):nth-child(3n + 1), + &.columns-3 > li:nth-last-child(-n + 3):nth-child(3n + 1) ~ li, + &.columns-4 > li:nth-last-child(-n + 4):nth-child(4n + 1), + &.columns-4 > li:nth-last-child(-n + 4):nth-child(4n + 1) ~ li, + &.columns-5 > li:nth-last-child(-n + 5):nth-child(5n + 1), + &.columns-5 > li:nth-last-child(-n + 5):nth-child(5n + 1) ~ li, + &.columns-6 > li:nth-last-child(-n + 6):nth-child(6n + 1), + &.columns-6 > li:nth-last-child(-n + 6):nth-child(6n + 1) ~ li { + margin-bottom: 0; + } + } + + > li > * { + margin-top: calc(0.333 * var(--global--spacing-vertical)); + margin-bottom: calc(0.333 * var(--global--spacing-vertical)); + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } + } + + // Post title + .wp-block-rss__item-title > a { + display: inline-block; + font-family: var(--latest-posts--title-font-family); + font-size: var(--latest-posts--title-font-size); + font-weight: var(--heading--font-weight); + line-height: var(--global--line-height-heading); + margin-bottom: calc(0.333 * var(--global--spacing-vertical)); + } + + // Post author + .wp-block-rss__item-author { + color: var(--global--color-primary); + font-size: var(--global--font-size-md); + line-height: var(--global--line-height-body); + } + + // Post date + .wp-block-rss__item-publish-date { + color: var(--global--color-primary); + font-size: var(--global--font-size-xs); + line-height: var(--global--line-height-body); + + [class*="inner-container"] &, + .has-background & { + color: currentColor; + } + } + + // Post content + .wp-block-rss__item-excerpt, + .wp-block-rss__item-full-content { + font-family: var(--latest-posts--description-font-family); + font-size: var(--latest-posts--description-font-size); + line-height: var(--global--line-height-body); + margin-top: calc(0.666 * var(--global--spacing-vertical)); + } + + // Utility classes + &.alignfull { + padding-left: var(--global--spacing-unit); + padding-right: var(--global--spacing-unit); + + .entry-content [class*="inner-container"] &, + .entry-content .has-background & { + padding-left: 0; + padding-right: 0; + } + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/rss/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/rss/_style.scss index bcc4447d..d1e0f636 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/rss/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/rss/_style.scss @@ -1,109 +1,109 @@ -.wp-block-rss { - padding-left: 0; - - > li { - list-style: none; - } - - // Vertical margins logic - &:not(.is-grid) > li { - margin-top: calc(1.666 * var(--global--spacing-vertical)); - margin-bottom: calc(1.666 * var(--global--spacing-vertical)); - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } - } - - &.is-grid { - - > li { - margin-bottom: var(--global--spacing-vertical); - - &:last-child { - margin-bottom: 0; - } - } - - // Remove bottom margins in grid columns - &.columns-2 > li:nth-last-child(-n + 2):nth-child(2n + 1), - &.columns-2 > li:nth-last-child(-n + 2):nth-child(2n + 1) ~ li, - &.columns-3 > li:nth-last-child(-n + 3):nth-child(3n + 1), - &.columns-3 > li:nth-last-child(-n + 3):nth-child(3n + 1) ~ li, - &.columns-4 > li:nth-last-child(-n + 4):nth-child(4n + 1), - &.columns-4 > li:nth-last-child(-n + 4):nth-child(4n + 1) ~ li, - &.columns-5 > li:nth-last-child(-n + 5):nth-child(5n + 1), - &.columns-5 > li:nth-last-child(-n + 5):nth-child(5n + 1) ~ li, - &.columns-6 > li:nth-last-child(-n + 6):nth-child(6n + 1), - &.columns-6 > li:nth-last-child(-n + 6):nth-child(6n + 1) ~ li { - margin-bottom: 0; - } - } - - > li > * { - margin-top: calc(0.333 * var(--global--spacing-vertical)); - margin-bottom: calc(0.333 * var(--global--spacing-vertical)); - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } - } - - // Post title - .wp-block-rss__item-title > a { - display: inline-block; - font-family: var(--latest-posts--title-font-family); - font-size: var(--latest-posts--title-font-size); - font-weight: var(--heading--font-weight); - line-height: var(--global--line-height-heading); - margin-bottom: calc(0.333 * var(--global--spacing-vertical)); - } - - // Post author - .wp-block-rss__item-author { - color: var(--global--color-primary); - font-size: var(--global--font-size-md); - line-height: var(--global--line-height-body); - } - - // Post date - .wp-block-rss__item-publish-date { - color: var(--global--color-primary); - font-size: var(--global--font-size-xs); - line-height: var(--global--line-height-body); - - [class*="inner-container"] &, - .has-background & { - color: currentColor; - } - } - - // Post content - .wp-block-rss__item-excerpt, - .wp-block-rss__item-full-content { - font-family: var(--latest-posts--description-font-family); - font-size: var(--latest-posts--description-font-size); - line-height: var(--global--line-height-body); - margin-top: calc(0.666 * var(--global--spacing-vertical)); - } - - // Utility classes - &.alignfull { - padding-left: var(--global--spacing-unit); - padding-right: var(--global--spacing-unit); - - .entry-content [class*="inner-container"] &, - .entry-content .has-background & { - padding-left: 0; - padding-right: 0; - } - } -} +.wp-block-rss { + padding-left: 0; + + > li { + list-style: none; + } + + // Vertical margins logic + &:not(.is-grid) > li { + margin-top: calc(1.666 * var(--global--spacing-vertical)); + margin-bottom: calc(1.666 * var(--global--spacing-vertical)); + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } + } + + &.is-grid { + + > li { + margin-bottom: var(--global--spacing-vertical); + + &:last-child { + margin-bottom: 0; + } + } + + // Remove bottom margins in grid columns + &.columns-2 > li:nth-last-child(-n + 2):nth-child(2n + 1), + &.columns-2 > li:nth-last-child(-n + 2):nth-child(2n + 1) ~ li, + &.columns-3 > li:nth-last-child(-n + 3):nth-child(3n + 1), + &.columns-3 > li:nth-last-child(-n + 3):nth-child(3n + 1) ~ li, + &.columns-4 > li:nth-last-child(-n + 4):nth-child(4n + 1), + &.columns-4 > li:nth-last-child(-n + 4):nth-child(4n + 1) ~ li, + &.columns-5 > li:nth-last-child(-n + 5):nth-child(5n + 1), + &.columns-5 > li:nth-last-child(-n + 5):nth-child(5n + 1) ~ li, + &.columns-6 > li:nth-last-child(-n + 6):nth-child(6n + 1), + &.columns-6 > li:nth-last-child(-n + 6):nth-child(6n + 1) ~ li { + margin-bottom: 0; + } + } + + > li > * { + margin-top: calc(0.333 * var(--global--spacing-vertical)); + margin-bottom: calc(0.333 * var(--global--spacing-vertical)); + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } + } + + // Post title + .wp-block-rss__item-title > a { + display: inline-block; + font-family: var(--latest-posts--title-font-family); + font-size: var(--latest-posts--title-font-size); + font-weight: var(--heading--font-weight); + line-height: var(--global--line-height-heading); + margin-bottom: calc(0.333 * var(--global--spacing-vertical)); + } + + // Post author + .wp-block-rss__item-author { + color: var(--global--color-primary); + font-size: var(--global--font-size-md); + line-height: var(--global--line-height-body); + } + + // Post date + .wp-block-rss__item-publish-date { + color: var(--global--color-primary); + font-size: var(--global--font-size-xs); + line-height: var(--global--line-height-body); + + [class*="inner-container"] &, + .has-background & { + color: currentColor; + } + } + + // Post content + .wp-block-rss__item-excerpt, + .wp-block-rss__item-full-content { + font-family: var(--latest-posts--description-font-family); + font-size: var(--latest-posts--description-font-size); + line-height: var(--global--line-height-body); + margin-top: calc(0.666 * var(--global--spacing-vertical)); + } + + // Utility classes + &.alignfull { + padding-left: var(--global--spacing-unit); + padding-right: var(--global--spacing-unit); + + .entry-content [class*="inner-container"] &, + .entry-content .has-background & { + padding-left: 0; + padding-right: 0; + } + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/search/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/search/_editor.scss index a7085c62..6be9178e 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/search/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/search/_editor.scss @@ -1,183 +1,114 @@ -.wp-block-search { - max-width: var(--responsive--aligndefault-width); - - .wp-block-search__label { - font-size: var(--form--font-size); - font-weight: var(--form--label-weight); - margin-bottom: calc(var(--global--spacing-vertical) / 3); - } - - .wp-block-search__input { - border: var(--form--border-width) solid var(--form--border-color); - border-radius: var(--form--border-radius); - font-family: var(--form--font-family); - font-size: var(--form--font-size); - line-height: var(--form--line-height); - max-width: inherit; - margin-right: calc(-1 * var(--button--border-width)); - padding: var(--form--spacing-unit); - - .is-dark-theme & { - background: var(--global--color-white-90); - } - - .has-background.has-white-background-color &, - .has-background.has-green-background-color &, - .has-background.has-blue-background-color &, - .has-background.has-purple-background-color &, - .has-background.has-red-background-color &, - .has-background.has-orange-background-color &, - .has-background.has-yellow-background-color & { - - .is-dark-theme & { - border-color: var(--form--color-text); - } - } - - .has-background.has-gray-background-color &, - .has-background.has-dark-gray-background-color &, - .has-background.has-black-background-color & { - border-color: var(--global--color-white); - } - } - - .wp-block-search__button { - @include button-style(); - box-shadow: none; - margin-left: 0; - background-color: transparent; - color: var(--button--color-text-hover); - - &:hover { - color: var(--button--color-text); - background-color: var(--button--color-background); - } - - &.has-icon { - padding: calc(2 * var(--button--padding-vertical)) calc(0.5 * var(--button--padding-horizontal)); - - svg { - width: 40px; - height: 40px; - } - } - - .has-background.has-gray-background-color &, - .has-background.has-dark-gray-background-color &, - .has-background.has-black-background-color & { - color: var(--global--color-white); - border-color: currentColor; - - &:hover { - color: var(--global--color-white); - background-color: var(--button--color-background); - border-color: var(--global--color-white); - - .is-dark-theme & { - color: var(--button--color-text); - background-color: var(--button--color-background); - } - } - } - - .has-background.has-white-background-color &, - .has-background.has-green-background-color &, - .has-background.has-blue-background-color &, - .has-background.has-purple-background-color &, - .has-background.has-red-background-color &, - .has-background.has-orange-background-color &, - .has-background.has-yellow-background-color & { - - &:hover { - color: var(--global--color-white); - background-color: var(--form--border-color); - border-color: var(--form--border-color); - } - - .is-dark-theme & { - color: var(--form--color-text); - border-color: currentColor; - - &:hover { - color: var(--global--color-white); - background-color: var(--button--color-text); - border-color: var(--button--color-text); - } - } - } - } - - &.wp-block-search__button-inside { - - .wp-block-search__input, - .has-background.has-white-background-color & .wp-block-search__input, - .has-background.has-green-background-color & .wp-block-search__input, - .has-background.has-blue-background-color & .wp-block-search__input, - .has-background.has-purple-background-color & .wp-block-search__input, - .has-background.has-red-background-color & .wp-block-search__input, - .has-background.has-orange-background-color & .wp-block-search__input, - .has-background.has-yellow-background-color & .wp-block-search__input { - border: none; - } - - &.wp-block-search__text-button { - - .wp-block-search__button { - // Match the text button size with the icon button. - padding: var(--button--padding-vertical) var(--button--padding-horizontal); - } - } - - .wp-block-search__button { - - .is-dark-theme & { - color: var(--button--color-text); - border-color: currentColor; - - &:hover { - color: var(--global--color-white); - background-color: var(--button--color-text); - border-color: var(--button--color-text); - } - } - - .has-background.has-gray-background-color &, - .has-background.has-dark-gray-background-color &, - .has-background.has-black-background-color & { - color: var(--button--color-text-hover); - border-color: currentColor; - - &:hover { - color: var(--global--color-white); - background-color: var(--button--color-background); - border-color: var(--button--color-background); - } - - .is-dark-theme & { - color: var(--button--color-text); - border-color: currentColor; - - &:hover { - color: var(--global--color-white); - background-color: var(--button--color-text); - border-color: var(--button--color-text); - } - } - } - } - } -} - -.wp-block[data-align="center"] > * { - text-align: center; -} - -.wp-block[data-align="center"] { - - .wp-block-search__button-only { - - .wp-block-search__inside-wrapper { - justify-content: center; - } - } -} +.wp-block-search { + max-width: var(--responsive--aligndefault-width); + + .wp-block-search__label { + font-size: var(--form--font-size); + font-weight: var(--form--label-weight); + margin-bottom: calc(var(--global--spacing-vertical) / 3); + } + + &.wp-block-search__button-inside .wp-block-search__inside-wrapper, + .wp-block-search__input { + border: var(--form--border-width) solid var(--form--border-color); + border-radius: var(--form--border-radius); + font-family: var(--form--font-family); + font-size: var(--form--font-size); + line-height: var(--form--line-height); + max-width: inherit; + margin-right: calc(-1 * var(--button--border-width)); + padding: var(--form--spacing-unit); + + .is-dark-theme & { + background: var(--global--color-white-90); + } + + .has-background & { + border-color: var(--local--color-primary, var(--global--color-primary)) !important; + } + } + + .wp-block-search__button.wp-block-search__button { + @include button-style(); + box-shadow: none; + margin-left: 0; + + &.has-icon { + padding: 6px calc(0.5 * var(--button--padding-horizontal)); + display: inherit; + + svg { + width: 40px; + height: 40px; + } + } + + &:hover, + &:active { + + .has-background & { + background-color: var(--local--color-background, var(--global--color-background)) !important; + color: var(--local--color-primary, var(--global--color-primary)) !important; + } + + .has-text-color & { + color: var(--local--color-primary, var(--global--color-primary)) !important; + } + } + + // Remove :focus styles in the editor + &:focus { + outline-offset: inherit; + outline: inherit; + } + } + + &.wp-block-search__button-inside { + + .wp-block-search__inside-wrapper { + padding: var(--form--border-width); + } + + .wp-block-search__input { + border: none; + } + + &.wp-block-search__text-button, + &.wp-block-search__icon-button { + + .wp-block-search__button { + // Search button always needs black contrast against white form background + &:hover { + color: var(--global--color-dark-gray); + } + + .is-dark-theme & { + color: var(--global--color-dark-gray); + + &:hover { + background-color: var(--global--color-dark-gray); + color: var(--global--color-white); + } + } + } + } + + &.wp-block-search__text-button .wp-block-search__button { + // Match the text button size with the icon button. + padding: var(--button--padding-vertical) var(--button--padding-horizontal); + } + } +} + +.wp-block[data-align="center"] > * { + text-align: center; +} + +.wp-block[data-align="center"] { + + .wp-block-search__button-only { + + .wp-block-search__inside-wrapper { + justify-content: center; + } + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/search/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/search/_style.scss index 9d2f54f4..46899b5f 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/search/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/search/_style.scss @@ -1,174 +1,116 @@ -.wp-block-search { - max-width: var(--responsive--aligndefault-width); - - &__button-only.aligncenter { - - .wp-block-search__inside-wrapper { - justify-content: center; - } - } - - .wp-block-search__label { - font-size: var(--form--font-size); - font-weight: var(--form--label-weight); - margin-bottom: calc(var(--global--spacing-vertical) / 3); - } - - .wp-block-search__input { - border: var(--form--border-width) solid var(--form--border-color); - border-radius: var(--form--border-radius); - color: var(--form--color-text); - line-height: var(--form--line-height); - max-width: inherit; - margin-right: calc(-1 * var(--button--border-width)); - padding: var(--form--spacing-unit); - - &:focus { - color: var(--form--color-text); - border-color: var(--form--border-color); - } - - .has-background &, - [class*="background-color"] &, - [style*="background-color"] &, - .wp-block-cover[style*="background-image"] & { - border-color: currentColor; - } - - .has-background.has-gray-background-color &, - .has-background.has-dark-gray-background-color &, - .has-background.has-black-background-color & { - border-color: var(--global--color-white); - } - } - - button.wp-block-search__button { - margin-left: 0; - background-color: transparent; - color: var(--button--color-text-hover); - line-height: 1; - - &:hover { - background-color: var(--button--color-background); - color: var(--button--color-text); - } - - &.has-icon { - padding: 6px calc(0.5 * var(--button--padding-horizontal)); - - svg { - width: 40px; - height: 40px; - fill: currentColor; - } - } - - .has-background.has-gray-background-color &, - .has-background.has-dark-gray-background-color &, - .has-background.has-black-background-color & { - color: var(--global--color-white); - border-color: currentColor; - - &:hover { - background-color: var(--button--color-background); - border-color: var(--global--color-white); - color: var(--global--color-white); - - .is-dark-theme & { - color: var(--button--color-text); - } - } - } - - .has-background.has-white-background-color &, - .has-background.has-green-background-color &, - .has-background.has-blue-background-color &, - .has-background.has-purple-background-color &, - .has-background.has-red-background-color &, - .has-background.has-orange-background-color &, - .has-background.has-yellow-background-color & { - border-color: currentColor; - color: currentColor; - - &:hover { - background-color: var(--form--border-color); - border-color: var(--form--border-color); - color: var(--global--color-white); - - .is-dark-theme & { - border-color: var(--button--color-text); - background-color: var(--button--color-text); - color: var(--button--color-background); - } - } - } - } - - &.wp-block-search__button-inside { - - .wp-block-search__inside-wrapper { - background-color: var(--global--color-white); - border: var(--form--border-width) solid var(--form--border-color); - border-radius: var(--form--border-radius); - - .wp-block-search__input { - margin-right: 0; - - &:focus { - outline: 2px dotted var(--form--border-color); - outline-offset: -5px; - - .is-dark-theme & { - outline-color: currentColor; - } - } - } - } - - &.wp-block-search__text-button { - - button.wp-block-search__button { - // Match the text button size with the icon button. - padding: var(--button--padding-vertical) var(--button--padding-horizontal); - } - } - - button.wp-block-search__button { - - .has-background.has-gray-background-color &, - .has-background.has-dark-gray-background-color &, - .has-background.has-black-background-color & { - border-color: var(--button--color-background); - color: var(--button--color-background); - - &:hover { - color: var(--global--color-white); - } - - .is-dark-theme & { - border-color: var(--button--color-text); - color: var(--button--color-text); - - &:hover { - color: var(--global--color-white); - } - } - } - - .is-dark-theme & { - border-color: var(--button--color-text); - color: var(--button--color-text); - - &:hover { - border-color: var(--button--color-text); - background-color: var(--button--color-text); - color: var(--button--color-background); - } - } - } - } -} - -.wp-block-search__button { - box-shadow: none; -} +.wp-block-search { + max-width: var(--responsive--aligndefault-width); + + &__button-only.aligncenter { + + .wp-block-search__inside-wrapper { + justify-content: center; + } + } + + .wp-block-search__label { + font-size: var(--form--font-size); + font-weight: var(--form--label-weight); + margin-bottom: calc(var(--global--spacing-vertical) / 3); + } + + .wp-block-search__input { + border: var(--form--border-width) solid var(--form--border-color); + border-radius: var(--form--border-radius); + color: var(--form--color-text); + line-height: var(--form--line-height); + max-width: inherit; + margin-right: calc(-1 * var(--button--border-width)); + padding: var(--form--spacing-unit); + + &:focus { + color: var(--form--color-text); + border-color: var(--form--border-color); + } + + .has-background & { + border-color: var(--local--color-primary, var(--global--color-primary)) !important; + } + } + + button.wp-block-search__button { + margin-left: 0; + line-height: 1; + + &.has-icon { + padding: 6px calc(0.5 * var(--button--padding-horizontal)); + + svg { + width: 40px; + height: 40px; + fill: currentColor; + } + } + + &:hover, + &:active { + + .has-background & { + background-color: var(--local--color-background, var(--global--color-background)) !important; + color: var(--local--color-primary, var(--global--color-primary)) !important; + } + + .has-text-color & { + color: var(--local--color-primary, var(--global--color-primary)) !important; + } + } + } + + &.wp-block-search__button-inside { + + .wp-block-search__inside-wrapper { + background-color: var(--global--color-white); + border: var(--form--border-width) solid var(--form--border-color); + border-radius: var(--form--border-radius); + padding: var(--form--border-width); + + .has-background & { + border-color: var(--local--color-primary, var(--global--color-primary)) !important; + } + + .wp-block-search__input { + margin-left: 0; + margin-right: 0; + padding-left: var(--form--spacing-unit); + + // Add outline for focus styles to override default + &:focus { + color: var(--form--color-text); + outline-offset: -2px; + outline: 2px dotted var(--form--border-color); + } + } + + button.wp-block-search__button { + padding: var(--button--padding-vertical) var(--button--padding-horizontal); + + // Search button always needs black contrast against white form background + &:hover { + color: var(--global--color-dark-gray); + } + + .is-dark-theme & { + color: var(--global--color-dark-gray); + + &:hover { + background-color: var(--global--color-dark-gray); + color: var(--global--color-white); + } + } + + &.has-icon { + padding: 6px calc(0.5 * var(--button--padding-horizontal)); + } + } + } + } +} + +.wp-block-search__button { + box-shadow: none; +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/separator/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/separator/_editor.scss index f3dbfde1..dc5b2bd9 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/separator/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/separator/_editor.scss @@ -1,48 +1,48 @@ -.wp-block-separator, -hr { - border-bottom: var(--separator--height) solid var(--separator--border-color); - clear: both; - opacity: 1; - - &[style*="text-align:right"], - &[style*="text-align: right"] { - border-right-color: var(--separator--border-color); - } - - &:not(.is-style-dots) { - max-width: var(--responsive--aligndefault-width); - } - - [data-align="full"] > &, - [data-align="wide"] > & { - max-width: inherit; - } - - &.is-style-twentytwentyone-separator-thick { - border-bottom-width: calc(3 * var(--separator--height)); - } - - &.is-style-dots { - border-bottom: none; - - &.has-background, - &.has-text-color { - background-color: transparent !important; - - &:before { - color: currentColor !important; - } - } - - &:before { - color: var(--separator--border-color); - } - } - - .has-background &, - [class*="background-color"] &, - [style*="background-color"] &, - .wp-block-cover[style*="background-image"] & { - border-color: currentColor; - } -} +.wp-block-separator, +hr { + border-bottom: var(--separator--height) solid var(--separator--border-color); + clear: both; + opacity: 1; + + &[style*="text-align:right"], + &[style*="text-align: right"] { + border-right-color: var(--separator--border-color); + } + + &:not(.is-style-dots) { + max-width: var(--responsive--aligndefault-width); + } + + [data-align="full"] > &, + [data-align="wide"] > & { + max-width: inherit; + } + + &.is-style-twentytwentyone-separator-thick { + border-bottom-width: calc(3 * var(--separator--height)); + } + + &.is-style-dots { + border-bottom: none; + + &.has-background, + &.has-text-color { + background-color: transparent !important; + + &:before { + color: currentColor !important; + } + } + + &:before { + color: var(--separator--border-color); + } + } + + .has-background &, + [class*="background-color"] &, + [style*="background-color"] &, + .wp-block-cover[style*="background-image"] & { + border-color: currentColor; + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/separator/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/separator/_style.scss index e40a4f71..c088d3eb 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/separator/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/separator/_style.scss @@ -1,60 +1,60 @@ -hr { - border-style: none; - border-bottom: var(--separator--height) solid var(--separator--border-color); - clear: both; - margin-left: auto; - margin-right: auto; - - &.wp-block-separator { - border-bottom: var(--separator--height) solid var(--separator--border-color); - opacity: 1; - - &:not(.is-style-dots):not(.alignwide) { - max-width: var(--responsive--aligndefault-width); - } - - &:not(.is-style-dots) { - - &.alignwide { - max-width: var(--responsive--alignwide-width); - } - - &.alignfull { - max-width: var(--responsive--alignfull-width); - } - } - - /** - * Block Options - */ - &.is-style-twentytwentyone-separator-thick { - border-bottom-width: calc(3 * var(--separator--height)); - } - - &.is-style-dots { - - &.has-background, - &.has-text-color { - background-color: transparent !important; - - &:before { - color: currentColor !important; - } - } - - &:before { - color: var(--separator--border-color); - font-size: var(--global--font-size-xl); - letter-spacing: var(--global--font-size-sm); - padding-left: var(--global--font-size-sm); - } - } - - .has-background &, - [class*="background-color"] &, - [style*="background-color"] &, - .wp-block-cover[style*="background-image"] & { - border-color: currentColor; - } - } -} +hr { + border-style: none; + border-bottom: var(--separator--height) solid var(--separator--border-color); + clear: both; + margin-left: auto; + margin-right: auto; + + &.wp-block-separator { + border-bottom: var(--separator--height) solid var(--separator--border-color); + opacity: 1; + + &:not(.is-style-dots):not(.alignwide) { + max-width: var(--responsive--aligndefault-width); + } + + &:not(.is-style-dots) { + + &.alignwide { + max-width: var(--responsive--alignwide-width); + } + + &.alignfull { + max-width: var(--responsive--alignfull-width); + } + } + + /** + * Block Options + */ + &.is-style-twentytwentyone-separator-thick { + border-bottom-width: calc(3 * var(--separator--height)); + } + + &.is-style-dots { + + &.has-background, + &.has-text-color { + background-color: transparent !important; + + &:before { + color: currentColor !important; + } + } + + &:before { + color: var(--separator--border-color); + font-size: var(--global--font-size-xl); + letter-spacing: var(--global--font-size-sm); + padding-left: var(--global--font-size-sm); + } + } + + .has-background &, + [class*="background-color"] &, + [style*="background-color"] &, + .wp-block-cover[style*="background-image"] & { + border-color: currentColor; + } + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/social-icons/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/social-icons/_editor.scss index 3bd25832..e2584601 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/social-icons/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/social-icons/_editor.scss @@ -1,20 +1,20 @@ -.wp-block-social-links { - - // Social icons are horizontal, so they don't need vertical spacing. - [data-block] { - margin-top: 0; - margin-bottom: 0; - } - - &.is-style-twentytwentyone-social-icons-color { - - button { - color: var(--global--color-primary); - } - - .wp-social-link { - background: none; - } - } - -} +.wp-block-social-links { + + // Social icons are horizontal, so they don't need vertical spacing. + [data-block] { + margin-top: 0; + margin-bottom: 0; + } + + &.is-style-twentytwentyone-social-icons-color { + + button { + color: var(--global--color-primary); + } + + .wp-social-link { + background: none; + } + } + +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/social-icons/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/social-icons/_style.scss index 765a701f..f63b2637 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/social-icons/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/social-icons/_style.scss @@ -1,18 +1,19 @@ -.wp-block-social-links { - - a:focus { - color: var(--global--color-primary); - } - - &.is-style-twentytwentyone-social-icons-color { - - a { - color: var(--global--color-primary); - } - - .wp-social-link { - background: none; - } - - } -} +.wp-block-social-links { + + a:focus { + color: var(--global--color-primary); + } + + &.is-style-twentytwentyone-social-icons-color { + + a { + color: var(--global--color-primary); + } + + .wp-social-link, + &.has-icon-background-color.has-icon-background-color .wp-social-link { + background: none; + } + + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/spacer/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/spacer/_style.scss index 83300f60..7f9c4e19 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/spacer/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/spacer/_style.scss @@ -1,13 +1,13 @@ -.wp-block-spacer { - display: block; - // Remove vertical margins - margin-bottom: 0 !important; - margin-top: 0 !important; - - @include media(mobile-only) { - - &[style] { - height: var(--global--spacing-unit) !important; - } - } -} +.wp-block-spacer { + display: block; + // Remove vertical margins + margin-bottom: 0 !important; + margin-top: 0 !important; + + @include media(mobile-only) { + + &[style] { + height: var(--global--spacing-unit) !important; + } + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/table/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/table/_editor.scss index 20136f2d..a0c7cfcd 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/table/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/table/_editor.scss @@ -1,89 +1,89 @@ -table, -.wp-block-table { - - thead, - tfoot { - text-align: center; - } - - th { - font-family: var(--heading--font-family); - } - - td, - th { - padding: calc(0.5 * var(--global--spacing-unit)); - } - - &.is-style-regular .has-background, - &.is-style-stripes .has-background, - &.is-style-stripes .has-background thead tr, - &.is-style-stripes .has-background tfoot tr, - &.is-style-stripes .has-background tbody tr { - color: var(--table--has-background-text-color); - } - - &.is-style-stripes { - border-color: var(--table--stripes-border-color); - - th, - td { - border-width: 0; - } - - tbody tr:nth-child(odd) { - background-color: var(--table--stripes-background-color); - } - - .has-background tbody tr:nth-child(odd) { - background-color: var(--global--color-white-90); - } - } -} - -table.wp-calendar-table { - - td, - th { - background: transparent; - border: 0; - text-align: center; - line-height: 2; - vertical-align: middle; - } - - th { - font-weight: bold; - } - - thead, - tbody { - color: currentColor; - border: 1px solid; - } - - caption { - font-weight: bold; - text-align: left; - margin-bottom: var(--global--spacing-unit); - color: currentColor; - } -} - -.wp-calendar-nav { - text-align: left; - margin-top: calc(var(--global--spacing-unit) / 2); - - svg { - height: 1em; - vertical-align: middle; - - path { - fill: currentColor; - } - } - - .wp-calendar-nav-next { - float: right; - } -} +table, +.wp-block-table { + + thead, + tfoot { + text-align: center; + } + + th { + font-family: var(--heading--font-family); + } + + td, + th { + padding: calc(0.5 * var(--global--spacing-unit)); + } + + &.is-style-regular .has-background, + &.is-style-stripes .has-background, + &.is-style-stripes .has-background thead tr, + &.is-style-stripes .has-background tfoot tr, + &.is-style-stripes .has-background tbody tr { + color: var(--table--has-background-text-color); + } + + &.is-style-stripes { + border-color: var(--table--stripes-border-color); + + th, + td { + border-width: 0; + } + + tbody tr:nth-child(odd) { + background-color: var(--table--stripes-background-color); + } + + .has-background tbody tr:nth-child(odd) { + background-color: var(--global--color-white-90); + } + } +} + +table.wp-calendar-table { + + td, + th { + background: transparent; + border: 0; + text-align: center; + line-height: 2; + vertical-align: middle; + } + + th { + font-weight: bold; + } + + thead, + tbody { + color: currentColor; + border: 1px solid; + } + + caption { + font-weight: bold; + text-align: left; + margin-bottom: var(--global--spacing-unit); + color: currentColor; + } +} + +.wp-calendar-nav { + text-align: left; + margin-top: calc(var(--global--spacing-unit) / 2); + + svg { + height: 1em; + vertical-align: middle; + + path { + fill: currentColor; + } + } + + .wp-calendar-nav-next { + float: right; + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/table/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/table/_style.scss index 18f1936b..04173970 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/table/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/table/_style.scss @@ -1,99 +1,99 @@ -table, -.wp-block-table { - width: 100%; - min-width: 240px; - border-collapse: collapse; - - thead, - tfoot { - text-align: center; - } - - th { - font-family: var(--heading--font-family); - } - - td, - th { - padding: calc(0.5 * var(--global--spacing-unit)); - border: 1px solid; - } - - figcaption { - color: var(--global--color-primary); - font-size: var(--global--font-size-xs); - } - - &.is-style-regular .has-background, - &.is-style-stripes .has-background, - &.is-style-stripes .has-background thead tr, - &.is-style-stripes .has-background tfoot tr, - &.is-style-stripes .has-background tbody tr { - color: var(--table--has-background-text-color); - } - - &.is-style-stripes { - border-color: var(--table--stripes-border-color); - - th, - td { - border-width: 0; - } - - tbody tr:nth-child(odd) { - background-color: var(--table--stripes-background-color); - } - - .has-background tbody tr:nth-child(odd) { - background-color: var(--global--color-white-90); - } - } -} - -table.wp-calendar-table { - - td, - th { - background: transparent; - border: 0; - text-align: center; - line-height: 2; - vertical-align: middle; - word-break: normal; - } - - th { - font-weight: bold; - } - - thead, - tbody { - color: currentColor; - border: 1px solid; - } - - caption { - font-weight: bold; - text-align: left; - margin-bottom: var(--global--spacing-unit); - color: currentColor; - } -} - -.wp-calendar-nav { - text-align: left; - margin-top: calc(var(--global--spacing-unit) / 2); - - svg { - height: 1em; - vertical-align: middle; - - path { - fill: currentColor; - } - } - - .wp-calendar-nav-next { - float: right; - } -} +table, +.wp-block-table { + width: 100%; + min-width: 240px; + border-collapse: collapse; + + thead, + tfoot { + text-align: center; + } + + th { + font-family: var(--heading--font-family); + } + + td, + th { + padding: calc(0.5 * var(--global--spacing-unit)); + border: 1px solid; + } + + figcaption { + color: var(--global--color-primary); + font-size: var(--global--font-size-xs); + } + + &.is-style-regular .has-background, + &.is-style-stripes .has-background, + &.is-style-stripes .has-background thead tr, + &.is-style-stripes .has-background tfoot tr, + &.is-style-stripes .has-background tbody tr { + color: var(--table--has-background-text-color); + } + + &.is-style-stripes { + border-color: var(--table--stripes-border-color); + + th, + td { + border-width: 0; + } + + tbody tr:nth-child(odd) { + background-color: var(--table--stripes-background-color); + } + + .has-background tbody tr:nth-child(odd) { + background-color: var(--global--color-white-90); + } + } +} + +table.wp-calendar-table { + + td, + th { + background: transparent; + border: 0; + text-align: center; + line-height: 2; + vertical-align: middle; + word-break: normal; + } + + th { + font-weight: bold; + } + + thead, + tbody { + color: currentColor; + border: 1px solid; + } + + caption { + font-weight: bold; + text-align: left; + margin-bottom: var(--global--spacing-unit); + color: currentColor; + } +} + +.wp-calendar-nav { + text-align: left; + margin-top: calc(var(--global--spacing-unit) / 2); + + svg { + height: 1em; + vertical-align: middle; + + path { + fill: currentColor; + } + } + + .wp-calendar-nav-next { + float: right; + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/tag-clould/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/tag-clould/_editor.scss index 4dbec910..5efd1215 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/tag-clould/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/tag-clould/_editor.scss @@ -1,6 +1,6 @@ -.wp-block-tag-cloud { - - &.aligncenter { - text-align: center; - } -} +.wp-block-tag-cloud { + + &.aligncenter { + text-align: center; + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/tag-clould/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/tag-clould/_style.scss index 77096a4c..dcf88acd 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/tag-clould/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/tag-clould/_style.scss @@ -1,7 +1,7 @@ -.wp-block-tag-cloud { - - &.alignfull { - padding-left: var(--global--spacing-unit); - padding-right: var(--global--spacing-unit); - } -} +.wp-block-tag-cloud { + + &.alignfull { + padding-left: var(--global--spacing-unit); + padding-right: var(--global--spacing-unit); + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/utilities/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/utilities/_editor.scss index 98b96c94..ca1b4308 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/utilities/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/utilities/_editor.scss @@ -1,140 +1,140 @@ -/** -* Editor Post Title -* - Needs a special styles -*/ - -// Post title style -.wp-block.editor-post-title__block { - border-bottom: 3px solid var(--global--color-border); - padding-bottom: calc(2 * var(--global--spacing-vertical)); - margin-bottom: calc(3 * var(--global--spacing-vertical)); - max-width: var(--responsive--alignwide-width); - - .editor-post-title__input { - color: var(--global--color-secondary); - font-family: var(--heading--font-family); - font-size: var(--global--font-size-page-title); - font-weight: var(--heading--font-weight-page-title); - line-height: var(--heading--line-height-h1); - } -} - -// Editor UI font styles -.wp-block.block-editor-default-block-appender > textarea { - font-family: var(--global--font-secondary); - font-size: var(--global--font-size-md); -} - -// Gutenberg text color options -.has-primary-color[class] { - color: var(--global--color-primary); -} - -.has-secondary-color[class] { - color: var(--global--color-secondary); -} - -// Gutenberg background-color options -.has-background { - - a, - p, - h1, - h2, - h3, - h4, - h5, - h6 { - color: currentColor; - } -} - -.has-primary-background-color[class] { - background-color: var(--global--color-primary); - color: var(--global--color-background); -} - -.has-secondary-background-color[class] { - background-color: var(--global--color-secondary); - color: var(--global--color-background); -} - -.has-white-background-color[class] { - background-color: var(--global--color-white); - color: var(--global--color-secondary); -} - -.has-black-background-color[class] { - background-color: var(--global--color-black); - color: var(--global--color-primary); -} - -// Spacing Overrides -[data-block] { - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); -} - -// Block Alignments -.wp-block { - - // Gutenberg injects a rule that limits the max width of .wp-block to 580px - // This line overrides it to use the responsive spacing rules for default width content - max-width: var(--responsive--aligndefault-width); - - // Use the theme's max-width for wide alignment. - &[data-align="wide"], - &.alignwide { - max-width: var(--responsive--alignwide-width); - } - - &[data-align="full"], - &.alignfull { - max-width: none; - } -} - -.alignleft { - margin: 0; - margin-right: var(--global--spacing-horizontal); -} - -.alignright { - margin: 0; - margin-left: var(--global--spacing-horizontal); -} - -// Drop cap -.has-drop-cap:not(:focus)::first-letter { - font-family: var(--heading--font-family); - font-weight: var(--heading--font-weight); - line-height: 0.66; - text-transform: uppercase; - font-style: normal; - float: left; - margin: 0.1em 0.1em 0 0; - font-size: calc(1.2 * var(--heading--font-size-h1)); -} - -@media only screen and (min-width: 482px) { - - .wp-block[data-align="left"] > * { - max-width: 290px; - margin-right: var(--global--spacing-horizontal); - } - - .wp-block[data-align="right"] > * { - max-width: 290px; - margin-left: var(--global--spacing-horizontal); - } -} - -// Remove the border of blockquotes inside the classic block. -.wp-block-freeform.block-library-rich-text__tinymce blockquote { - border: none; -} - -// Adjust the position of the quote symbol for blockquotes inside the classic block. -.wp-block-freeform.block-library-rich-text__tinymce blockquote:before { - left: 5px; -} +/** +* Editor Post Title +* - Needs a special styles +*/ + +// Post title style +.wp-block.editor-post-title__block { + border-bottom: 3px solid var(--global--color-border); + padding-bottom: calc(2 * var(--global--spacing-vertical)); + margin-bottom: calc(3 * var(--global--spacing-vertical)); + max-width: var(--responsive--alignwide-width); + + .editor-post-title__input { + color: var(--global--color-secondary); + font-family: var(--heading--font-family); + font-size: var(--global--font-size-page-title); + font-weight: var(--heading--font-weight-page-title); + line-height: var(--heading--line-height-h1); + } +} + +// Editor UI font styles +.wp-block.block-editor-default-block-appender > textarea { + font-family: var(--global--font-secondary); + font-size: var(--global--font-size-md); +} + +// Gutenberg text color options +.has-primary-color[class] { + color: var(--global--color-primary); +} + +.has-secondary-color[class] { + color: var(--global--color-secondary); +} + +// Gutenberg background-color options +.has-background { + + a, + p, + h1, + h2, + h3, + h4, + h5, + h6 { + color: currentColor; + } +} + +.has-primary-background-color[class] { + background-color: var(--global--color-primary); + color: var(--global--color-background); +} + +.has-secondary-background-color[class] { + background-color: var(--global--color-secondary); + color: var(--global--color-background); +} + +.has-white-background-color[class] { + background-color: var(--global--color-white); + color: var(--global--color-secondary); +} + +.has-black-background-color[class] { + background-color: var(--global--color-black); + color: var(--global--color-primary); +} + +// Spacing Overrides +[data-block] { + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); +} + +// Block Alignments +.wp-block { + + // Gutenberg injects a rule that limits the max width of .wp-block to 580px + // This line overrides it to use the responsive spacing rules for default width content + max-width: var(--responsive--aligndefault-width); + + // Use the theme's max-width for wide alignment. + &[data-align="wide"], + &.alignwide { + max-width: var(--responsive--alignwide-width); + } + + &[data-align="full"], + &.alignfull { + max-width: none; + } +} + +.alignleft { + margin: 0; + margin-right: var(--global--spacing-horizontal); +} + +.alignright { + margin: 0; + margin-left: var(--global--spacing-horizontal); +} + +// Drop cap +.has-drop-cap:not(:focus)::first-letter { + font-family: var(--heading--font-family); + font-weight: var(--heading--font-weight); + line-height: 0.66; + text-transform: uppercase; + font-style: normal; + float: left; + margin: 0.1em 0.1em 0 0; + font-size: calc(1.2 * var(--heading--font-size-h1)); +} + +@media only screen and (min-width: 482px) { + + .wp-block[data-align="left"] > * { + max-width: 290px; + margin-right: var(--global--spacing-horizontal); + } + + .wp-block[data-align="right"] > * { + max-width: 290px; + margin-left: var(--global--spacing-horizontal); + } +} + +// Remove the border of blockquotes inside the classic block. +.wp-block-freeform.block-library-rich-text__tinymce blockquote { + border: none; +} + +// Adjust the position of the quote symbol for blockquotes inside the classic block. +.wp-block-freeform.block-library-rich-text__tinymce blockquote:before { + left: 5px; +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/utilities/_font-sizes.scss b/themes/twentytwentyone/assets/sass/05-blocks/utilities/_font-sizes.scss index ed657999..26f9739b 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/utilities/_font-sizes.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/utilities/_font-sizes.scss @@ -1,53 +1,53 @@ -// Gutenberg Font-size utility classes -:root { - - .is-extra-small-text, - .has-extra-small-font-size { - font-size: var(--global--font-size-xs); - } - - .is-small-text, - .has-small-font-size { - font-size: var(--global--font-size-sm); - } - - .is-regular-text, - .has-regular-font-size, - .is-normal-font-size, - .has-normal-font-size, - .has-medium-font-size { - font-size: var(--global--font-size-base); - } - - .is-large-text, - .has-large-font-size { - font-size: var(--global--font-size-lg); - line-height: var(--global--line-height-heading); - } - - .is-larger-text, - .has-larger-font-size, - .is-extra-large-text, - .has-extra-large-font-size { - font-size: var(--global--font-size-xl); - line-height: var(--global--line-height-heading); - } - - .is-huge-text, - .has-huge-font-size { - font-size: var(--global--font-size-xxl); - line-height: var(--global--line-height-heading); - - // This size is meant to mimic the page titles, so the font weight is reduced to match. - font-weight: var(--heading--font-weight-page-title); - } - - .is-gigantic-text, - .has-gigantic-font-size { - font-size: var(--global--font-size-xxxl); - line-height: var(--global--line-height-heading); - - // This size is meant to mimic the page titles, so the font weight is reduced to match. - font-weight: var(--heading--font-weight-page-title); - } -} +// Gutenberg Font-size utility classes +:root { + + .is-extra-small-text, + .has-extra-small-font-size { + font-size: var(--global--font-size-xs); + } + + .is-small-text, + .has-small-font-size { + font-size: var(--global--font-size-sm); + } + + .is-regular-text, + .has-regular-font-size, + .is-normal-font-size, + .has-normal-font-size, + .has-medium-font-size { + font-size: var(--global--font-size-base); + } + + .is-large-text, + .has-large-font-size { + font-size: var(--global--font-size-lg); + line-height: var(--global--line-height-heading); + } + + .is-larger-text, + .has-larger-font-size, + .is-extra-large-text, + .has-extra-large-font-size { + font-size: var(--global--font-size-xl); + line-height: var(--global--line-height-heading); + } + + .is-huge-text, + .has-huge-font-size { + font-size: var(--global--font-size-xxl); + line-height: var(--global--line-height-heading); + + // This size is meant to mimic the page titles, so the font weight is reduced to match. + font-weight: var(--heading--font-weight-page-title); + } + + .is-gigantic-text, + .has-gigantic-font-size { + font-size: var(--global--font-size-xxxl); + line-height: var(--global--line-height-heading); + + // This size is meant to mimic the page titles, so the font weight is reduced to match. + font-weight: var(--heading--font-weight-page-title); + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/utilities/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/utilities/_style.scss index 6ee561cc..07d06d2e 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/utilities/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/utilities/_style.scss @@ -1,160 +1,160 @@ -/* Block Alignments */ - -/** - * These selectors set the default max width for content appearing inside a post or page. - */ -.entry-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce), -*[class*="inner-container"] > *:not(.entry-content):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce) { - @extend %responsive-aligndefault-width; -} - -/** - * .alignleft - */ -.alignleft { - - /*rtl:ignore*/ - text-align: left; - - margin-top: 0; -} - -// Targeting the .entry-content class is necessary to ensure these styles -// only apply when the block isn't nested. -.entry-content > .alignleft { - max-width: var(--responsive--aligndefault-width); - @extend %responsive-alignleft; -} - -@include media(mobile) { - - .alignleft { - - /*rtl:ignore*/ - float: left; - - /*rtl:ignore*/ - margin-right: var(--global--spacing-horizontal); - margin-bottom: var(--global--spacing-vertical); - } - - .entry-content > .alignleft { - max-width: calc(50% - var(--responsive--alignleft-margin)); - } -} - -/** - * .aligncenter - */ -.aligncenter { - clear: both; - display: block; - float: none; - margin-right: auto; - margin-left: auto; - text-align: center; -} - -/** - * .alignright - */ -.alignright { - - margin-top: 0; - margin-bottom: var(--global--spacing-vertical); -} - -// Targeting the .entry-content class is necessary to ensure these styles -// only apply when the block isn't nested. -.entry-content > .alignright { - max-width: var(--responsive--aligndefault-width); - @extend %responsive-alignright; -} - -@include media(mobile) { - - .alignright { - - /*rtl:ignore*/ - float: right; - - /*rtl:ignore*/ - margin-left: var(--global--spacing-horizontal); - } - - .entry-content > .alignright { - max-width: calc(50% - var(--responsive--alignright-margin)); - } -} - -// Make sure siblings of floated elements are top-aligned when nested -[class*="inner-container"] > .alignleft + *, -[class*="inner-container"] > .alignright + * { - margin-top: 0; -} - -/** - * .alignwide - */ -.alignwide { - clear: both; - @extend %responsive-alignwide-width; -} - -.alignwide [class*="inner-container"] > .alignwide { - @extend %responsive-alignwide-width-nested; -} - -/** - * .alignfull - */ -.alignfull { - clear: both; - @extend %responsive-alignfull-width-mobile; - @extend %responsive-alignfull-width; -} - -.alignfull [class*="inner-container"] > .alignwide { - @extend %responsive-alignwide-width-nested; -} - -// Content alignment -.has-left-content { - justify-content: flex-start; -} - -.has-right-content { - justify-content: flex-end; -} - -// Parallax -.has-parallax { - background-attachment: fixed; -} - -// Drop caps -.has-drop-cap:not(:focus)::first-letter { - font-family: var(--heading--font-family); - font-weight: var(--heading--font-weight); - line-height: 0.66; - text-transform: uppercase; - font-style: normal; - float: left; - margin: 0.1em 0.1em 0 0; - font-size: calc(1.2 * var(--heading--font-size-h1)); -} - -.has-drop-cap:not(:focus)::after { - content: ""; - display: table; - clear: both; - padding-top: 14px; -} - -.desktop-only { - display: none; - - @include media(mobile) { - display: block; - } -} +/* Block Alignments */ + +/** + * These selectors set the default max width for content appearing inside a post or page. + */ +.entry-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce), +*[class*="inner-container"] > *:not(.entry-content):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce) { + @extend %responsive-aligndefault-width; +} + +/** + * .alignleft + */ +.alignleft { + + /*rtl:ignore*/ + text-align: left; + + margin-top: 0; +} + +// Targeting the .entry-content class is necessary to ensure these styles +// only apply when the block isn't nested. +.entry-content > .alignleft { + max-width: var(--responsive--aligndefault-width); + @extend %responsive-alignleft; +} + +@include media(mobile) { + + .alignleft { + + /*rtl:ignore*/ + float: left; + + /*rtl:ignore*/ + margin-right: var(--global--spacing-horizontal); + margin-bottom: var(--global--spacing-vertical); + } + + .entry-content > .alignleft { + max-width: calc(50% - var(--responsive--alignleft-margin)); + } +} + +/** + * .aligncenter + */ +.aligncenter { + clear: both; + display: block; + float: none; + margin-right: auto; + margin-left: auto; + text-align: center; +} + +/** + * .alignright + */ +.alignright { + + margin-top: 0; + margin-bottom: var(--global--spacing-vertical); +} + +// Targeting the .entry-content class is necessary to ensure these styles +// only apply when the block isn't nested. +.entry-content > .alignright { + max-width: var(--responsive--aligndefault-width); + @extend %responsive-alignright; +} + +@include media(mobile) { + + .alignright { + + /*rtl:ignore*/ + float: right; + + /*rtl:ignore*/ + margin-left: var(--global--spacing-horizontal); + } + + .entry-content > .alignright { + max-width: calc(50% - var(--responsive--alignright-margin)); + } +} + +// Make sure siblings of floated elements are top-aligned when nested +[class*="inner-container"] > .alignleft + *, +[class*="inner-container"] > .alignright + * { + margin-top: 0; +} + +/** + * .alignwide + */ +.alignwide { + clear: both; + @extend %responsive-alignwide-width; +} + +.alignwide [class*="inner-container"] > .alignwide { + @extend %responsive-alignwide-width-nested; +} + +/** + * .alignfull + */ +.alignfull { + clear: both; + @extend %responsive-alignfull-width-mobile; + @extend %responsive-alignfull-width; +} + +.alignfull [class*="inner-container"] > .alignwide { + @extend %responsive-alignwide-width-nested; +} + +// Content alignment +.has-left-content { + justify-content: flex-start; +} + +.has-right-content { + justify-content: flex-end; +} + +// Parallax +.has-parallax { + background-attachment: fixed; +} + +// Drop caps +.has-drop-cap:not(:focus)::first-letter { + font-family: var(--heading--font-family); + font-weight: var(--heading--font-weight); + line-height: 0.66; + text-transform: uppercase; + font-style: normal; + float: left; + margin: 0.1em 0.1em 0 0; + font-size: calc(1.2 * var(--heading--font-size-h1)); +} + +.has-drop-cap:not(:focus)::after { + content: ""; + display: table; + clear: both; + padding-top: 14px; +} + +.desktop-only { + display: none; + + @include media(mobile) { + display: block; + } +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/verse/_editor.scss b/themes/twentytwentyone/assets/sass/05-blocks/verse/_editor.scss index c7b6a453..fa449963 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/verse/_editor.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/verse/_editor.scss @@ -1,4 +1,4 @@ -pre.wp-block-verse { - padding: 0; - color: currentColor; -} +pre.wp-block-verse { + padding: 0; + color: currentColor; +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/verse/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/verse/_style.scss index 73a2b767..264173bf 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/verse/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/verse/_style.scss @@ -1,3 +1,3 @@ -.wp-block-verse { - font-family: var(--entry-content--font-family); -} +.wp-block-verse { + font-family: var(--entry-content--font-family); +} diff --git a/themes/twentytwentyone/assets/sass/05-blocks/video/_style.scss b/themes/twentytwentyone/assets/sass/05-blocks/video/_style.scss index f0236b28..6a4a3897 100644 --- a/themes/twentytwentyone/assets/sass/05-blocks/video/_style.scss +++ b/themes/twentytwentyone/assets/sass/05-blocks/video/_style.scss @@ -1,16 +1,16 @@ -.wp-block-video { - - figcaption { - color: var(--global--color-primary); - font-size: var(--global--font-size-xs); - margin-top: calc(0.5 * var(--global--spacing-unit)); - margin-bottom: var(--global--spacing-unit); - text-align: center; - } -} - -* > figure > video { - max-width: unset; - width: 100%; - vertical-align: middle; -} +.wp-block-video { + + figcaption { + color: var(--global--color-primary); + font-size: var(--global--font-size-xs); + margin-top: calc(0.5 * var(--global--spacing-unit)); + margin-bottom: var(--global--spacing-unit); + text-align: center; + } +} + +* > figure > video { + max-width: unset; + width: 100%; + vertical-align: middle; +} diff --git a/themes/twentytwentyone/assets/sass/06-components/404.scss b/themes/twentytwentyone/assets/sass/06-components/404.scss index ba70ac77..d8309eb7 100644 --- a/themes/twentytwentyone/assets/sass/06-components/404.scss +++ b/themes/twentytwentyone/assets/sass/06-components/404.scss @@ -1,4 +1,4 @@ -.error404 main p { - font-size: var(--global--font-size-lg); - margin-bottom: calc(var(--global--spacing-vertical) * 1.6666666667); -} +.error404 main p { + font-size: var(--global--font-size-lg); + margin-bottom: calc(var(--global--spacing-vertical) * 1.6666666667); +} diff --git a/themes/twentytwentyone/assets/sass/06-components/archives.scss b/themes/twentytwentyone/assets/sass/06-components/archives.scss index e77c1fd0..d1b1a522 100644 --- a/themes/twentytwentyone/assets/sass/06-components/archives.scss +++ b/themes/twentytwentyone/assets/sass/06-components/archives.scss @@ -1,68 +1,68 @@ -.page-title { - font-size: var(--global--font-size-page-title); -} - -h1.page-title, -h2.page-title { - font-weight: var(--heading--font-weight-page-title); -} - -h1.page-title { - line-height: var(--heading--line-height-h1); -} - -.page-header { - border-bottom: 3px solid var(--global--color-border); - padding-bottom: calc(2 * var(--global--spacing-vertical)); -} - -.archive, -.search, -.blog { - - .content-area { - - .format-aside, - .format-status, - .format-link { - - .entry-content { - font-size: var(--global--font-size-lg); - } - } - - } - - .format-image, - .format-gallery, - .format-video { - - .entry-content { - margin-top: calc(2 * var(--global--spacing-vertical)); - } - } - - .entry-footer { - - .cat-links, - .tags-links { - display: block; - } - } - - &.logged-in { - - .entry-footer { - - .posted-on { - margin-right: calc(0.5 * var(--global--spacing-unit)); - } - } - } -} - -.archive-description { - margin-top: var(--global--spacing-vertical); - font-size: var(--global--font-size-xl); - line-height: var(--global--line-height-heading); -} +.page-title { + font-size: var(--global--font-size-page-title); +} + +h1.page-title, +h2.page-title { + font-weight: var(--heading--font-weight-page-title); +} + +h1.page-title { + line-height: var(--heading--line-height-h1); +} + +.page-header { + border-bottom: 3px solid var(--global--color-border); + padding-bottom: calc(2 * var(--global--spacing-vertical)); +} + +.archive, +.search, +.blog { + + .content-area { + + .format-aside, + .format-status, + .format-link { + + .entry-content { + font-size: var(--global--font-size-lg); + } + } + + } + + .format-image, + .format-gallery, + .format-video { + + .entry-content { + margin-top: calc(2 * var(--global--spacing-vertical)); + } + } + + .entry-footer { + + .cat-links, + .tags-links { + display: block; + } + } + + &.logged-in { + + .entry-footer { + + .posted-on { + margin-right: calc(0.5 * var(--global--spacing-unit)); + } + } + } +} + +.archive-description { + margin-top: var(--global--spacing-vertical); + font-size: var(--global--font-size-xl); + line-height: var(--global--line-height-heading); +} diff --git a/themes/twentytwentyone/assets/sass/06-components/comments.scss b/themes/twentytwentyone/assets/sass/06-components/comments.scss index 09a696c1..ae0e6887 100644 --- a/themes/twentytwentyone/assets/sass/06-components/comments.scss +++ b/themes/twentytwentyone/assets/sass/06-components/comments.scss @@ -1,292 +1,292 @@ -/** - * Comments Wrapper - */ -.comments-area { - - > * { - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } - } - - &.show-avatars { - - .avatar { - border-radius: 50%; - position: absolute; - top: 10px; - } - - .fn { - display: inline-block; - padding-left: 85px; - } - - .comment-metadata { - padding: 8px 0 9px 85px; - } - - } -} - -/** - * Comment Title - */ - -.comments-title, -.comment-reply-title { - font-size: var(--heading--font-size-h2); - letter-spacing: var(--heading--letter-spacing-h2); -} - -.comment-reply-title { - display: flex; - justify-content: space-between; - - small { - - a { - font-family: var(--global--font-secondary); - font-size: var(--global--font-size-xs); - font-style: normal; - font-weight: normal; - letter-spacing: normal; - } - } -} - -/* Nested comment reply title*/ -.comment .comment-respond .comment-reply-title { - font-size: var(--global--font-size-lg); -} - -/** - * Comment Lists - */ -.comment-list { - padding-left: 0; - list-style: none; - - > li { - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); - } - -} - -.comment-list .children { - list-style: none; - padding-left: 0; - - > li { - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); - } - -} - -.comment-list .depth-2, -.comment-list .depth-3 { - @include media(mobile) { - padding-left: calc(4 * var(--global--spacing-horizontal)); - } -} - -/** - * Comment Meta - */ -.comment-meta { - - .comment-author { - line-height: var(--global--line-height-heading); - margin-bottom: calc(0.25 * var(--global--spacing-unit)); - - @include media(mobile) { - margin-bottom: 0; - padding-right: 0; - } - - .fn { - font-family: var(--global--font-secondary); - font-weight: normal; - font-size: var(--global--font-size-lg); - hyphens: auto; - word-wrap: break-word; - word-break: break-word; - } - - } - - .comment-metadata { - color: var(--global--color-primary); - font-size: var(--global--font-size-xs); - padding: 8px 0 9px 0; - - .edit-link { - margin-left: var(--global--spacing-horizontal); - } - - } - - @include media(mobile) { - margin-right: inherit; - - .comment-author { - max-width: inherit; - } - } -} - -.reply { - font-size: var(--global--font-size-sm); - line-height: var(--global--line-height-heading); -} - -.bypostauthor { - display: block; -} - -.says { - display: none; -} - -.pingback .url, -.trackback .url { - font-family: var(--global--font-primary); -} - -// Comment body -.comment-body { - position: relative; - margin-bottom: calc(1.7 * var(--global--spacing-vertical)); - - > * { - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); - } - - .reply { - margin: 0; - } -} - -.comment-content a { - word-wrap: break-word; -} - -// Pingbacks & Trackbacks -.pingback .comment-body, -.trackback .comment-body { - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); -} - -.comment-respond { - margin-top: var(--global--spacing-vertical); -} - -.comment-respond > * { - margin-top: var(--global--spacing-unit); - margin-bottom: var(--global--spacing-unit); - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - - &.comment-form { - margin-bottom: var(--global--spacing-vertical); - } - } -} - -.comment-author { - padding-top: 3px; - - .url { - color: currentColor; - } -} - -.comment-form { - display: flex; - flex-wrap: wrap; - - > * { - flex-basis: 100%; - } - - .comment-notes { - font-size: var(--global--font-size-sm); - } - - .comment-form-url, - .comment-form-comment { - width: 100%; - } - - .comment-form-author, - .comment-form-email { - flex-basis: 0; - flex-grow: 1; - - @include media(mobile-only) { - flex-basis: 100%; - } - } - - .comment-form-cookies-consent > label, - .comment-notes { - font-size: var(--global--font-size-xs); - font-weight: normal; - } -} - -.comment-form > p { - margin-bottom: var(--global--spacing-unit); - - &:first-of-type { - margin-top: 0; - } - - &:last-of-type { - margin-bottom: 0; - } - - label, - input[type="email"], - input[type="text"], - input[type="url"], - textarea { - display: block; - font-size: var(--global--font-size-sm); - margin-bottom: calc(.5 * var(--global--spacing-unit)); - width: 100%; - font-weight: var(--form--label-weight); - } - - &.comment-form-cookies-consent { - display: flex; - } - - @include media(mobile) { - - &.comment-form-author { - margin-right: calc(1.5 * var(--global--spacing-horizontal)); - } - - &.comment-notes, - &.logged-in-as { - display: block; - } - } -} +/** + * Comments Wrapper + */ +.comments-area { + + > * { + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } + } + + &.show-avatars { + + .avatar { + border-radius: 50%; + position: absolute; + top: 10px; + } + + .fn { + display: inline-block; + padding-left: 85px; + } + + .comment-metadata { + padding: 8px 0 9px 85px; + } + + } +} + +/** + * Comment Title + */ + +.comments-title, +.comment-reply-title { + font-size: var(--heading--font-size-h2); + letter-spacing: var(--heading--letter-spacing-h2); +} + +.comment-reply-title { + display: flex; + justify-content: space-between; + + small { + + a { + font-family: var(--global--font-secondary); + font-size: var(--global--font-size-xs); + font-style: normal; + font-weight: normal; + letter-spacing: normal; + } + } +} + +/* Nested comment reply title*/ +.comment .comment-respond .comment-reply-title { + font-size: var(--global--font-size-lg); +} + +/** + * Comment Lists + */ +.comment-list { + padding-left: 0; + list-style: none; + + > li { + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); + } + +} + +.comment-list .children { + list-style: none; + padding-left: 0; + + > li { + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); + } + +} + +.comment-list .depth-2, +.comment-list .depth-3 { + @include media(mobile) { + padding-left: calc(4 * var(--global--spacing-horizontal)); + } +} + +/** + * Comment Meta + */ +.comment-meta { + + .comment-author { + line-height: var(--global--line-height-heading); + margin-bottom: calc(0.25 * var(--global--spacing-unit)); + + @include media(mobile) { + margin-bottom: 0; + padding-right: 0; + } + + .fn { + font-family: var(--global--font-secondary); + font-weight: normal; + font-size: var(--global--font-size-lg); + hyphens: auto; + word-wrap: break-word; + word-break: break-word; + } + + } + + .comment-metadata { + color: var(--global--color-primary); + font-size: var(--global--font-size-xs); + padding: 8px 0 9px 0; + + .edit-link { + margin-left: var(--global--spacing-horizontal); + } + + } + + @include media(mobile) { + margin-right: inherit; + + .comment-author { + max-width: inherit; + } + } +} + +.reply { + font-size: var(--global--font-size-sm); + line-height: var(--global--line-height-heading); +} + +.bypostauthor { + display: block; +} + +.says { + display: none; +} + +.pingback .url, +.trackback .url { + font-family: var(--global--font-primary); +} + +// Comment body +.comment-body { + position: relative; + margin-bottom: calc(1.7 * var(--global--spacing-vertical)); + + > * { + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); + } + + .reply { + margin: 0; + } +} + +.comment-content { + word-wrap: break-word; +} + +// Pingbacks & Trackbacks +.pingback .comment-body, +.trackback .comment-body { + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); +} + +.comment-respond { + margin-top: var(--global--spacing-vertical); +} + +.comment-respond > * { + margin-top: var(--global--spacing-unit); + margin-bottom: var(--global--spacing-unit); + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + + &.comment-form { + margin-bottom: var(--global--spacing-vertical); + } + } +} + +.comment-author { + padding-top: 3px; + + .url { + color: currentColor; + } +} + +.comment-form { + display: flex; + flex-wrap: wrap; + + > * { + flex-basis: 100%; + } + + .comment-notes { + font-size: var(--global--font-size-sm); + } + + .comment-form-url, + .comment-form-comment { + width: 100%; + } + + .comment-form-author, + .comment-form-email { + flex-basis: 0; + flex-grow: 1; + + @include media(mobile-only) { + flex-basis: 100%; + } + } + + .comment-form-cookies-consent > label, + .comment-notes { + font-size: var(--global--font-size-xs); + font-weight: normal; + } +} + +.comment-form > p { + margin-bottom: var(--global--spacing-unit); + + &:first-of-type { + margin-top: 0; + } + + &:last-of-type { + margin-bottom: 0; + } + + label, + input[type="email"], + input[type="text"], + input[type="url"], + textarea { + display: block; + font-size: var(--global--font-size-sm); + margin-bottom: calc(.5 * var(--global--spacing-unit)); + width: 100%; + font-weight: var(--form--label-weight); + } + + &.comment-form-cookies-consent { + display: flex; + } + + @include media(mobile) { + + &.comment-form-author { + margin-right: calc(1.5 * var(--global--spacing-horizontal)); + } + + &.comment-notes, + &.logged-in-as { + display: block; + } + } +} diff --git a/themes/twentytwentyone/assets/sass/06-components/editor.scss b/themes/twentytwentyone/assets/sass/06-components/editor.scss index f0429825..0279484b 100644 --- a/themes/twentytwentyone/assets/sass/06-components/editor.scss +++ b/themes/twentytwentyone/assets/sass/06-components/editor.scss @@ -1,44 +1,44 @@ -html { - font-family: var(--global--font-secondary); - line-height: var(--global--line-height-body); -} - -body { - --wp--typography--line-height: var(--global--line-height-body); - color: var(--global--color-primary); - background-color: var(--global--color-background); - font-family: var(--global--font-secondary); - font-size: var(--global--font-size-base); - font-weight: normal; - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; -} - -// Links styles -.wp-block a { - color: var(--wp--style--color--link, var(--global--color-primary)); - - &:hover { - text-decoration-style: dotted; - } - - &:focus { - outline: 2px solid var(--wp--style--color--link, var(--global--color-primary)); - text-decoration: none; - } -} - -// Enforce the custom link color even if a custom background color has been set. -// The extra specificity here is required to override the background color styles. -.has-background { - // Target both current level and nested block. - .has-link-color a, - &.has-link-color a { - color: var(--wp--style--color--link, var(--global--color-primary)); - } -} - -button, -a { - cursor: pointer; -} +html { + font-family: var(--global--font-secondary); + line-height: var(--global--line-height-body); +} + +body { + --wp--typography--line-height: var(--global--line-height-body); + color: var(--global--color-primary); + background-color: var(--global--color-background); + font-family: var(--global--font-secondary); + font-size: var(--global--font-size-base); + font-weight: normal; + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; +} + +// Links styles +.wp-block a { + color: var(--wp--style--color--link, var(--global--color-primary)); + + &:hover { + text-decoration-style: dotted; + } + + &:focus { + outline: 2px solid var(--wp--style--color--link, var(--global--color-primary)); + text-decoration: none; + } +} + +// Enforce the custom link color even if a custom background color has been set. +// The extra specificity here is required to override the background color styles. +.has-background { + // Target both current level and nested block. + .has-link-color a, + &.has-link-color a { + color: var(--wp--style--color--link, var(--global--color-primary)); + } +} + +button, +a { + cursor: pointer; +} diff --git a/themes/twentytwentyone/assets/sass/06-components/entry.scss b/themes/twentytwentyone/assets/sass/06-components/entry.scss index 85375d66..1ec1a10c 100644 --- a/themes/twentytwentyone/assets/sass/06-components/entry.scss +++ b/themes/twentytwentyone/assets/sass/06-components/entry.scss @@ -1,210 +1,210 @@ -.entry-title { - - color: var(--entry-header--color); - font-size: var(--entry-header--font-size); - letter-spacing: var(--heading--letter-spacing-h2); - line-height: var(--heading--line-height-h2); - overflow-wrap: break-word; - - a { - color: var(--entry-header--color-link); - text-underline-offset: 0.15em; - - &:hover { - color: var(--entry-header--color-hover); - } - - &:focus { - color: var(--entry-header--color-focus); - } - - &:active { - color: var(--entry-header--color-link); - } - } -} - -.singular .entry-title { - font-size: var(--global--font-size-page-title); -} - -h1.entry-title { - line-height: var(--heading--line-height-h1); - font-weight: var(--heading--font-weight-page-title); -} - -/** - * Entry Content - */ - -.entry-content, -.entry-summary { - font-family: var(--entry-content--font-family); -} - -.entry-content { - - p { - word-wrap: break-word; - } - - // Overwrite iframe embeds that have inline styles. - > iframe[style] { - - margin: var(--global--spacing-vertical) 0 !important; - max-width: 100% !important; - } - - // Classic editor audio embeds. - .wp-audio-shortcode { - @extend %responsive-aligndefault-width; - } -} - -.entry-footer { - - color: var(--global--color-primary); - clear: both; - float: none; - font-size: var(--global--font-size-xs); - display: block; - - > span { - display: inline-block; - } - - a { - color: currentColor; - - &:hover, - &:focus { - color: var(--global--color-primary-hover); - } - - &:active { - color: currentColor; - } - } -} - -// Extra specificity to override rules in _vertical-margins.scss -.site-main > article > .entry-footer { - margin-top: var(--global--spacing-vertical); - padding-top: var(--global--spacing-unit); - padding-bottom: calc(3 * var(--global--spacing-vertical)); - border-bottom: var(--separator--height) solid var(--separator--border-color); -} - -body:not(.single) .site-main > article:last-of-type .entry-footer { - border-bottom: var(--separator--height) solid transparent; -} - -.single .site-main > article > .entry-footer { - margin-top: calc(3.4 * var(--global--spacing-vertical)); - margin-bottom: calc(3.4 * var(--global--spacing-vertical)); - padding-bottom: 0; - padding-top: calc(0.8 * var(--global--spacing-vertical)); - border-top: 3px solid var(--separator--border-color); - border-bottom: var(--separator--height) solid transparent; - display: grid; - grid-template-columns: repeat(2, 1fr); - column-gap: calc(2 * var(--global--spacing-horizontal)); - - .post-taxonomies, - .full-size-link { - justify-content: flex-end; - text-align: right; - } - - .full-size-link:first-child:last-child { - grid-column: span 2; - } - - .posted-on, - .byline, - .cat-links, - .tags-links { - display: block; - } - - @include media(mobile-only) { - display: block; - - .full-size-link { - display: block; - } - - .post-taxonomies, - .full-size-link { - text-align: left; - } - } -} - -/** - * Post Thumbnails - */ - -.post-thumbnail { - @extend %responsive-aligndefault-width; - text-align: center; - - .entry-header &, - .singular & { - @extend %responsive-alignwide-width-nested; - } - - .wp-post-image { - display: block; - width: auto; - max-width: 100%; - margin-left: auto; - margin-right: auto; - margin-top: calc(2 * var(--global--spacing-vertical)); - } -} - -/** - * Author - */ - -.author-bio { - position: relative; - font-size: var(--global--font-size-xs); - max-width: var(--responsive--aligndefault-width); - - .site-main > article > & { - margin-top: calc(2 * var(--global--spacing-vertical)); - } - - // Avatars are optional and can be turned off. - &.show-avatars { - - .avatar { - display: inline-block; - vertical-align: top; - border-radius: 50%; - } - - .author-bio-content { - display: inline-block; - padding-left: var(--global--spacing-horizontal); - max-width: calc(var(--responsive--aligndefault-width) - 90px); - } - } - - .author-bio-content { - - .author-title { - font-family: var(--entry-author-bio--font-family); - font-size: var(--entry-author-bio--font-size); - display: inline; - } - - .author-description { - font-size: var(--global--font-size-xs); - margin-top: calc(0.5 * var(--global--spacing-vertical)); - margin-bottom: calc(0.5 * var(--global--spacing-vertical)); - } - } -} +.entry-title { + + color: var(--entry-header--color); + font-size: var(--entry-header--font-size); + letter-spacing: var(--heading--letter-spacing-h2); + line-height: var(--heading--line-height-h2); + overflow-wrap: break-word; + + a { + color: var(--entry-header--color-link); + text-underline-offset: 0.15em; + + &:hover { + color: var(--entry-header--color-hover); + } + + &:focus { + color: var(--entry-header--color-focus); + } + + &:active { + color: var(--entry-header--color-link); + } + } +} + +.singular .entry-title { + font-size: var(--global--font-size-page-title); +} + +h1.entry-title { + line-height: var(--heading--line-height-h1); + font-weight: var(--heading--font-weight-page-title); +} + +/** + * Entry Content + */ + +.entry-content, +.entry-summary { + font-family: var(--entry-content--font-family); +} + +.entry-content { + + p { + word-wrap: break-word; + } + + // Overwrite iframe embeds that have inline styles. + > iframe[style] { + + margin: var(--global--spacing-vertical) 0 !important; + max-width: 100% !important; + } + + // Classic editor audio embeds. + .wp-audio-shortcode { + @extend %responsive-aligndefault-width; + } +} + +.entry-footer { + + color: var(--global--color-primary); + clear: both; + float: none; + font-size: var(--global--font-size-xs); + display: block; + + > span { + display: inline-block; + } + + a { + color: currentColor; + + &:hover, + &:focus { + color: var(--global--color-primary-hover); + } + + &:active { + color: currentColor; + } + } +} + +// Extra specificity to override rules in _vertical-margins.scss +.site-main > article > .entry-footer { + margin-top: var(--global--spacing-vertical); + padding-top: var(--global--spacing-unit); + padding-bottom: calc(3 * var(--global--spacing-vertical)); + border-bottom: var(--separator--height) solid var(--separator--border-color); +} + +body:not(.single) .site-main > article:last-of-type .entry-footer { + border-bottom: var(--separator--height) solid transparent; +} + +.single .site-main > article > .entry-footer { + margin-top: calc(3.4 * var(--global--spacing-vertical)); + margin-bottom: calc(3.4 * var(--global--spacing-vertical)); + padding-bottom: 0; + padding-top: calc(0.8 * var(--global--spacing-vertical)); + border-top: 3px solid var(--separator--border-color); + border-bottom: var(--separator--height) solid transparent; + display: grid; + grid-template-columns: repeat(2, 1fr); + column-gap: calc(2 * var(--global--spacing-horizontal)); + + .post-taxonomies, + .full-size-link { + justify-content: flex-end; + text-align: right; + } + + .full-size-link:first-child:last-child { + grid-column: span 2; + } + + .posted-on, + .byline, + .cat-links, + .tags-links { + display: block; + } + + @include media(mobile-only) { + display: block; + + .full-size-link { + display: block; + } + + .post-taxonomies, + .full-size-link { + text-align: left; + } + } +} + +/** + * Post Thumbnails + */ + +.post-thumbnail { + @extend %responsive-aligndefault-width; + text-align: center; + + .entry-header &, + .singular & { + @extend %responsive-alignwide-width-nested; + } + + .wp-post-image { + display: block; + width: auto; + max-width: 100%; + margin-left: auto; + margin-right: auto; + margin-top: calc(2 * var(--global--spacing-vertical)); + } +} + +/** + * Author + */ + +.author-bio { + position: relative; + font-size: var(--global--font-size-xs); + max-width: var(--responsive--aligndefault-width); + + .site-main > article > & { + margin-top: calc(2 * var(--global--spacing-vertical)); + } + + // Avatars are optional and can be turned off. + &.show-avatars { + + .avatar { + display: inline-block; + vertical-align: top; + border-radius: 50%; + } + + .author-bio-content { + display: inline-block; + padding-left: var(--global--spacing-horizontal); + max-width: calc(var(--responsive--aligndefault-width) - 90px); + } + } + + .author-bio-content { + + .author-title { + font-family: var(--entry-author-bio--font-family); + font-size: var(--entry-author-bio--font-size); + display: inline; + } + + .author-description { + font-size: var(--global--font-size-xs); + margin-top: calc(0.5 * var(--global--spacing-vertical)); + margin-bottom: calc(0.5 * var(--global--spacing-vertical)); + } + } +} diff --git a/themes/twentytwentyone/assets/sass/06-components/footer-navigation.scss b/themes/twentytwentyone/assets/sass/06-components/footer-navigation.scss index af9ae3c8..ed24fd03 100644 --- a/themes/twentytwentyone/assets/sass/06-components/footer-navigation.scss +++ b/themes/twentytwentyone/assets/sass/06-components/footer-navigation.scss @@ -1,73 +1,73 @@ - -.footer-navigation { - margin-top: calc(2 * var(--global--spacing-vertical)); - margin-bottom: var(--global--spacing-vertical); - color: var(--footer--color-text); - font-size: var(--global--font-size-xs); - font-family: var(--footer--font-family); -} - -.footer-navigation-wrapper { - display: flex; - justify-content: center; - flex-wrap: wrap; - list-style: none; - padding-left: 0; - - li { - display: inline; - // This is to prevent hover styles from overlapping when the menu wraps. - line-height: 3; - - a { - padding: calc(1.25 * var(--primary-nav--padding)) var(--primary-nav--padding); - transition: transform 0.1s ease; - color: var(--footer--color-link); - - &:link, - &:visited, - &:active { - color: var(--footer--color-link); - } - - &:hover { - text-decoration: underline; - text-decoration-style: dotted; - text-decoration-skip-ink: none; - color: var(--footer--color-link-hover); - } - - &:focus { - - .is-dark-theme & { - - .svg-icon { - fill: var(--wp--style--color--link, var(--global--color-background)); - } - } - - // Change colors when the body background is white. - .has-background-white & { - - .svg-icon { - fill: var(--wp--style--color--link, var(--global--color-white)); - } - } - } - } - - .svg-icon { - vertical-align: middle; - fill: var(--footer--color-link); - - &:hover { - transform: scale(1.1); - } - } - } - - .sub-menu-toggle, - .menu-item-description { - display: none; - } -} + +.footer-navigation { + margin-top: calc(2 * var(--global--spacing-vertical)); + margin-bottom: var(--global--spacing-vertical); + color: var(--footer--color-text); + font-size: var(--global--font-size-xs); + font-family: var(--footer--font-family); +} + +.footer-navigation-wrapper { + display: flex; + justify-content: center; + flex-wrap: wrap; + list-style: none; + padding-left: 0; + + li { + display: inline; + // This is to prevent hover styles from overlapping when the menu wraps. + line-height: 3; + + a { + padding: calc(1.25 * var(--primary-nav--padding)) var(--primary-nav--padding); + transition: transform 0.1s ease; + color: var(--footer--color-link); + + &:link, + &:visited, + &:active { + color: var(--footer--color-link); + } + + &:hover { + text-decoration: underline; + text-decoration-style: dotted; + text-decoration-skip-ink: none; + color: var(--footer--color-link-hover); + } + + &:focus { + + .is-dark-theme & { + + .svg-icon { + fill: var(--wp--style--color--link, var(--global--color-background)); + } + } + + // Change colors when the body background is white. + .has-background-white & { + + .svg-icon { + fill: var(--wp--style--color--link, var(--global--color-white)); + } + } + } + } + + .svg-icon { + vertical-align: middle; + fill: var(--footer--color-link); + + &:hover { + transform: scale(1.1); + } + } + } + + .sub-menu-toggle, + .menu-item-description { + display: none; + } +} diff --git a/themes/twentytwentyone/assets/sass/06-components/footer.scss b/themes/twentytwentyone/assets/sass/06-components/footer.scss index f0c432f2..6223c344 100644 --- a/themes/twentytwentyone/assets/sass/06-components/footer.scss +++ b/themes/twentytwentyone/assets/sass/06-components/footer.scss @@ -1,74 +1,74 @@ -// Footer -.site-footer { - padding-top: 0; - padding-bottom: calc(1.7 * var(--global--spacing-vertical)); - @extend %responsive-alignwide-width; - - // Increase the top vertical spacing when there is no widget area. - .no-widgets & { - margin-top: calc(6 * var(--global--spacing-vertical)); - } - - @include media(mobile-only) { - - .no-widgets & { - margin-top: calc(3 * var(--global--spacing-vertical)); - } - } -} - -// Footer Branding -.site-footer > .site-info { - padding-top: var(--global--spacing-vertical); - color: var(--footer--color-text); - font-family: var(--footer--font-family); - font-size: var(--footer--font-size); - line-height: var(--global--line-height-body); - border-top: 3px solid var(--global--color-border); - - .site-name { - text-transform: var(--branding--title--text-transform); - font-size: var(--branding--title--font-size); - } - - .powered-by { - margin-top: calc(0.5 * var(--global--spacing-vertical)); - } - - @include media(desktop) { - display: flex; - align-items: center; - - .powered-by { - margin-top: initial; - margin-left: auto; - } - } - - a { - color: var(--footer--color-link); - - &:link, - &:visited, - &:active { - color: var(--footer--color-link); - } - - &:hover { - color: var(--footer--color-link-hover); - } - - &:focus { - color: var(--footer--color-link-hover); - - .is-dark-theme & { - color: var(--wp--style--color--link, var(--global--color-background)); - } - - // Change colors when the body background is white. - .has-background-white & { - color: var(--wp--style--color--link, var(--global--color-white)); - } - } - } -} +// Footer +.site-footer { + padding-top: 0; + padding-bottom: calc(1.7 * var(--global--spacing-vertical)); + @extend %responsive-alignwide-width; + + // Increase the top vertical spacing when there is no widget area. + .no-widgets & { + margin-top: calc(6 * var(--global--spacing-vertical)); + } + + @include media(mobile-only) { + + .no-widgets & { + margin-top: calc(3 * var(--global--spacing-vertical)); + } + } +} + +// Footer Branding +.site-footer > .site-info { + padding-top: var(--global--spacing-vertical); + color: var(--footer--color-text); + font-family: var(--footer--font-family); + font-size: var(--footer--font-size); + line-height: var(--global--line-height-body); + border-top: 3px solid var(--global--color-border); + + .site-name { + text-transform: var(--branding--title--text-transform); + font-size: var(--branding--title--font-size); + } + + .powered-by { + margin-top: calc(0.5 * var(--global--spacing-vertical)); + } + + @include media(desktop) { + display: flex; + align-items: center; + + .powered-by { + margin-top: initial; + margin-left: auto; + } + } + + a { + color: var(--footer--color-link); + + &:link, + &:visited, + &:active { + color: var(--footer--color-link); + } + + &:hover { + color: var(--footer--color-link-hover); + } + + &:focus { + color: var(--footer--color-link-hover); + + .is-dark-theme & { + color: var(--wp--style--color--link, var(--global--color-background)); + } + + // Change colors when the body background is white. + .has-background-white & { + color: var(--wp--style--color--link, var(--global--color-white)); + } + } + } +} diff --git a/themes/twentytwentyone/assets/sass/06-components/header.scss b/themes/twentytwentyone/assets/sass/06-components/header.scss index 1852345c..557e2f5e 100644 --- a/themes/twentytwentyone/assets/sass/06-components/header.scss +++ b/themes/twentytwentyone/assets/sass/06-components/header.scss @@ -1,214 +1,202 @@ -// Site header -.site-header { - @extend %responsive-alignwide-width; - display: flex; - align-items: flex-start; - flex-wrap: wrap; - row-gap: var(--global--spacing-vertical); // Add space in case the menu wraps below the site branding. - - .wp-custom-logo & { - align-items: center; - } - - @include media(mobile) { - padding-top: calc(var(--global--spacing-vertical) / 0.75); // 40px - } - - @include media(desktop) { - padding-top: calc(2.4 * var(--global--spacing-vertical)); // 60px - } -} - -// Site branding -.site-branding { - color: var(--branding--color-text); - margin-right: 140px; - - &:last-child { - margin-right: 0; - width: 100%; - text-align: center; - } - - @include media(mobile) { - margin-right: initial; - margin-top: 4px; // Align the baseline of the site title with the primary menu - } -} - -// Site title -.site-title { - - color: var(--branding--color-link); - font-family: var(--branding--title--font-family); - font-size: var(--branding--title--font-size-mobile); - letter-spacing: normal; - text-transform: var(--branding--title--text-transform); - line-height: var(--global--line-height-heading); - margin-bottom: calc(var(--global--spacing-vertical) / 6); - - a { - color: currentColor; - font-weight: var(--branding--title--font-weight); - - &:link, - &:visited, - &:active { - color: currentColor; - } - - &:hover, - &:focus { - color: var(--branding--color-link-hover); - } - - } - - @include media(mobile) { - font-size: var(--branding--title--font-size); - } -} - -// Site description -.site-description { - color: currentColor; - font-family: var(--branding--description--font-family); - font-size: var(--branding--description--font-size); - line-height: 1.4; -} - -a.custom-logo-link { - text-decoration: none; - - &:focus { - // Change colors when the body background is white. - .has-background-white &, - .is-dark-theme & { - background: none; - } - } -} - -.site-title > a { - text-decoration-color: var(--global--color-secondary); -} - -// Site logo -.site-logo { - - margin: calc(var(--global--spacing-vertical) / 2) 0; - - .site-header > & { - width: 100%; - padding-bottom: calc(var(--global--spacing-vertical) * 1.5); - border-bottom: 1px solid; - text-align: center; - } - - .custom-logo { - margin-left: auto; - margin-right: auto; - max-width: var(--branding--logo--max-width-mobile); - max-height: var(--branding--logo--max-height-mobile); - height: auto; - display: inline-block; - width: auto; - } - - @include media(mobile) { - - .custom-logo { - max-width: var(--branding--logo--max-width); - max-height: var(--branding--logo--max-height); - height: auto; - width: auto; - } - } -} - -@include media(mobile-only) { - - .site-header { - - &.has-logo { - - &:not(.has-title-and-tagline) { - - &.has-menu { - - .site-logo { - position: absolute; - padding-top: calc(0.5 * var(--global--spacing-vertical)); - margin-top: 0; - top: var(--global--admin-bar--height); - - .primary-navigation-open & { - display: none; - } - - img { - max-height: calc(var(--button--padding-vertical) - (0.25 * var(--global--spacing-unit)) + 1.7em); - } - } - } - } - - &.has-title-and-tagline { - align-items: flex-start; - - &.has-menu { - justify-content: space-between; - - .site-branding { - max-width: calc(100% - 160px); - } - } - - .site-branding { - margin-right: 0; - } - - body:not(.primary-navigation-open) & { - - &:after { - display: none; - } - - .primary-navigation { - position: relative; - top: 0; - } - - .menu-button-container { - position: relative; - padding-top: 0; - margin-top: calc(0px - var(--button--padding-vertical) + (0.25 * var(--global--spacing-unit))); - - #primary-mobile-menu { - // The 4.5px here is to offset the icon size horizontallly - // (the icon's width is larger than the path's width and has extra space on the sides). - padding-left: calc(var(--global--spacing-horizontal) * 0.6 - 4.5px); - padding-right: calc(var(--global--spacing-horizontal) * 0.6 - 4.5px); - margin-right: calc(0px - var(--global--spacing-horizontal) * 0.6); - } - } - } - } - } - - &:not(.has-logo) { - - &.has-title-and-tagline { - - .site-branding { - margin-right: 0; - max-width: calc(100% - 160px); - } - } - } - - &:not(.has-menu) { - justify-content: center; - } - } -} +// Site header +.site-header { + @extend %responsive-alignwide-width; + display: flex; + align-items: flex-start; + flex-wrap: wrap; + row-gap: var(--global--spacing-vertical); // Add space in case the menu wraps below the site branding. + + .wp-custom-logo & { + align-items: center; + } + + @include media(mobile) { + padding-top: calc(var(--global--spacing-vertical) / 0.75); // 40px + } + + @include media(desktop) { + padding-top: calc(2.4 * var(--global--spacing-vertical)); // 60px + } +} + +// Site branding +.site-branding { + color: var(--branding--color-text); + margin-right: 140px; + + &:last-child { + margin-right: 0; + width: 100%; + text-align: center; + } + + @include media(mobile) { + margin-right: initial; + margin-top: 4px; // Align the baseline of the site title with the primary menu + } +} + +// Site title +.site-title { + + color: var(--branding--color-link); + font-family: var(--branding--title--font-family); + font-size: var(--branding--title--font-size-mobile); + letter-spacing: normal; + text-transform: var(--branding--title--text-transform); + line-height: var(--global--line-height-heading); + margin-bottom: calc(var(--global--spacing-vertical) / 6); + + a { + color: currentColor; + font-weight: var(--branding--title--font-weight); + + &:link, + &:visited, + &:active { + color: currentColor; + } + + &:hover, + &:focus { + color: var(--branding--color-link-hover); + } + + } + + @include media(mobile) { + font-size: var(--branding--title--font-size); + } +} + +// Site description +.site-description { + color: currentColor; + font-family: var(--branding--description--font-family); + font-size: var(--branding--description--font-size); + line-height: 1.4; +} + +.site-title > a { + text-decoration-color: var(--global--color-secondary); +} + +// Site logo +.site-logo { + + margin: calc(var(--global--spacing-vertical) / 2) 0; + + .site-header > & { + width: 100%; + padding-bottom: calc(var(--global--spacing-vertical) * 1.5); + border-bottom: 1px solid; + text-align: center; + } + + .custom-logo { + margin-left: auto; + margin-right: auto; + max-width: var(--branding--logo--max-width-mobile); + max-height: var(--branding--logo--max-height-mobile); + height: auto; + display: inline-block; + width: auto; + } + + @include media(mobile) { + + .custom-logo { + max-width: var(--branding--logo--max-width); + max-height: var(--branding--logo--max-height); + height: auto; + width: auto; + } + } +} + +@include media(mobile-only) { + + .site-header { + + &.has-logo { + + &:not(.has-title-and-tagline) { + + &.has-menu { + + .site-logo { + position: absolute; + padding-top: calc(0.5 * var(--global--spacing-vertical)); + margin-top: 0; + top: var(--global--admin-bar--height); + + .primary-navigation-open & { + display: none; + } + + img { + max-height: calc(var(--button--padding-vertical) - (0.25 * var(--global--spacing-unit)) + 1.7em); + } + } + } + } + + &.has-title-and-tagline { + align-items: flex-start; + + &.has-menu { + justify-content: space-between; + + .site-branding { + max-width: calc(100% - 160px); + } + } + + .site-branding { + margin-right: 0; + } + + body:not(.primary-navigation-open) & { + + &:after { + display: none; + } + + .primary-navigation { + position: relative; + top: 0; + } + + .menu-button-container { + position: relative; + padding-top: 0; + margin-top: calc(0px - var(--button--padding-vertical) + (0.25 * var(--global--spacing-unit))); + + #primary-mobile-menu { + // The 4.5px here is to offset the icon size horizontallly + // (the icon's width is larger than the path's width and has extra space on the sides). + padding-left: calc(var(--global--spacing-horizontal) * 0.6 - 4.5px); + padding-right: calc(var(--global--spacing-horizontal) * 0.6 - 4.5px); + margin-right: calc(0px - var(--global--spacing-horizontal) * 0.6); + } + } + } + } + } + + &:not(.has-logo) { + + &.has-title-and-tagline { + + .site-branding { + margin-right: 0; + max-width: calc(100% - 160px); + } + } + } + + &:not(.has-menu) { + justify-content: center; + } + } +} diff --git a/themes/twentytwentyone/assets/sass/06-components/navigation.scss b/themes/twentytwentyone/assets/sass/06-components/navigation.scss index b92c5ca9..11329cf8 100644 --- a/themes/twentytwentyone/assets/sass/06-components/navigation.scss +++ b/themes/twentytwentyone/assets/sass/06-components/navigation.scss @@ -1,533 +1,530 @@ - -// Navigation - -// Mobile menu toggles -.menu-button-container { - display: none; - justify-content: space-between; - position: absolute; - right: 0; - padding-top: calc(0.5 * var(--global--spacing-vertical)); - padding-bottom: calc(0.25 * var(--global--spacing-vertical)); - - #primary-mobile-menu { - margin-left: auto; - padding: calc(var(--button--padding-vertical) - (0.25 * var(--global--spacing-unit))) calc(0.5 * var(--button--padding-horizontal)); - } - - @include media(mobile-only) { - display: flex; - } - - // Override specificty from default button styles. - .button.button { - display: flex; - font-size: var(--primary-nav--font-size-button); - font-weight: var(--primary-nav--font-weight-button); - background-color: transparent; - border: none; - color: var(--primary-nav--color-link); - - .dropdown-icon { - display: flex; - align-items: center; - - .svg-icon { - margin-left: calc(0.25 * var(--global--spacing-unit)); - } - - // Menu icon is off-center vertically to prevent blurry pixels. - &.open .svg-icon { - position: relative; - top: -1px; - } - - &.close { - display: none; - } - } - - &[aria-expanded*="true"] { - - .dropdown-icon { - - &.open { - display: none; - } - - &.close { - display: flex; - - .has-logo.has-title-and-tagline & { - animation-name: twentytwentyone-close-button-transition; - animation-duration: 0.3s; - } - } - } - } - } - - // When the menu is open, hide the close button and show the hide button. - .primary-navigation-open & { - width: 100%; - z-index: 500; - background-color: var(--global--color-background); - - #primary-mobile-menu { - position: static; - } - } -} - -.primary-navigation { - position: absolute; - top: var(--global--admin-bar--height); - right: 0; - color: var(--primary-nav--color-text); - font-size: var(--primary-nav--font-size); - line-height: 1.15; - margin-top: 0; - margin-bottom: 0; - - // Mobile menu closed - > .primary-menu-container { - position: fixed; - visibility: hidden; - opacity: 0; - top: 0; - right: 0; - bottom: 0; - left: 0; - // Height of the menu-button-container using font size, line height, and total padding, plus 5px so the focus of the first item is visible. - padding-top: calc(var(--button--line-height) * var(--primary-nav--font-size-button) + 42px + 5px); - padding-left: var(--global--spacing-unit); - padding-right: var(--global--spacing-unit); - padding-bottom: var(--global--spacing-horizontal); - background-color: var(--global--color-background); - transition: all .15s ease-in-out; - transform: translateY(var(--global--spacing-vertical)); - - @include media(mobile-only) { - height: 100vh; - z-index: 499; - overflow-x: hidden; - overflow-y: auto; - border: 2px solid transparent; - - .has-logo.has-title-and-tagline & { - position: fixed; - transform: translateY(0) translateX(100%); - } - - .admin-bar .has-logo.has-title-and-tagline & { - top: var(--global--admin-bar--height); - } - - .admin-bar & { - height: calc(100vh - var(--global--admin-bar--height)); - } - - &:focus { - border: 2px solid var(--global--color-primary); - } - } - } - - // Mobile menu open - .primary-navigation-open & { - - @include media(mobile-only) { - width: 100%; - position: fixed; - z-index: 2; // To be greater than the cover block and embeds. - } - - > .primary-menu-container { - position: absolute; - visibility: visible; - opacity: 1; - transform: translateY(0); - } - } - - .primary-navigation-open .has-logo.has-title-and-tagline & { - @include media(mobile-only) { - - > .primary-menu-container { - transform: translateX(0) translateY(0); - } - } - } - - @include media(mobile) { - position: relative; - margin-left: auto; - - // Hide Mobile menu on desktop - > .primary-menu-container { - visibility: visible; - opacity: 1; - position: relative; - padding: 0; - background-color: transparent; - overflow: initial; - transform: none; - } - - // Hide mobile menu toggle - #toggle-menu { - display: none; - } - - // Hide sub-sub-menus - > .primary-menu-container ul > li .sub-menu-toggle[aria-expanded="false"] ~ ul { - display: none; - } - - // Don't adjust position when logged-in - .admin-bar & { - top: initial; - - > .primary-menu-container { - top: initial; - } - } - } - - // Menu list wrapper - > div > .menu-wrapper { - display: flex; - justify-content: flex-start; - flex-wrap: wrap; - list-style: none; - margin: 0; - max-width: none; - padding-left: 0; - position: relative; - - @include media(mobile-only) { - padding-bottom: 100px; - - ul { - padding-left: 0; - } - } - - li { - display: block; - position: relative; - width: 100%; - - @include media(mobile) { - margin: 0; - width: inherit; - - &:last-child() { - margin-right: 0; - } - } - } - - // Sub-menu buttons - .sub-menu-toggle { - display: flex; - height: calc(2 * var(--primary-nav--padding) + 1.15em + 1px); - width: 44px; - padding: 0; - justify-content: center; - align-items: center; - background: transparent; - color: currentColor; - border: none; - - &:focus { - outline: 2px solid var(--wp--style--color--link, var(--global--color-primary)); - } - - @include media(mobile-only) { - display: none; - } - - .icon-plus, - .icon-minus { - height: 100%; - display: flex; - align-items: center; - - svg { - margin-top: -1px; - } - } - - .icon-minus { - display: none; - } - - // When the sub-menu is open, display the minus icon - &[aria-expanded="true"] { - - .icon-minus { - display: flex; - } - - .icon-plus { - display: none; - } - } - } - - // Sub-menus Flyout - > li > .sub-menu { - - position: relative; - - @include media(mobile) { - left: 0; - margin: 0; - min-width: max-content; - position: absolute; - top: 100%; - padding-top: 3px; - transition: all 0.5s ease; - z-index: 88888; - - &:before, - &:after { - content: ""; - display: block; - position: absolute; - width: 0; - top: -10px; - left: var(--global--spacing-horizontal); - border-style: solid; - border-color: var(--primary-nav--border-color) transparent; - border-width: 0 7px 10px 7px; - } - - &:after { - top: -9px; - border-color: var(--global--color-background) transparent; - } - - li { - background: var(--global--color-background); - } - - &.submenu-reposition-left { - - /* rtl:ignore */ - left: 0; - - /* rtl:ignore */ - right: auto; - - &:before, - &:after { - - /* rtl:ignore */ - left: var(--global--spacing-horizontal); - - /* rtl:ignore */ - right: auto; - } - } - - &.submenu-reposition-right { - - /* rtl:ignore */ - right: 0; - - /* rtl:ignore */ - left: auto; - - &:before, - &:after { - - /* rtl:ignore */ - left: auto; - - /* rtl:ignore */ - right: var(--global--spacing-horizontal); - } - } - } - } - } - - // Top-level Item Link Colors - .primary-menu > .menu-item:hover > a { - color: var(--primary-nav--color-link-hover); - } - - .primary-menu-container { - @include media(mobile) { - // Better align with the site title when the menu wraps. - margin-right: calc(0px - var(--primary-nav--padding)); - margin-left: calc(0px - var(--primary-nav--padding)); - - // Top-level Menu Item - > ul > .menu-item { - display: flex; - - > a { - padding-left: var(--primary-nav--padding); - padding-right: var(--primary-nav--padding); - - + .sub-menu-toggle { - margin-left: calc(5px - var(--primary-nav--padding)); - } - } - } - } - } - - // Menu Item Link - a { - display: block; - font-family: var(--primary-nav--font-family-mobile); - font-size: var(--primary-nav--font-size-mobile); - font-weight: var(--primary-nav--font-weight); - padding: var(--primary-nav--padding) 0; - text-decoration: none; - - @include media(mobile) { - display: block; - font-family: var(--primary-nav--font-family); - font-size: var(--primary-nav--font-size); - font-weight: var(--primary-nav--font-weight); - } - - + svg { - fill: var(--primary-nav--color-text); - } - - &:hover, - &:link, - &:visited { - color: var(--primary-nav--color-link-hover); - } - - &:hover { - text-decoration: underline; - text-decoration-style: dotted; - } - - &:focus { - position: relative; - z-index: 99999; // Ensure focus styles appear above absolute positioned elements - outline-offset: 0; - text-decoration-thickness: 2px; - } - } - - .current-menu-item > a:first-child, - .current_page_item > a:first-child { - text-decoration: underline; - text-decoration-style: solid; - - &:hover { - text-decoration: underline; - text-decoration-style: dotted; - } - } - - // Sub-menu depth indicators + text styles - .sub-menu { - margin: 0; - padding: 0; - list-style: none; - margin-left: var(--primary-nav--padding); - border: 1px solid var(--primary-nav--border-color); - - .sub-menu { - border: none; - } - - // Sub-menu items om wide screens. - @include media(mobile) { - - // For nested sub-menus, don't duplicate the padding - > .menu-item > .sub-menu { - padding: 0; - } - } - - .menu-item { - - @include media(mobile-only) { - - &:last-child() { - margin-bottom: 0; - } - - } - - > a { - padding: calc(1.25 * var(--primary-nav--padding)) var(--primary-nav--padding); - display: block; - font-size: var(--primary-nav--font-size-sub-menu-mobile); - font-style: var(--primary-nav--font-style-sub-menu-mobile); - - @include media(mobile) { - font-size: var(--primary-nav--font-size-sub-menu); - font-style: var(--primary-nav--font-style); - } - } - } - } - - // Show top-level sub-menu indicators above mobile-breakpoint-only - .menu-item-has-children { - - > .svg-icon { - display: none; - } - - @include media(mobile) { - - > .svg-icon { - display: inline-block; - height: 100%; - } - - .sub-menu .svg-icon { - display: none; - } - } - - } - - .menu-item-description { - display: block; - clear: both; - font-size: var(--global--font-size-xs); - text-transform: none; - line-height: 1.7; - - > span { - display: inline-block; - } - } -} - -// Keep the menu pinned to the top when the menu is open. -@include media(mobile-only) { - - .lock-scrolling .site { - position: fixed; - max-width: 100%; - width: 100%; - } -} - -// Close button animation for when a custom logo is present. -@keyframes twentytwentyone-close-button-transition { - - from { - opacity: 0; - } - - to { - opacity: 1; - } -} + +// Navigation + +// Mobile menu toggles +.menu-button-container { + display: none; + justify-content: space-between; + position: absolute; + right: 0; + padding-top: calc(0.5 * var(--global--spacing-vertical)); + padding-bottom: calc(0.25 * var(--global--spacing-vertical)); + + @include media(mobile-only) { + display: flex; + } + + // Override specificity from default button styles. + #primary-mobile-menu { + display: flex; + margin-left: auto; + padding: calc(var(--button--padding-vertical) - (0.25 * var(--global--spacing-unit))) calc(0.5 * var(--button--padding-horizontal)); + font-size: var(--primary-nav--font-size-button); + font-weight: var(--primary-nav--font-weight-button); + background-color: transparent; + border: none; + color: var(--primary-nav--color-link); + + .dropdown-icon { + display: flex; + align-items: center; + + .svg-icon { + margin-left: calc(0.25 * var(--global--spacing-unit)); + } + + // Menu icon is off-center vertically to prevent blurry pixels. + &.open .svg-icon { + position: relative; + top: -1px; + } + + &.close { + display: none; + } + } + + &[aria-expanded*="true"] { + + .dropdown-icon { + + &.open { + display: none; + } + + &.close { + display: flex; + + .has-logo.has-title-and-tagline & { + animation-name: twentytwentyone-close-button-transition; + animation-duration: 0.3s; + } + } + } + } + } + + // When the menu is open, hide the close button and show the hide button. + .primary-navigation-open & { + width: 100%; + z-index: 500; + background-color: var(--global--color-background); + + #primary-mobile-menu { + position: static; + } + } +} + +.primary-navigation { + position: absolute; + top: var(--global--admin-bar--height); + right: 0; + color: var(--primary-nav--color-text); + font-size: var(--primary-nav--font-size); + line-height: 1.15; + margin-top: 0; + margin-bottom: 0; + + // Mobile menu closed + > .primary-menu-container { + position: fixed; + visibility: hidden; + opacity: 0; + top: 0; + right: 0; + bottom: 0; + left: 0; + // Height of the menu-button-container using font size, line height, and total padding, plus 5px so the focus of the first item is visible. + padding-top: calc(var(--button--line-height) * var(--primary-nav--font-size-button) + 42px + 5px); + padding-left: var(--global--spacing-unit); + padding-right: var(--global--spacing-unit); + padding-bottom: var(--global--spacing-horizontal); + background-color: var(--global--color-background); + transition: all .15s ease-in-out; + transform: translateY(var(--global--spacing-vertical)); + + @include media(mobile-only) { + height: 100vh; + z-index: 499; + overflow-x: hidden; + overflow-y: auto; + border: 2px solid transparent; + + .has-logo.has-title-and-tagline & { + position: fixed; + transform: translateY(0) translateX(100%); + } + + .admin-bar .has-logo.has-title-and-tagline & { + top: var(--global--admin-bar--height); + } + + .admin-bar & { + height: calc(100vh - var(--global--admin-bar--height)); + } + + &:focus { + border: 2px solid var(--global--color-primary); + } + } + } + + // Mobile menu open + .primary-navigation-open & { + + @include media(mobile-only) { + width: 100%; + position: fixed; + z-index: 2; // To be greater than the cover block and embeds. + } + + > .primary-menu-container { + position: absolute; + visibility: visible; + opacity: 1; + transform: translateY(0); + } + } + + .primary-navigation-open .has-logo.has-title-and-tagline & { + @include media(mobile-only) { + + > .primary-menu-container { + transform: translateX(0) translateY(0); + } + } + } + + @include media(mobile) { + position: relative; + margin-left: auto; + + // Hide Mobile menu on desktop + > .primary-menu-container { + visibility: visible; + opacity: 1; + position: relative; + padding: 0; + background-color: transparent; + overflow: initial; + transform: none; + } + + // Hide mobile menu toggle + #toggle-menu { + display: none; + } + + // Hide sub-sub-menus + > .primary-menu-container ul > li .sub-menu-toggle[aria-expanded="false"] ~ ul { + display: none; + } + + // Don't adjust position when logged-in + .admin-bar & { + top: initial; + + > .primary-menu-container { + top: initial; + } + } + } + + // Menu list wrapper + > div > .menu-wrapper { + display: flex; + justify-content: flex-start; + flex-wrap: wrap; + list-style: none; + margin: 0; + max-width: none; + padding-left: 0; + position: relative; + + @include media(mobile-only) { + padding-bottom: 100px; + + ul { + padding-left: 0; + } + } + + li { + display: block; + position: relative; + width: 100%; + + @include media(mobile) { + margin: 0; + width: inherit; + + &:last-child { + margin-right: 0; + } + } + } + + // Sub-menu buttons + .sub-menu-toggle { + display: flex; + height: calc(2 * var(--primary-nav--padding) + 1.15em + 1px); + width: 44px; + padding: 0; + justify-content: center; + align-items: center; + background: transparent; + color: currentColor; + border: none; + + &:focus { + outline: 2px solid var(--wp--style--color--link, var(--global--color-primary)); + } + + @include media(mobile-only) { + display: none; + } + + .icon-plus, + .icon-minus { + height: 100%; + display: flex; + align-items: center; + + svg { + margin-top: -1px; + } + } + + .icon-minus { + display: none; + } + + // When the sub-menu is open, display the minus icon + &[aria-expanded="true"] { + + .icon-minus { + display: flex; + } + + .icon-plus { + display: none; + } + } + } + + // Sub-menus Flyout + > li > .sub-menu { + + position: relative; + + @include media(mobile) { + left: 0; + margin: 0; + min-width: max-content; + position: absolute; + top: 100%; + padding-top: 3px; + transition: all 0.5s ease; + z-index: 88888; + + &:before, + &:after { + content: ""; + display: block; + position: absolute; + width: 0; + top: -10px; + left: var(--global--spacing-horizontal); + border-style: solid; + border-color: var(--primary-nav--border-color) transparent; + border-width: 0 7px 10px 7px; + } + + &:after { + top: -9px; + border-color: var(--global--color-background) transparent; + } + + li { + background: var(--global--color-background); + } + + &.submenu-reposition-left { + + /* rtl:ignore */ + left: 0; + + /* rtl:ignore */ + right: auto; + + &:before, + &:after { + + /* rtl:ignore */ + left: var(--global--spacing-horizontal); + + /* rtl:ignore */ + right: auto; + } + } + + &.submenu-reposition-right { + + /* rtl:ignore */ + right: 0; + + /* rtl:ignore */ + left: auto; + + &:before, + &:after { + + /* rtl:ignore */ + left: auto; + + /* rtl:ignore */ + right: var(--global--spacing-horizontal); + } + } + } + } + } + + // Top-level Item Link Colors + .primary-menu > .menu-item:hover > a { + color: var(--primary-nav--color-link-hover); + } + + .primary-menu-container { + @include media(mobile) { + // Better align with the site title when the menu wraps. + margin-right: calc(0px - var(--primary-nav--padding)); + margin-left: calc(0px - var(--primary-nav--padding)); + + // Top-level Menu Item + > ul > .menu-item { + display: flex; + + > a { + padding-left: var(--primary-nav--padding); + padding-right: var(--primary-nav--padding); + + + .sub-menu-toggle { + margin-left: calc(5px - var(--primary-nav--padding)); + } + } + } + } + } + + // Menu Item Link + a { + display: block; + font-family: var(--primary-nav--font-family-mobile); + font-size: var(--primary-nav--font-size-mobile); + font-weight: var(--primary-nav--font-weight); + padding: var(--primary-nav--padding) 0; + text-decoration: none; + + @include media(mobile) { + display: block; + font-family: var(--primary-nav--font-family); + font-size: var(--primary-nav--font-size); + font-weight: var(--primary-nav--font-weight); + } + + + svg { + fill: var(--primary-nav--color-text); + } + + &:hover, + &:link, + &:visited { + color: var(--primary-nav--color-link-hover); + } + + &:hover { + text-decoration: underline; + text-decoration-style: dotted; + } + + &:focus { + position: relative; + z-index: 99999; // Ensure focus styles appear above absolute positioned elements + outline-offset: 0; + text-decoration-thickness: 2px; + } + } + + .current-menu-item > a:first-child, + .current_page_item > a:first-child { + text-decoration: underline; + text-decoration-style: solid; + + &:hover { + text-decoration: underline; + text-decoration-style: dotted; + } + } + + // Sub-menu depth indicators + text styles + .sub-menu { + margin: 0; + padding: 0; + list-style: none; + margin-left: var(--primary-nav--padding); + border: 1px solid var(--primary-nav--border-color); + + .sub-menu { + border: none; + } + + // Sub-menu items om wide screens. + @include media(mobile) { + + // For nested sub-menus, don't duplicate the padding + > .menu-item > .sub-menu { + padding: 0; + } + } + + .menu-item { + + @include media(mobile-only) { + + &:last-child { + margin-bottom: 0; + } + + } + + > a { + padding: calc(1.25 * var(--primary-nav--padding)) var(--primary-nav--padding); + display: block; + font-size: var(--primary-nav--font-size-sub-menu-mobile); + font-style: var(--primary-nav--font-style-sub-menu-mobile); + + @include media(mobile) { + font-size: var(--primary-nav--font-size-sub-menu); + font-style: var(--primary-nav--font-style); + } + } + } + } + + // Show top-level sub-menu indicators above mobile-breakpoint-only + .menu-item-has-children { + + > .svg-icon { + display: none; + } + + @include media(mobile) { + + > .svg-icon { + display: inline-block; + height: 100%; + } + + .sub-menu .svg-icon { + display: none; + } + } + + } + + .menu-item-description { + display: block; + clear: both; + font-size: var(--global--font-size-xs); + text-transform: none; + line-height: 1.7; + + > span { + display: inline-block; + } + } +} + +// Keep the menu pinned to the top when the menu is open. +@include media(mobile-only) { + + .lock-scrolling .site { + position: fixed; + max-width: 100%; + width: 100%; + } +} + +// Close button animation for when a custom logo is present. +@keyframes twentytwentyone-close-button-transition { + + from { + opacity: 0; + } + + to { + opacity: 1; + } +} diff --git a/themes/twentytwentyone/assets/sass/06-components/pagination.scss b/themes/twentytwentyone/assets/sass/06-components/pagination.scss index 65f9dfce..0f3029c4 100644 --- a/themes/twentytwentyone/assets/sass/06-components/pagination.scss +++ b/themes/twentytwentyone/assets/sass/06-components/pagination.scss @@ -1,243 +1,243 @@ -/* Next/Previous navigation */ - -// All navigation -.navigation { - color: var(--global--color-primary); - - a { - color: var(--global--color-primary); - text-decoration: none; - - &:hover { - color: var(--global--color-primary-hover); - text-decoration: underline; - text-decoration-style: dotted; - } - - &:focus { - color: var(--global--color-secondary); - } - - &:active { - color: var(--global--color-primary); - } - } - - .nav-links { - - > * { - min-width: 44px; - min-height: 44px; - } - - .nav-next a, - .nav-previous a { - display: flex; - flex-direction: column; - } - - .dots { - text-align: center; - } - - @include media(tablet) { - display: flex; - justify-content: center; - flex-wrap: wrap; - - .nav-next, - .nav-previous { - flex: 0 1 auto; - margin-bottom: inherit; - margin-top: inherit; - max-width: calc(50% - (0.5 * var(--global--spacing-unit))); - } - - .nav-next { - text-align: right; - } - } - } - - .svg-icon { - display: inline-block; - fill: currentColor; - vertical-align: middle; - position: relative; - } - - .nav-previous .svg-icon, - .prev .svg-icon { - top: -2px; - margin-right: calc(0.25 * var(--global--spacing-unit)); - } - - .nav-next .svg-icon, - .next .svg-icon { - top: -1px; - margin-left: calc(0.25 * var(--global--spacing-unit)); - } -} - -// Singular navigation -.post-navigation { - - margin: var(--global--spacing-vertical) auto; - - @include media(desktop) { - margin: var(--global--spacing-vertical) auto; - } - - @extend %responsive-alignwide-width; - - .meta-nav { - line-height: var(--global--line-height-body); - color: var(--global--color-primary); - } - - .post-title { - display: inline-block; - font-family: var(--global--font-primary); - font-size: var(--global--font-size-lg); - font-weight: var(--pagination--font-weight-strong); - line-height: var(--global--line-height-heading); - @include media(desktop) { - margin: 5px calc(24px + (0.25 * var(--global--spacing-unit))) 0; - } - } - - .nav-links { - @include media(mobile) { - justify-content: space-between; - } - } - - .nav-next, - .nav-previous { - margin-top: var(--global--spacing-vertical); - margin-bottom: var(--global--spacing-vertical); - - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } - } -} - -// Index/archive navigation -.pagination, -.comments-pagination { - - border-top: 3px solid var(--global--color-border); - padding-top: var(--global--spacing-vertical); - margin: var(--global--spacing-vertical) auto; - - @include media(desktop) { - margin: var(--global--spacing-vertical) auto; - } - - @extend %responsive-alignwide-width; - - // Resets the top margin added to the .nav-links items below. - .nav-links { - margin-top: calc(-1 * var(--global--spacing-vertical)); - - a:hover { - color: var(--pagination--color-link-hover); - } - - .is-dark-theme & { - - a:active, - a:hover:active, - a:hover:focus { - color: var(--global--color-background); - } - } - - .has-background-white & { - - a:active, - a:hover:active, - a:hover:focus { - color: var(--global--color-white); - } - } - } - - .nav-links > * { - color: var(--pagination--color-text); - font-family: var(--pagination--font-family); - font-size: var(--pagination--font-size); - font-weight: var(--pagination--font-weight); - margin-top: var(--global--spacing-vertical); - margin-left: calc(0.66 * var(--global--spacing-unit)); - margin-right: calc(0.66 * var(--global--spacing-unit)); - - &.current { - text-decoration: underline; - } - - &:not(.dots):not(.current):hover { - text-decoration-style: dotted; - } - - &:first-child { - margin-left: 0; - } - - &:last-child { - margin-right: 0; - } - - &.next { - margin-left: auto; - } - - &.prev { - margin-right: auto; - } - } - - @include media(desktop-only) { - - .nav-links { - display: flex; - flex-wrap: wrap; - } - - .page-numbers { - display: none; - - &.prev, - &.next { - display: inline-block; - flex: 0 1 auto; - } - } - } - - @include media(mobile-only) { - - .nav-short { - display: none; - } - } -} - -// Comments pagination -.comments-pagination { - padding-top: calc(0.66 * var(--global--spacing-vertical)); - margin: calc(3 * var(--global--spacing-vertical)) auto; - - @include media(desktop) { - margin: calc(3 * var(--global--spacing-vertical)) auto calc(4 * var(--global--spacing-vertical)) auto; - } - - .nav-links > * { - font-size: var(--global--font-size-md); - } -} +/* Next/Previous navigation */ + +// All navigation +.navigation { + color: var(--global--color-primary); + + a { + color: var(--global--color-primary); + text-decoration: none; + + &:hover { + color: var(--global--color-primary-hover); + text-decoration: underline; + text-decoration-style: dotted; + } + + &:focus { + color: var(--global--color-secondary); + } + + &:active { + color: var(--global--color-primary); + } + } + + .nav-links { + + > * { + min-width: 44px; + min-height: 44px; + } + + .nav-next a, + .nav-previous a { + display: flex; + flex-direction: column; + } + + .dots { + text-align: center; + } + + @include media(tablet) { + display: flex; + justify-content: center; + flex-wrap: wrap; + + .nav-next, + .nav-previous { + flex: 0 1 auto; + margin-bottom: inherit; + margin-top: inherit; + max-width: calc(50% - (0.5 * var(--global--spacing-unit))); + } + + .nav-next { + text-align: right; + } + } + } + + .svg-icon { + display: inline-block; + fill: currentColor; + vertical-align: middle; + position: relative; + } + + .nav-previous .svg-icon, + .prev .svg-icon { + top: -2px; + margin-right: calc(0.25 * var(--global--spacing-unit)); + } + + .nav-next .svg-icon, + .next .svg-icon { + top: -1px; + margin-left: calc(0.25 * var(--global--spacing-unit)); + } +} + +// Singular navigation +.post-navigation { + + margin: var(--global--spacing-vertical) auto; + + @include media(desktop) { + margin: var(--global--spacing-vertical) auto; + } + + @extend %responsive-alignwide-width; + + .meta-nav { + line-height: var(--global--line-height-body); + color: var(--global--color-primary); + } + + .post-title { + display: inline-block; + font-family: var(--global--font-primary); + font-size: var(--global--font-size-lg); + font-weight: var(--pagination--font-weight-strong); + line-height: var(--global--line-height-heading); + @include media(desktop) { + margin: 5px calc(24px + (0.25 * var(--global--spacing-unit))) 0; + } + } + + .nav-links { + @include media(mobile) { + justify-content: space-between; + } + } + + .nav-next, + .nav-previous { + margin-top: var(--global--spacing-vertical); + margin-bottom: var(--global--spacing-vertical); + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } + } +} + +// Index/archive navigation +.pagination, +.comments-pagination { + + border-top: 3px solid var(--global--color-border); + padding-top: var(--global--spacing-vertical); + margin: var(--global--spacing-vertical) auto; + + @include media(desktop) { + margin: var(--global--spacing-vertical) auto; + } + + @extend %responsive-alignwide-width; + + // Resets the top margin added to the .nav-links items below. + .nav-links { + margin-top: calc(-1 * var(--global--spacing-vertical)); + + a:hover { + color: var(--pagination--color-link-hover); + } + + .is-dark-theme & { + + a:active, + a:hover:active, + a:hover:focus { + color: var(--global--color-background); + } + } + + .has-background-white & { + + a:active, + a:hover:active, + a:hover:focus { + color: var(--global--color-white); + } + } + } + + .nav-links > * { + color: var(--pagination--color-text); + font-family: var(--pagination--font-family); + font-size: var(--pagination--font-size); + font-weight: var(--pagination--font-weight); + margin-top: var(--global--spacing-vertical); + margin-left: calc(0.66 * var(--global--spacing-unit)); + margin-right: calc(0.66 * var(--global--spacing-unit)); + + &.current { + text-decoration: underline; + } + + &:not(.dots):not(.current):hover { + text-decoration-style: dotted; + } + + &:first-child { + margin-left: 0; + } + + &:last-child { + margin-right: 0; + } + + &.next { + margin-left: auto; + } + + &.prev { + margin-right: auto; + } + } + + @include media(desktop-only) { + + .nav-links { + display: flex; + flex-wrap: wrap; + } + + .page-numbers { + display: none; + + &.prev, + &.next { + display: inline-block; + flex: 0 1 auto; + } + } + } + + @include media(mobile-only) { + + .nav-short { + display: none; + } + } +} + +// Comments pagination +.comments-pagination { + padding-top: calc(0.66 * var(--global--spacing-vertical)); + margin: calc(3 * var(--global--spacing-vertical)) auto; + + @include media(desktop) { + margin: calc(3 * var(--global--spacing-vertical)) auto calc(4 * var(--global--spacing-vertical)) auto; + } + + .nav-links > * { + font-size: var(--global--font-size-md); + } +} diff --git a/themes/twentytwentyone/assets/sass/06-components/posts-and-pages.scss b/themes/twentytwentyone/assets/sass/06-components/posts-and-pages.scss index 71b76257..a6f28767 100644 --- a/themes/twentytwentyone/assets/sass/06-components/posts-and-pages.scss +++ b/themes/twentytwentyone/assets/sass/06-components/posts-and-pages.scss @@ -1,24 +1,24 @@ -.sticky { - // This class is required to pass ThemeCheck. -} - -.no-results.not-found > *:first-child { - margin-bottom: calc(3 * var(--global--spacing-vertical)); -} - -// Styling for wp_link_pages. -.page-links { - clear: both; - - .post-page-numbers { - display: inline-block; - margin-left: calc(0.66 * var(--global--spacing-unit)); - margin-right: calc(0.66 * var(--global--spacing-unit)); - min-width: 44px; - min-height: 44px; - - &:first-child { - margin-left: 0; - } - } -} +.sticky { + // This class is required to pass ThemeCheck. +} + +.no-results.not-found > *:first-child { + margin-bottom: calc(3 * var(--global--spacing-vertical)); +} + +// Styling for wp_link_pages. +.page-links { + clear: both; + + .post-page-numbers { + display: inline-block; + margin-left: calc(0.66 * var(--global--spacing-unit)); + margin-right: calc(0.66 * var(--global--spacing-unit)); + min-width: 44px; + min-height: 44px; + + &:first-child { + margin-left: 0; + } + } +} diff --git a/themes/twentytwentyone/assets/sass/06-components/search.scss b/themes/twentytwentyone/assets/sass/06-components/search.scss index 9807d23b..a4ccf52f 100644 --- a/themes/twentytwentyone/assets/sass/06-components/search.scss +++ b/themes/twentytwentyone/assets/sass/06-components/search.scss @@ -1,3 +1,3 @@ -.search-no-results .page-content { - margin-top: calc(3 * var(--global--spacing-vertical)); -} +.search-no-results .page-content { + margin-top: calc(3 * var(--global--spacing-vertical)); +} diff --git a/themes/twentytwentyone/assets/sass/06-components/single.scss b/themes/twentytwentyone/assets/sass/06-components/single.scss index 3d66cb7f..239aa856 100644 --- a/themes/twentytwentyone/assets/sass/06-components/single.scss +++ b/themes/twentytwentyone/assets/sass/06-components/single.scss @@ -1,17 +1,17 @@ -.singular .entry-header { - border-bottom: 3px solid var(--global--color-border); - padding-bottom: calc(2 * var(--global--spacing-vertical)); - margin-bottom: calc(3 * var(--global--spacing-vertical)); -} - -.home .entry-header { - border-bottom: none; - padding-bottom: 0; - margin-bottom: 0; -} - -.singular .has-post-thumbnail .entry-header { - border-bottom: none; - padding-bottom: calc(1.3 * var(--global--spacing-vertical)); - margin-bottom: 0; -} +.singular .entry-header { + border-bottom: 3px solid var(--global--color-border); + padding-bottom: calc(2 * var(--global--spacing-vertical)); + margin-bottom: calc(3 * var(--global--spacing-vertical)); +} + +.home .entry-header { + border-bottom: none; + padding-bottom: 0; + margin-bottom: 0; +} + +.singular .has-post-thumbnail .entry-header { + border-bottom: none; + padding-bottom: calc(1.3 * var(--global--spacing-vertical)); + margin-bottom: 0; +} diff --git a/themes/twentytwentyone/assets/sass/06-components/widgets.scss b/themes/twentytwentyone/assets/sass/06-components/widgets.scss index 7a5f4e50..2c9e9ccc 100644 --- a/themes/twentytwentyone/assets/sass/06-components/widgets.scss +++ b/themes/twentytwentyone/assets/sass/06-components/widgets.scss @@ -1,133 +1,126 @@ -.widget-area { - @extend %responsive-alignwide-width; - margin-top: calc(6 * var(--global--spacing-vertical)); - padding-bottom: calc(var(--global--spacing-vertical) / 3); - color: var(--footer--color-text); - font-size: var(--footer--font-size); - font-family: var(--footer--font-family); - - @include media(laptop) { - display: grid; - grid-template-columns: repeat(2, 1fr); - column-gap: calc(2 * var(--global--spacing-horizontal)); - } - - @include media(wide) { - grid-template-columns: repeat(3, 1fr); - } - - @include media(mobile-only) { - margin-top: calc(3 * var(--global--spacing-vertical)); - } - - ul { - list-style-type: none; - padding: 0; - - li { - line-height: var(--widget--line-height-list); - } - - &.sub-menu, - &.children { - margin-left: var(--widget--spacing-menu); - } - - .sub-menu-toggle { - display: none; - } - } - - a { - color: var(--footer--color-link); - text-decoration: underline; - text-decoration-style: solid; - text-decoration-color: currentColor; - - &:link, - &:visited, - &:active { - color: var(--footer--color-link); - } - - &:hover { - color: var(--footer--color-link-hover); - text-decoration-style: dotted; - } - } - - .wp-block-social-links { - - &.alignright { - margin-top: var(--global--spacing-vertical); - justify-content: flex-end; - } - - &.alignleft { - margin-top: var(--global--spacing-vertical); - } - } - - &:after { - content: ""; - display: table; - clear: both; - } -} - -.widget-title { - font-size: var(--global--font-size-sm); - font-weight: var(--widget--font-weight-title); - line-height: var(--widget--line-height-title); -} - -// Search widget styles -.search-form { - display: flex; - flex-wrap: wrap; - margin: auto; - max-width: var(--responsive--aligndefault-width); - - > label { - width: 100%; - margin-bottom: 0; - font-weight: var(--form--label-weight); - } - - .search-field { - flex-grow: 1; - max-width: inherit; - margin-top: calc(var(--global--spacing-vertical) / 3); - margin-right: calc(0.66 * var(--global--spacing-horizontal)); - } - - .search-submit { - margin-top: calc(var(--global--spacing-vertical) / 3); - margin-left: 10px; - } -} - -.widget_search > .search-form { - - .search-field { - margin-right: calc(-1 * var(--button--border-width)); - -webkit-appearance: none; - margin-bottom: calc(0.5 * var(--global--spacing-vertical)); - } - - .search-submit { - margin-left: 0; - background-color: transparent; - color: var(--button--color-text-hover); - margin-bottom: calc(0.5 * var(--global--spacing-vertical)); - - &:hover { - background-color: var(--button--color-background); - color: var(--button--color-text); - } - } -} - -.widget_rss a.rsswidget .rss-widget-icon { - display: none; -} +.widget-area { + @extend %responsive-alignwide-width; + margin-top: calc(6 * var(--global--spacing-vertical)); + padding-bottom: calc(var(--global--spacing-vertical) / 3); + color: var(--footer--color-text); + font-size: var(--footer--font-size); + font-family: var(--footer--font-family); + + @include media(laptop) { + display: grid; + grid-template-columns: repeat(2, 1fr); + column-gap: calc(2 * var(--global--spacing-horizontal)); + } + + @include media(wide) { + grid-template-columns: repeat(3, 1fr); + } + + @include media(mobile-only) { + margin-top: calc(3 * var(--global--spacing-vertical)); + } + + ul { + list-style-type: none; + padding: 0; + + li { + line-height: var(--widget--line-height-list); + } + + &.sub-menu, + &.children { + margin-left: var(--widget--spacing-menu); + } + + .sub-menu-toggle { + display: none; + } + } + + a { + color: var(--footer--color-link); + text-decoration: underline; + text-decoration-style: solid; + text-decoration-color: currentColor; + + &:link, + &:visited, + &:active { + color: var(--footer--color-link); + } + + &:hover { + color: var(--footer--color-link-hover); + text-decoration-style: dotted; + } + } + + .wp-block-social-links { + + &.alignright { + margin-top: var(--global--spacing-vertical); + justify-content: flex-end; + } + + &.alignleft { + margin-top: var(--global--spacing-vertical); + } + } + + &:after { + content: ""; + display: table; + clear: both; + } +} + +.widget-title { + font-size: var(--global--font-size-sm); + font-weight: var(--widget--font-weight-title); + line-height: var(--widget--line-height-title); +} + +// Search widget styles +.search-form { + display: flex; + flex-wrap: wrap; + margin: auto; + max-width: var(--responsive--aligndefault-width); + + > label { + width: 100%; + margin-bottom: 0; + font-weight: var(--form--label-weight); + } + + .search-field { + flex-grow: 1; + max-width: inherit; + margin-top: calc(var(--global--spacing-vertical) / 3); + margin-right: calc(0.66 * var(--global--spacing-horizontal)); + } + + .search-submit { + margin-top: calc(var(--global--spacing-vertical) / 3); + margin-left: 10px; + } +} + +.widget_search > .search-form { + + .search-field { + margin-right: calc(-1 * var(--button--border-width)); + -webkit-appearance: none; + margin-bottom: calc(0.5 * var(--global--spacing-vertical)); + } + + .search-submit { + margin-left: 0; + margin-bottom: calc(0.5 * var(--global--spacing-vertical)); + } +} + +.widget_rss a.rsswidget .rss-widget-icon { + display: none; +} diff --git a/themes/twentytwentyone/assets/sass/07-utilities/a11y.scss b/themes/twentytwentyone/assets/sass/07-utilities/a11y.scss index 314e3542..6c56a19f 100644 --- a/themes/twentytwentyone/assets/sass/07-utilities/a11y.scss +++ b/themes/twentytwentyone/assets/sass/07-utilities/a11y.scss @@ -1,48 +1,48 @@ -.screen-reader-text { - border: 0; - clip: rect(1px, 1px, 1px, 1px); - -webkit-clip-path: inset(50%); - clip-path: inset(50%); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute !important; - width: 1px; - word-wrap: normal !important; - word-break: normal; -} - -.skip-link:focus { - background-color: #f1f1f1; - border-radius: 3px; - box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); - clip: auto !important; - -webkit-clip-path: none; - clip-path: none; - color: #21759b; - display: block; - font-size: 0.875rem; - font-weight: 700; - height: auto; - left: 5px; - line-height: normal; - padding: 15px 23px 14px; - text-decoration: none; - top: 5px; - width: auto; - z-index: 100000; -} - -/* Do not show the outline on the skip link target. */ -#content[tabindex="-1"]:focus { - outline: 0; -} - -@media (prefers-reduced-motion) { - - * { - transition-delay: 0s !important; - transition-duration: 0s !important; - } -} +.screen-reader-text { + border: 0; + clip: rect(1px, 1px, 1px, 1px); + -webkit-clip-path: inset(50%); + clip-path: inset(50%); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute !important; + width: 1px; + word-wrap: normal !important; + word-break: normal; +} + +.skip-link:focus { + background-color: #f1f1f1; + border-radius: 3px; + box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); + clip: auto !important; + -webkit-clip-path: none; + clip-path: none; + color: #21759b; + display: block; + font-size: 0.875rem; + font-weight: 700; + height: auto; + left: 5px; + line-height: normal; + padding: 15px 23px 14px; + text-decoration: none; + top: 5px; + width: auto; + z-index: 100000; +} + +/* Do not show the outline on the skip link target. */ +#content[tabindex="-1"]:focus { + outline: 0; +} + +@media (prefers-reduced-motion) { + + * { + transition-delay: 0s !important; + transition-duration: 0s !important; + } +} diff --git a/themes/twentytwentyone/assets/sass/07-utilities/color-palette.scss b/themes/twentytwentyone/assets/sass/07-utilities/color-palette.scss index 9d353fd5..5454e0ca 100644 --- a/themes/twentytwentyone/assets/sass/07-utilities/color-palette.scss +++ b/themes/twentytwentyone/assets/sass/07-utilities/color-palette.scss @@ -1,148 +1,277 @@ -// Gutenberg text color options - -.has-black-color[class] { - color: var(--global--color-black); -} - -.has-gray-color[class] { - color: var(--global--color-gray); -} - -.has-dark-gray-color[class] { - color: var(--global--color-dark-gray); -} - -.has-green-color[class] { - color: var(--global--color-green); -} - -.has-blue-color[class] { - color: var(--global--color-blue); -} - -.has-purple-color[class] { - color: var(--global--color-purple); -} - -.has-red-color[class] { - color: var(--global--color-red); -} - -.has-orange-color[class] { - color: var(--global--color-orange); -} - -.has-yellow-color[class] { - color: var(--global--color-yellow); -} - -.has-white-color[class] { - color: var(--global--color-white); -} - -// Gutenberg background-color options -.has-background { - - a, - p, - h1, - h2, - h3, - h4, - h5, - h6 { - color: currentColor; - } -} - -.has-black-background-color[class] { - background-color: var(--global--color-black); -} - -.has-gray-background-color[class] { - background-color: var(--global--color-gray); -} - -.has-dark-gray-background-color[class] { - background-color: var(--global--color-dark-gray); -} - -.has-green-background-color[class] { - background-color: var(--global--color-green); -} - -.has-blue-background-color[class] { - background-color: var(--global--color-blue); -} - -.has-purple-background-color[class] { - background-color: var(--global--color-purple); -} - -.has-red-background-color[class] { - background-color: var(--global--color-red); -} - -.has-orange-background-color[class] { - background-color: var(--global--color-orange); -} - -.has-yellow-background-color[class] { - background-color: var(--global--color-yellow); -} - -.has-white-background-color[class] { - background-color: var(--global--color-white); -} - -:not(.has-text-color) { - - &.has-black-background-color[class], - &.has-gray-background-color[class], - &.has-dark-gray-background-color[class] { - color: var(--global--color-white); - } - - &.has-green-background-color[class], - &.has-blue-background-color[class], - &.has-purple-background-color[class], - &.has-red-background-color[class], - &.has-orange-background-color[class], - &.has-yellow-background-color[class], - &.has-white-background-color[class] { - color: var(--global--color-dark-gray); - } -} - -// Custom gradients -.has-purple-to-yellow-gradient-background { - background: linear-gradient(160deg, var(--global--color-purple), var(--global--color-yellow)); -} - -.has-yellow-to-purple-gradient-background { - background: linear-gradient(160deg, var(--global--color-yellow), var(--global--color-purple)); -} - -.has-green-to-yellow-gradient-background { - background: linear-gradient(160deg, var(--global--color-green), var(--global--color-yellow)); -} - -.has-yellow-to-green-gradient-background { - background: linear-gradient(160deg, var(--global--color-yellow), var(--global--color-green)); -} - -.has-red-to-yellow-gradient-background { - background: linear-gradient(160deg, var(--global--color-red), var(--global--color-yellow)); -} - -.has-yellow-to-red-gradient-background { - background: linear-gradient(160deg, var(--global--color-yellow), var(--global--color-red)); -} - -.has-purple-to-red-gradient-background { - background: linear-gradient(160deg, var(--global--color-purple), var(--global--color-red)); -} - -.has-red-to-purple-gradient-background { - background: linear-gradient(160deg, var(--global--color-red), var(--global--color-purple)); -} +// Gutenberg text color options + +.has-black-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-primary: var(--global--color-black, #000000); + color: var(--local--color-primary); + } + color: var(--global--color-black); +} + +.has-gray-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-primary: var(--global--color-gray, #000000); + color: var(--local--color-primary); + } + color: var(--global--color-gray); +} + +.has-dark-gray-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-primary: var(--global--color-dark-gray, #000000); + color: var(--local--color-primary); + } + color: var(--global--color-dark-gray); +} + +.has-green-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-primary: var(--global--color-green, #FFFFFF); + color: var(--local--color-primary); + } + color: var(--global--color-green); +} + +.has-blue-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-primary: var(--global--color-blue, #FFFFFF); + color: var(--local--color-primary); + } + color: var(--global--color-blue); +} + +.has-purple-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-primary: var(--global--color-purple, #FFFFFF); + color: var(--local--color-primary); + } + color: var(--global--color-purple); +} + +.has-red-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-primary: var(--global--color-red, #FFFFFF); + color: var(--local--color-primary); + } + color: var(--global--color-red); +} + +.has-orange-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-primary: var(--global--color-orange, #FFFFFF); + color: var(--local--color-primary); + } + color: var(--global--color-orange); +} + +.has-yellow-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-primary: var(--global--color-yellow, #FFFFFF); + color: var(--local--color-primary); + } + color: var(--global--color-yellow); +} + +.has-white-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-primary: var(--global--color-white, #FFFFFF); + color: var(--local--color-primary); + } + color: var(--global--color-white); +} + +// Gutenberg background-color options +.has-background { + + a, + p, + h1, + h2, + h3, + h4, + h5, + h6 { + color: currentColor; + } +} + +.has-black-background-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-background: var(--global--color-black, #000000); + background-color: var(--local--color-background); + } + background-color: var(--global--color-black); +} + +.has-dark-gray-background-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-background: var(--global--color-dark-gray, #000000); + background-color: var(--local--color-background); + } + background-color: var(--global--color-dark-gray); +} + +.has-gray-background-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-background: var(--global--color-gray, #000000); + background-color: var(--local--color-background); + } + background-color: var(--global--color-gray); +} + +.has-light-gray-background-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-background: var(--global--color-light-gray, #FFFFFF); + background-color: var(--local--color-background); + } + background-color: var(--global--color-light-gray); +} + +.has-green-background-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-background: var(--global--color-green, #FFFFFF); + background-color: var(--local--color-background); + } + background-color: var(--global--color-green); +} + +.has-blue-background-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-background: var(--global--color-blue, #FFFFFF); + background-color: var(--local--color-background); + } + background-color: var(--global--color-blue); +} + +.has-purple-background-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-background: var(--global--color-purple, #FFFFFF); + background-color: var(--local--color-background); + } + background-color: var(--global--color-purple); +} + +.has-red-background-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-background: var(--global--color-red, #FFFFFF); + background-color: var(--local--color-background); + } + background-color: var(--global--color-red); +} + +.has-orange-background-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-background: var(--global--color-orange, #FFFFFF); + background-color: var(--local--color-background); + } + background-color: var(--global--color-orange); +} + +.has-yellow-background-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-background: var(--global--color-yellow, #FFFFFF); + background-color: var(--local--color-background); + } + background-color: var(--global--color-yellow); +} + +.has-white-background-color[class] { + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-background: var(--global--color-white, #FFFFFF); + background-color: var(--local--color-background); + } + background-color: var(--global--color-white); +} + +.has-background:not(.has-text-color) { + + &.has-black-background-color[class], + &.has-gray-background-color[class], + &.has-dark-gray-background-color[class] { + color: var(--global--color-white); + + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-primary: var(--global--color-background, #FFFFFF); + // Reverse the local foreground color in darkmode + .is-dark-theme & { + --local--color-primary: var(--global--color-primary, #000000); + } + color: var(--local--color-primary, var(--global--color-primary)); + } + } + + &.has-green-background-color[class], + &.has-blue-background-color[class], + &.has-purple-background-color[class], + &.has-red-background-color[class], + &.has-orange-background-color[class], + &.has-yellow-background-color[class], + &.has-white-background-color[class] { + color: var(--global--color-dark-gray); + + // Localize CSS-variables to limit relationship scope + > [class*="__inner-container"] { + --local--color-primary: var(--global--color-primary, #000000); + // Reverse the local foreground color in darkmode + .is-dark-theme & { + --local--color-primary: var(--global--color-background, #FFFFFF); + } + color: var(--local--color-primary, var(--global--color-primary)); + } + } +} + +// Custom gradients +.has-purple-to-yellow-gradient-background { + background: linear-gradient(160deg, var(--global--color-purple), var(--global--color-yellow)); +} + +.has-yellow-to-purple-gradient-background { + background: linear-gradient(160deg, var(--global--color-yellow), var(--global--color-purple)); +} + +.has-green-to-yellow-gradient-background { + background: linear-gradient(160deg, var(--global--color-green), var(--global--color-yellow)); +} + +.has-yellow-to-green-gradient-background { + background: linear-gradient(160deg, var(--global--color-yellow), var(--global--color-green)); +} + +.has-red-to-yellow-gradient-background { + background: linear-gradient(160deg, var(--global--color-red), var(--global--color-yellow)); +} + +.has-yellow-to-red-gradient-background { + background: linear-gradient(160deg, var(--global--color-yellow), var(--global--color-red)); +} + +.has-purple-to-red-gradient-background { + background: linear-gradient(160deg, var(--global--color-purple), var(--global--color-red)); +} + +.has-red-to-purple-gradient-background { + background: linear-gradient(160deg, var(--global--color-red), var(--global--color-purple)); +} diff --git a/themes/twentytwentyone/assets/sass/07-utilities/ie.scss b/themes/twentytwentyone/assets/sass/07-utilities/ie.scss index d678cc65..7df9025f 100644 --- a/themes/twentytwentyone/assets/sass/07-utilities/ie.scss +++ b/themes/twentytwentyone/assets/sass/07-utilities/ie.scss @@ -1,53 +1,53 @@ -.is-IE { - - &.is-dark-theme { - color: #fff; - - *, - a, - .site-description, - .entry-title, - .entry-footer, - .widget-area, - .post-navigation .meta-nav, - .footer-navigation-wrapper li a:link, - .site-footer > .site-info, - .site-footer > .site-info a, - .site-footer > .site-info a:visited { - color: #fff; - } - - .sub-menu-toggle svg, - .sub-menu-toggle path, - .post-navigation .meta-nav svg, - .post-navigation .meta-nav path { - fill: #fff; - } - - .primary-navigation > div > .menu-wrapper > li > .sub-menu li { - background: #000; - } - - &.primary-navigation-open { - @include media(mobile-only) { - - .primary-navigation > .primary-menu-container, - .menu-button-container { - background-color: #000; - } - } - } - - .skip-link:focus { - color: #21759b; - } - } - - .navigation .nav-links { - display: block; - } - - .post-thumbnail .wp-post-image { - min-width: auto; - } -} +.is-IE { + + &.is-dark-theme { + color: #fff; + + *, + a, + .site-description, + .entry-title, + .entry-footer, + .widget-area, + .post-navigation .meta-nav, + .footer-navigation-wrapper li a:link, + .site-footer > .site-info, + .site-footer > .site-info a, + .site-footer > .site-info a:visited { + color: #fff; + } + + .sub-menu-toggle svg, + .sub-menu-toggle path, + .post-navigation .meta-nav svg, + .post-navigation .meta-nav path { + fill: #fff; + } + + .primary-navigation > div > .menu-wrapper > li > .sub-menu li { + background: #000; + } + + &.primary-navigation-open { + @include media(mobile-only) { + + .primary-navigation > .primary-menu-container, + .menu-button-container { + background-color: #000; + } + } + } + + .skip-link:focus { + color: #21759b; + } + } + + .navigation .nav-links { + display: block; + } + + .post-thumbnail .wp-post-image { + min-width: auto; + } +} diff --git a/themes/twentytwentyone/assets/sass/07-utilities/measure.scss b/themes/twentytwentyone/assets/sass/07-utilities/measure.scss index 27247884..38026ed8 100644 --- a/themes/twentytwentyone/assets/sass/07-utilities/measure.scss +++ b/themes/twentytwentyone/assets/sass/07-utilities/measure.scss @@ -1,22 +1,22 @@ -// Measure -// - The width of a line of text, in characters, is known as its measure. - -header *, -main *, -footer * { - max-width: var(--global--spacing-measure); -} - -html, -body, -div, -header, -nav, -article, -figure, -hr, -main, -section, -footer { - max-width: none; -} +// Measure +// - The width of a line of text, in characters, is known as its measure. + +header *, +main *, +footer * { + max-width: var(--global--spacing-measure); +} + +html, +body, +div, +header, +nav, +article, +figure, +hr, +main, +section, +footer { + max-width: none; +} diff --git a/themes/twentytwentyone/assets/sass/07-utilities/print.scss b/themes/twentytwentyone/assets/sass/07-utilities/print.scss index dbacbbbd..b1641566 100644 --- a/themes/twentytwentyone/assets/sass/07-utilities/print.scss +++ b/themes/twentytwentyone/assets/sass/07-utilities/print.scss @@ -1,184 +1,184 @@ -/* -Adding print support. The print styles are based on the the great work of -Andreas Hecht in https://www.jotform.com/blog/css-perfect-print-stylesheet-98272/. -*/ - -/*-------------------------------------------------------------- ->>> TABLE OF CONTENTS: ----------------------------------------------------------------- -# Margins & paddings -# Typography -# Page breaks -# Links -# Visibility ---------------------------------------------------------------*/ - -@media print { - - /* Margins & paddings */ - - @page { - margin: 2cm; - } - - .entry .entry-header, - .entry, - .single .site-main > article > .entry-footer { - margin-top: 0; - margin-bottom: 0; - } - - .site-footer .site-info { - margin: 0; - } - - .site-header { - padding: 0; - } - - /* Fonts */ - - body { - font: 13pt Georgia, "Times New Roman", Times, serif; // Fallback for browsers without CSS variables support. - font: 13pt var(--global--font-secondary, Georgia, "Times New Roman", Times, serif); - line-height: 1.3; - background: #fff !important; - color: #000; - } - - // Override color settings that changes the text to white. - .has-background-dark * { - color: #000 !important; - } - - h1, - .entry-title, - .singular .entry-title, - .page-title { - font-size: 22pt; - font-weight: bold; - } - - h2, - h3, - h4, - .has-regular-font-size, - .has-large-font-size, - h2.author-title, - p.author-bio, - .comments-title, - .archive-description { - font-size: 14pt; - margin-top: 25px; - } - - .comment-meta, - .comment-meta .comment-author .fn { - font-size: 13pt; - } - - /* Page breaks */ - - a { - page-break-inside: avoid; - } - - blockquote { - page-break-inside: avoid; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - page-break-after: avoid; - page-break-inside: avoid; - } - - img { - page-break-inside: avoid; - page-break-after: avoid; - } - - table, - pre, - figure { - page-break-inside: avoid; - } - - ul, - ol, - dl { - page-break-before: avoid; - } - - /* Links */ - - a:link, - a:visited, - a { - background: transparent; - font-weight: bold; - text-decoration: underline; - text-align: left; - } - - a[href^="http"]:after { - content: " < " attr(href) "> "; - } - - a:after > img { - content: ""; - } - - article a[href^="#"]:after { - content: ""; - } - - a:not(:local-link):after { // stylelint-disable-line selector-pseudo-class-no-unknown - content: " < " attr(href) "> "; - } - - .entry-title a:after { - content: "\a < " attr(href) "> "; - white-space: pre; - font-size: 14pt; - } - - .cat-links a:after, - .tags-links a:after, - .byline a:after, - .comment-metadata a:after, - .wp-block-calendar a:after, - .wp-block-tag-cloud a:after, - .page-links a:after { - content: ""; - } - - /* Visibility */ - .primary-navigation, - .site-title + .primary-navigation, - .footer-navigation, - .entry-footer, - .post-navigation, - .navigation.pagination, - .widget-area, - .edit-link, - .more-link, - .comment-reply, - .reply, - .comment .comment-metadata .edit-link, - .comment-respond, - #dark-mode-toggler { - display: none !important; - } - - .entry .entry-content .wp-block-button .wp-block-button__link, - .entry .entry-content .button, - .entry .entry-content .wp-block-file__button { - color: #000; - background: none; - } -} +/* +Adding print support. The print styles are based on the the great work of +Andreas Hecht in https://www.jotform.com/blog/css-perfect-print-stylesheet-98272/. +*/ + +/*-------------------------------------------------------------- +>>> TABLE OF CONTENTS: +---------------------------------------------------------------- +# Margins & paddings +# Typography +# Page breaks +# Links +# Visibility +--------------------------------------------------------------*/ + +@media print { + + /* Margins & paddings */ + + @page { + margin: 2cm; + } + + .entry .entry-header, + .entry, + .single .site-main > article > .entry-footer { + margin-top: 0; + margin-bottom: 0; + } + + .site-footer .site-info { + margin: 0; + } + + .site-header { + padding: 0; + } + + /* Fonts */ + + body { + font: 13pt Georgia, "Times New Roman", Times, serif; // Fallback for browsers without CSS variables support. + font: 13pt var(--global--font-secondary, Georgia, "Times New Roman", Times, serif); + line-height: 1.3; + background: #fff !important; + color: #000; + } + + // Override color settings that changes the text to white. + .has-background-dark * { + color: #000 !important; + } + + h1, + .entry-title, + .singular .entry-title, + .page-title { + font-size: 22pt; + font-weight: bold; + } + + h2, + h3, + h4, + .has-regular-font-size, + .has-large-font-size, + h2.author-title, + p.author-bio, + .comments-title, + .archive-description { + font-size: 14pt; + margin-top: 25px; + } + + .comment-meta, + .comment-meta .comment-author .fn { + font-size: 13pt; + } + + /* Page breaks */ + + a { + page-break-inside: avoid; + } + + blockquote { + page-break-inside: avoid; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + page-break-after: avoid; + page-break-inside: avoid; + } + + img { + page-break-inside: avoid; + page-break-after: avoid; + } + + table, + pre, + figure { + page-break-inside: avoid; + } + + ul, + ol, + dl { + page-break-before: avoid; + } + + /* Links */ + + a:link, + a:visited, + a { + background: transparent; + font-weight: bold; + text-decoration: underline; + text-align: left; + } + + a[href^="http"]:after { + content: " < " attr(href) "> "; + } + + a:after > img { + content: ""; + } + + article a[href^="#"]:after { + content: ""; + } + + a:not(:local-link):after { // stylelint-disable-line selector-pseudo-class-no-unknown + content: " < " attr(href) "> "; + } + + .entry-title a:after { + content: "\a < " attr(href) "> "; + white-space: pre; + font-size: 14pt; + } + + .cat-links a:after, + .tags-links a:after, + .byline a:after, + .comment-metadata a:after, + .wp-block-calendar a:after, + .wp-block-tag-cloud a:after, + .page-links a:after { + content: ""; + } + + /* Visibility */ + .primary-navigation, + .site-title + .primary-navigation, + .footer-navigation, + .entry-footer, + .post-navigation, + .navigation.pagination, + .widget-area, + .edit-link, + .more-link, + .comment-reply, + .reply, + .comment .comment-metadata .edit-link, + .comment-respond, + #dark-mode-toggler { + display: none !important; + } + + .entry .entry-content .wp-block-button .wp-block-button__link, + .entry .entry-content .button, + .entry .entry-content .wp-block-file__button { + color: #000; + background: none; + } +} diff --git a/themes/twentytwentyone/assets/sass/style-dark-mode.scss b/themes/twentytwentyone/assets/sass/style-dark-mode.scss index 8e7e8baa..f00df45c 100644 --- a/themes/twentytwentyone/assets/sass/style-dark-mode.scss +++ b/themes/twentytwentyone/assets/sass/style-dark-mode.scss @@ -1,108 +1,101 @@ -/* OS dark theme preference */ -@media only screen { - - .is-dark-theme.is-dark-theme { - --global--color-background: var(--global--color-dark-gray); - --global--color-primary: var(--global--color-light-gray); - --global--color-secondary: var(--global--color-light-gray); - --button--color-text: var(--global--color-background); - --button--color-text-hover: var(--global--color-secondary); - --button--color-text-active: var(--global--color-secondary); - --button--color-background: var(--global--color-secondary); - --button--color-background-active: var(--global--color-background); - --global--color-border: #9ea1a7; - - /* Block: Table */ - --table--stripes-border-color: rgba(240, 240, 240, 0.15); - --table--stripes-background-color: rgba(240, 240, 240, 0.15); - - .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button), - .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) .meta-nav { - background: #000; - color: #fff; - text-decoration: none; - } - - img { - filter: brightness(.85) contrast(1.1); - } - } - - .respect-color-scheme-preference.is-dark-theme body { - background-color: var(--global--color-background); - } - - #dark-mode-toggler { - cursor: pointer; - display: flex; - align-items: center; - justify-content: center; - font-size: var(--global--font-size-xs); - padding: 0.5em; - min-height: 44px; // A11y requirement for minimum clickable area. - min-width: max-content; - border: 2px solid currentColor; - box-shadow: none; - background: var(--button--color-text); - color: var(--button--color-background); - z-index: 9998; - - .no-js & { - display: none; - } - - &.fixed-bottom { - position: fixed; - bottom: 5px; - right: 5px; - transition: bottom 0.5s; - - &.hide:not(:focus) { - bottom: -80px; - } - } - - &.relative { - position: absolute; - height: 44px; - top: calc(2.4 * var(--global--spacing-vertical) - 44px); - right: calc(50vw - var(--responsive--alignwide-width) / 2 - 0.5em); - - .admin-bar & { - top: calc(2.4 * var(--global--spacing-vertical) - 44px + 32px); - - @media only screen and (max-width: 782px) { - top: calc(2.4 * var(--global--spacing-vertical) - 44px + 46px); - } - - @media only screen and (max-width: 481px) { - top: calc(2.4 * var(--global--spacing-vertical) - 44px + 26px); - } - } - - ~ nav { - - body:not(.primary-navigation-open) & { - @media only screen and (max-width: 481px) { - top: calc(44px + 44px); - } - } - } - } - - .primary-navigation-open & { - display: none; - } - - &:hover, - &:focus { - color: var(--button--color-background-active); - border: 2px solid var(--button--color-text-active); - background-color: var(--button--color-text-active); - } - - .is-IE & { - display: none; - } - } -} +/* OS dark theme preference */ +@media only screen { + + .is-dark-theme.is-dark-theme { + --global--color-background: var(--global--color-dark-gray); + --global--color-primary: var(--global--color-light-gray); + --global--color-secondary: var(--global--color-light-gray); + --button--color-text: var(--global--color-background); + --button--color-text-hover: var(--global--color-secondary); + --button--color-text-active: var(--global--color-secondary); + --button--color-background: var(--global--color-secondary); + --button--color-background-active: var(--global--color-background); + --global--color-border: #9ea1a7; + + /* Block: Table */ + --table--stripes-border-color: rgba(240, 240, 240, 0.15); + --table--stripes-background-color: rgba(240, 240, 240, 0.15); + + img { + filter: brightness(.85) contrast(1.1); + } + } + + .respect-color-scheme-preference.is-dark-theme body { + background-color: var(--global--color-background); + } + + #dark-mode-toggler { + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + font-size: var(--global--font-size-xs); + padding: 0.5em; + min-height: 44px; // A11y requirement for minimum clickable area. + min-width: max-content; + border: 2px solid currentColor; + box-shadow: none; + background: var(--button--color-text); + color: var(--button--color-background); + z-index: 9998; + + .no-js & { + display: none; + } + + &.fixed-bottom { + position: fixed; + bottom: 5px; + right: 5px; + transition: bottom 0.5s; + + &.hide:not(:focus) { + bottom: -80px; + } + } + + &.relative { + position: absolute; + height: 44px; + top: calc(2.4 * var(--global--spacing-vertical) - 44px); + right: calc(50vw - var(--responsive--alignwide-width) / 2 - 0.5em); + + .admin-bar & { + top: calc(2.4 * var(--global--spacing-vertical) - 44px + 32px); + + @media only screen and (max-width: 782px) { + top: calc(2.4 * var(--global--spacing-vertical) - 44px + 46px); + } + + @media only screen and (max-width: 481px) { + top: calc(2.4 * var(--global--spacing-vertical) - 44px + 26px); + } + } + + ~ nav { + + body:not(.primary-navigation-open) & { + @media only screen and (max-width: 481px) { + top: calc(44px + 44px); + } + } + } + } + + .primary-navigation-open & { + display: none; + } + + &:hover, + &:focus { + color: var(--button--color-background-active); + border: 2px solid var(--button--color-text-active); + background-color: var(--button--color-text-active); + } + + .is-IE & { + display: none; + } + } +} diff --git a/themes/twentytwentyone/assets/sass/style-editor.scss b/themes/twentytwentyone/assets/sass/style-editor.scss index 05cdac00..6106d38a 100644 --- a/themes/twentytwentyone/assets/sass/style-editor.scss +++ b/themes/twentytwentyone/assets/sass/style-editor.scss @@ -1,21 +1,21 @@ -/** - * These styles should be loaded by the Block Editor only - */ -@import "01-settings/fonts"; -@import "01-settings/global"; - -@import "02-tools/mixins"; -@import "02-tools/functions"; - -@import "03-generic/breakpoints"; - -@import "04-elements/blockquote"; -@import "04-elements/media"; -@import "04-elements/forms-editor"; -@import "04-elements/links"; - -@import "05-blocks/blocks-editor"; - -@import "06-components/editor"; - -@import "07-utilities/color-palette"; +/** + * These styles should be loaded by the Block Editor only + */ +@import "01-settings/fonts"; +@import "01-settings/global"; + +@import "02-tools/mixins"; +@import "02-tools/functions"; + +@import "03-generic/breakpoints"; + +@import "04-elements/blockquote"; +@import "04-elements/media"; +@import "04-elements/forms-editor"; +@import "04-elements/links"; + +@import "05-blocks/blocks-editor"; + +@import "06-components/editor"; + +@import "07-utilities/color-palette"; diff --git a/themes/twentytwentyone/assets/sass/style.scss b/themes/twentytwentyone/assets/sass/style.scss index 1591d620..085cfe19 100644 --- a/themes/twentytwentyone/assets/sass/style.scss +++ b/themes/twentytwentyone/assets/sass/style.scss @@ -1,122 +1,122 @@ -@import "01-settings/file-header"; - -/** - * SETTINGS - * File-header..........The file header for the themes style.css file. - * Fonts................Any font files, if the project needs specific fonts. - * Global...............Project-specific, globally available variables. - * - * TOOLS - * Functions............Global functions. - * Mixins...............Global mixins. - * - * GENERIC - * Normalize.css........Normalise browser defaults. - * Breakpoints..........Mixins and variables for responsive styles - * Vertical-margins.....Vertical spacing for the main components. - * Reset................Reset specific elements to make them easier to style in other contexts. - * Clearings............Clearings for the main components. - * - * ELEMENTS - * Blockquote...........Default blockquote. - * Forms................Element-level form styling. - * Headings.............H1–H6 - * Links................Default links. - * Lists................Default lists. - * Media................Images, Figure, Figcaption, Embed, iFrame, Objects, Video. - * - * BLOCKS - * Audio................Specific styles for the audio block. - * Button...............Specific styles for the button block. - * Code.................Specific styles for the code block. - * Columns..............Specific styles for the columns block. - * Cover................Specific styles for the cover block. - * File.................Specific styles for the file block. - * Gallery..............Specific styles for the gallery block. - * Group................Specific styles for the group block. - * Heading..............Specific styles for the heading block. - * Image................Specific styles for the image block. - * Latest comments......Specific styles for the latest comments block. - * Latest posts.........Specific styles for the latest posts block. - * Legacy...............Specific styles for the legacy gallery. - * List.................Specific styles for the list block. - * Media text...........Specific styles for the media and text block. - * Navigation...........Specific styles for the navigation block. - * Paragraph............Specific styles for the paragraph block. - * Pullquote............Specific styles for the pullquote block. - * Quote................Specific styles for the quote block. - * Search...............Specific styles for the search block. - * Separator............Specific styles for the separator block. - * Spacer...............Specific styles for the spacer block. - * Table................Specific styles for the table block. - * Verse................Specific styles for the verse block. - * Video................Specific styles for the video block. - * Utilities............Block alignments. - * - * COMPONENTS - * Header...............Header styles. - * Footer...............Footer styles. - * Comments.............Comment styles. - * Archives.............Archive styles. - * 404..................404 styles. - * Search...............Search styles. - * Navigation...........Navigation styles. - * Footer Navigation....Footer Navigation styles. - * Pagination...........Pagination styles. - * Single...............Single page and post styles. - * Posts and pages......Misc, sticky post styles. - * Entry................Entry, author biography. - * Widget...............Widget styles. - * Editor...............Editor styles. - * - * UTILITIES - * A11y.................Screen reader text, prefers reduced motion etc. - * Color Palette........Classes for the color palette colors. - * Editor Font Sizes....Editor Font Sizes. - * Measure..............The width of a line of text, in characters. - */ -// Print................Print styles - -/* Categories 01 to 03 are the basics. */ -@import "01-settings/fonts"; -@import "01-settings/global"; - -@import "02-tools/mixins"; -@import "02-tools/functions"; - -@import "03-generic/normalize"; -@import "03-generic/breakpoints"; -@import "03-generic/vertical-margins"; -@import "03-generic/reset"; -@import "03-generic/clearings"; - -/* Category 04 can contain any default HTML element. Do not add classes here, just give the elements some basic styles. */ -@import "04-elements/blockquote"; -@import "04-elements/forms"; -@import "04-elements/media"; -@import "04-elements/misc"; -@import "04-elements/links"; - -/* Category 05 is all about adjusting the default block styles to the given layout. I only added three blocks as examples. */ -@import "05-blocks/blocks"; - -/* Category 06 contains all "bigger" components which contain elements of the previous two categories like header, footer, page template, single template, comments section, archives, ... */ -@import "06-components/header"; -@import "06-components/footer"; -@import "06-components/single"; -@import "06-components/posts-and-pages"; -@import "06-components/entry"; -@import "06-components/archives"; -@import "06-components/404"; -@import "06-components/search"; -@import "06-components/comments"; -@import "06-components/navigation"; -@import "06-components/footer-navigation"; -@import "06-components/pagination"; -@import "06-components/widgets"; - -/* Category 07 is for any utility classes that are not assigned to a specific component. */ -@import "07-utilities/a11y"; -@import "07-utilities/color-palette"; -@import "07-utilities/measure"; -@import "07-utilities/ie"; +@import "01-settings/file-header"; + +/** + * SETTINGS + * File-header..........The file header for the themes style.css file. + * Fonts................Any font files, if the project needs specific fonts. + * Global...............Project-specific, globally available variables. + * + * TOOLS + * Functions............Global functions. + * Mixins...............Global mixins. + * + * GENERIC + * Normalize.css........Normalise browser defaults. + * Breakpoints..........Mixins and variables for responsive styles + * Vertical-margins.....Vertical spacing for the main components. + * Reset................Reset specific elements to make them easier to style in other contexts. + * Clearings............Clearings for the main components. + * + * ELEMENTS + * Blockquote...........Default blockquote. + * Forms................Element-level form styling. + * Headings.............H1–H6 + * Links................Default links. + * Lists................Default lists. + * Media................Images, Figure, Figcaption, Embed, iFrame, Objects, Video. + * + * BLOCKS + * Audio................Specific styles for the audio block. + * Button...............Specific styles for the button block. + * Code.................Specific styles for the code block. + * Columns..............Specific styles for the columns block. + * Cover................Specific styles for the cover block. + * File.................Specific styles for the file block. + * Gallery..............Specific styles for the gallery block. + * Group................Specific styles for the group block. + * Heading..............Specific styles for the heading block. + * Image................Specific styles for the image block. + * Latest comments......Specific styles for the latest comments block. + * Latest posts.........Specific styles for the latest posts block. + * Legacy...............Specific styles for the legacy gallery. + * List.................Specific styles for the list block. + * Media text...........Specific styles for the media and text block. + * Navigation...........Specific styles for the navigation block. + * Paragraph............Specific styles for the paragraph block. + * Pullquote............Specific styles for the pullquote block. + * Quote................Specific styles for the quote block. + * Search...............Specific styles for the search block. + * Separator............Specific styles for the separator block. + * Spacer...............Specific styles for the spacer block. + * Table................Specific styles for the table block. + * Verse................Specific styles for the verse block. + * Video................Specific styles for the video block. + * Utilities............Block alignments. + * + * COMPONENTS + * Header...............Header styles. + * Footer...............Footer styles. + * Comments.............Comment styles. + * Archives.............Archive styles. + * 404..................404 styles. + * Search...............Search styles. + * Navigation...........Navigation styles. + * Footer Navigation....Footer Navigation styles. + * Pagination...........Pagination styles. + * Single...............Single page and post styles. + * Posts and pages......Misc, sticky post styles. + * Entry................Entry, author biography. + * Widget...............Widget styles. + * Editor...............Editor styles. + * + * UTILITIES + * A11y.................Screen reader text, prefers reduced motion etc. + * Color Palette........Classes for the color palette colors. + * Editor Font Sizes....Editor Font Sizes. + * Measure..............The width of a line of text, in characters. + */ +// Print................Print styles + +/* Categories 01 to 03 are the basics. */ +@import "01-settings/fonts"; +@import "01-settings/global"; + +@import "02-tools/mixins"; +@import "02-tools/functions"; + +@import "03-generic/normalize"; +@import "03-generic/breakpoints"; +@import "03-generic/vertical-margins"; +@import "03-generic/reset"; +@import "03-generic/clearings"; + +/* Category 04 can contain any default HTML element. Do not add classes here, just give the elements some basic styles. */ +@import "04-elements/blockquote"; +@import "04-elements/forms"; +@import "04-elements/media"; +@import "04-elements/misc"; +@import "04-elements/links"; + +/* Category 05 is all about adjusting the default block styles to the given layout. I only added three blocks as examples. */ +@import "05-blocks/blocks"; + +/* Category 06 contains all "bigger" components which contain elements of the previous two categories like header, footer, page template, single template, comments section, archives, ... */ +@import "06-components/header"; +@import "06-components/footer"; +@import "06-components/single"; +@import "06-components/posts-and-pages"; +@import "06-components/entry"; +@import "06-components/archives"; +@import "06-components/404"; +@import "06-components/search"; +@import "06-components/comments"; +@import "06-components/navigation"; +@import "06-components/footer-navigation"; +@import "06-components/pagination"; +@import "06-components/widgets"; + +/* Category 07 is for any utility classes that are not assigned to a specific component. */ +@import "07-utilities/a11y"; +@import "07-utilities/color-palette"; +@import "07-utilities/measure"; +@import "07-utilities/ie"; diff --git a/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php b/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php index 7bd95689..4adfb13e 100644 --- a/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php +++ b/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php @@ -1,412 +1,412 @@ - in the dashboard. - add_filter( 'admin_body_class', array( $this, 'admin_body_classes' ) ); - - // Add the switch on the frontend & customizer. - add_action( 'wp_footer', array( $this, 'the_switch' ) ); - - // Add the privacy policy content. - add_action( 'admin_init', array( $this, 'add_privacy_policy_content' ) ); - } - - /** - * Editor custom color variables & scripts. - * - * @access public - * - * @since Twenty Twenty-One 1.0 - * - * @return void - */ - public function editor_custom_color_variables() { - if ( ! $this->switch_should_render() ) { - return; - } - $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); - $should_respect_color_scheme = get_theme_mod( 'respect_user_color_preference', false ); - if ( $should_respect_color_scheme && Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( $background_color ) > 127 ) { - // Add Dark Mode variable overrides. - wp_add_inline_style( - 'twenty-twenty-one-custom-color-overrides', - '.is-dark-theme.is-dark-theme .editor-styles-wrapper { --global--color-background: var(--global--color-dark-gray); --global--color-primary: var(--global--color-light-gray); --global--color-secondary: var(--global--color-light-gray); --button--color-text: var(--global--color-background); --button--color-text-hover: var(--global--color-secondary); --button--color-text-active: var(--global--color-secondary); --button--color-background: var(--global--color-secondary); --button--color-background-active: var(--global--color-background); --global--color-border: #9ea1a7; --table--stripes-border-color: rgba(240, 240, 240, 0.15); --table--stripes-background-color: rgba(240, 240, 240, 0.15); }' - ); - } - wp_enqueue_script( - 'twentytwentyone-dark-mode-support-toggle', - get_template_directory_uri() . '/assets/js/dark-mode-toggler.js', - array(), - '1.0.0', - true - ); - - wp_enqueue_script( - 'twentytwentyone-editor-dark-mode-support', - get_template_directory_uri() . '/assets/js/editor-dark-mode-support.js', - array( 'twentytwentyone-dark-mode-support-toggle' ), - '1.0.0', - true - ); - } - - /** - * Enqueue scripts and styles. - * - * @access public - * - * @since Twenty Twenty-One 1.0 - * - * @return void - */ - public function enqueue_scripts() { - if ( ! $this->switch_should_render() ) { - return; - } - $url = get_template_directory_uri() . '/assets/css/style-dark-mode.css'; - if ( is_rtl() ) { - $url = get_template_directory_uri() . '/assets/css/style-dark-mode-rtl.css'; - } - wp_enqueue_style( 'tt1-dark-mode', $url, array( 'twenty-twenty-one-style' ), wp_get_theme()->get( 'Version' ) ); // @phpstan-ignore-line. Version is always a string. - } - - /** - * Enqueue scripts for the customizer. - * - * @access public - * - * @since Twenty Twenty-One 1.0 - * - * @return void - */ - public function customize_controls_enqueue_scripts() { - if ( ! $this->switch_should_render() ) { - return; - } - wp_enqueue_script( - 'twentytwentyone-customize-controls', - get_template_directory_uri() . '/assets/js/customize.js', - array( 'customize-base', 'customize-controls', 'underscore', 'jquery', 'twentytwentyone-customize-helpers' ), - '1.0.0', - true - ); - } - - /** - * Register customizer options. - * - * @access public - * - * @since Twenty Twenty-One 1.0 - * - * @param WP_Customize_Manager $wp_customize Theme Customizer object. - * - * @return void - */ - public function customizer_controls( $wp_customize ) { - - $colors_section = $wp_customize->get_section( 'colors' ); - if ( is_object( $colors_section ) ) { - $colors_section->title = __( 'Colors & Dark Mode', 'twentytwentyone' ); - } - - // Custom notice control. - include_once get_theme_file_path( 'classes/class-twenty-twenty-one-customize-notice-control.php' ); // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound - - $wp_customize->add_setting( - 'respect_user_color_preference_notice', - array( - 'capability' => 'edit_theme_options', - 'default' => '', - 'sanitize_callback' => '__return_empty_string', - ) - ); - - $wp_customize->add_control( - new Twenty_Twenty_One_Customize_Notice_Control( - $wp_customize, - 'respect_user_color_preference_notice', - array( - 'section' => 'colors', - 'priority' => 100, - 'active_callback' => function() { - return 127 >= Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) ); - }, - ) - ) - ); - - $wp_customize->add_setting( - 'respect_user_color_preference', - array( - 'capability' => 'edit_theme_options', - 'default' => false, - 'sanitize_callback' => function( $value ) { - return (bool) $value; - }, - ) - ); - - $description = '

'; - $description .= sprintf( - /* translators: %s: Twenty Twenty-One support article URL. */ - __( 'Dark Mode is a device setting. If a visitor to your site requests it, your site will be shown with a dark background and light text. Learn more about Dark Mode.', 'twentytwentyone' ), - esc_url( __( 'https://wordpress.org/support/article/twenty-twenty-one/#dark-mode-support', 'twentytwentyone' ) ) - ); - $description .= '

'; - $description .= '

' . __( 'Dark Mode can also be turned on and off with a button that you can find in the bottom right corner of the page.', 'twentytwentyone' ) . '

'; - - $wp_customize->add_control( - 'respect_user_color_preference', - array( - 'type' => 'checkbox', - 'section' => 'colors', - 'label' => esc_html__( 'Dark Mode support', 'twentytwentyone' ), - 'priority' => 110, - 'description' => $description, - 'active_callback' => function( $value ) { - return 127 < Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) ); - }, - ) - ); - - // Add partial for background_color. - $wp_customize->selective_refresh->add_partial( - 'background_color', - array( - 'selector' => '#dark-mode-toggler', - 'container_inclusive' => true, - 'render_callback' => function() { - $attrs = ( $this->switch_should_render() ) ? array() : array( 'style' => 'display:none;' ); - $this->the_html( $attrs ); - }, - ) - ); - } - - /** - * Calculate classes for the main element. - * - * @access public - * - * @since Twenty Twenty-One 1.0 - * - * @param string $classes The classes for element. - * - * @return string - */ - public function html_classes( $classes ) { - if ( ! $this->switch_should_render() ) { - return $classes; - } - - $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); - $should_respect_color_scheme = get_theme_mod( 'respect_user_color_preference', false ); - if ( $should_respect_color_scheme && 127 <= Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( $background_color ) ) { - return ( $classes ) ? ' respect-color-scheme-preference' : 'respect-color-scheme-preference'; - } - - return $classes; - } - - /** - * Adds a class to the element in the editor to accommodate dark-mode. - * - * @access public - * - * @since Twenty Twenty-One 1.0 - * - * @param string $classes The admin body-classes. - * - * @return string - */ - public function admin_body_classes( $classes ) { - if ( ! $this->switch_should_render() ) { - return $classes; - } - - global $current_screen; - if ( empty( $current_screen ) ) { - set_current_screen(); - } - - if ( $current_screen->is_block_editor() ) { - $should_respect_color_scheme = get_theme_mod( 'respect_user_color_preference', false ); - $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); - - if ( $should_respect_color_scheme && Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( $background_color ) > 127 ) { - $classes .= ' twentytwentyone-supports-dark-theme'; - } - } - - return $classes; - } - - /** - * Determine if we want to print the dark-mode switch or not. - * - * @access public - * - * @since Twenty Twenty-One 1.0 - * - * @return bool - */ - public function switch_should_render() { - global $is_IE; - return ( - get_theme_mod( 'respect_user_color_preference', false ) && - ! $is_IE && - 127 <= Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) ) - ); - } - - /** - * Add night/day switch. - * - * @access public - * - * @since Twenty Twenty-One 1.0 - * - * @return void - */ - public function the_switch() { - if ( ! $this->switch_should_render() ) { - return; - } - $this->the_html(); - $this->the_script(); - } - - /** - * Print the dark-mode switch HTML. - * - * Inspired from https://codepen.io/aaroniker/pen/KGpXZo (MIT-licensed) - * - * @access public - * - * @since Twenty Twenty-One 1.0 - * - * @param array $attrs The attributes to add to our '; - ?> - - - '; - include get_template_directory() . '/assets/js/dark-mode-toggler.js'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude - echo ''; - } - - /** - * Adds information to the privacy policy. - * - * @access public - * - * @since Twenty Twenty-One 1.0 - * - * @return void - */ - public function add_privacy_policy_content() { - if ( ! function_exists( 'wp_add_privacy_policy_content' ) ) { - return; - } - $content = '

' . __( 'Twenty Twenty-One uses LocalStorage when Dark Mode support is enabled.', 'twentytwentyone' ) . '

' - . '' . __( 'Suggested text:', 'twentytwentyone' ) . ' ' - . __( 'This website uses LocalStorage to save the setting when Dark Mode support is turned on or off.
LocalStorage is necessary for the setting to work and is only used when a user clicks on the Dark Mode button.
No data is saved in the database or transferred.', 'twentytwentyone' ); - wp_add_privacy_policy_content( 'Twenty Twenty-One', wp_kses_post( wpautop( $content, false ) ) ); - } - -} + in the dashboard. + add_filter( 'admin_body_class', array( $this, 'admin_body_classes' ) ); + + // Add the switch on the frontend & customizer. + add_action( 'wp_footer', array( $this, 'the_switch' ) ); + + // Add the privacy policy content. + add_action( 'admin_init', array( $this, 'add_privacy_policy_content' ) ); + } + + /** + * Editor custom color variables & scripts. + * + * @access public + * + * @since Twenty Twenty-One 1.0 + * + * @return void + */ + public function editor_custom_color_variables() { + if ( ! $this->switch_should_render() ) { + return; + } + $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); + $should_respect_color_scheme = get_theme_mod( 'respect_user_color_preference', false ); + if ( $should_respect_color_scheme && Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( $background_color ) > 127 ) { + // Add Dark Mode variable overrides. + wp_add_inline_style( + 'twenty-twenty-one-custom-color-overrides', + '.is-dark-theme.is-dark-theme .editor-styles-wrapper { --global--color-background: var(--global--color-dark-gray); --global--color-primary: var(--global--color-light-gray); --global--color-secondary: var(--global--color-light-gray); --button--color-text: var(--global--color-background); --button--color-text-hover: var(--global--color-secondary); --button--color-text-active: var(--global--color-secondary); --button--color-background: var(--global--color-secondary); --button--color-background-active: var(--global--color-background); --global--color-border: #9ea1a7; --table--stripes-border-color: rgba(240, 240, 240, 0.15); --table--stripes-background-color: rgba(240, 240, 240, 0.15); }' + ); + } + wp_enqueue_script( + 'twentytwentyone-dark-mode-support-toggle', + get_template_directory_uri() . '/assets/js/dark-mode-toggler.js', + array(), + '1.0.0', + true + ); + + wp_enqueue_script( + 'twentytwentyone-editor-dark-mode-support', + get_template_directory_uri() . '/assets/js/editor-dark-mode-support.js', + array( 'twentytwentyone-dark-mode-support-toggle' ), + '1.0.0', + true + ); + } + + /** + * Enqueue scripts and styles. + * + * @access public + * + * @since Twenty Twenty-One 1.0 + * + * @return void + */ + public function enqueue_scripts() { + if ( ! $this->switch_should_render() ) { + return; + } + $url = get_template_directory_uri() . '/assets/css/style-dark-mode.css'; + if ( is_rtl() ) { + $url = get_template_directory_uri() . '/assets/css/style-dark-mode-rtl.css'; + } + wp_enqueue_style( 'tt1-dark-mode', $url, array( 'twenty-twenty-one-style' ), wp_get_theme()->get( 'Version' ) ); // @phpstan-ignore-line. Version is always a string. + } + + /** + * Enqueue scripts for the customizer. + * + * @access public + * + * @since Twenty Twenty-One 1.0 + * + * @return void + */ + public function customize_controls_enqueue_scripts() { + if ( ! $this->switch_should_render() ) { + return; + } + wp_enqueue_script( + 'twentytwentyone-customize-controls', + get_template_directory_uri() . '/assets/js/customize.js', + array( 'customize-base', 'customize-controls', 'underscore', 'jquery', 'twentytwentyone-customize-helpers' ), + '1.0.0', + true + ); + } + + /** + * Register customizer options. + * + * @access public + * + * @since Twenty Twenty-One 1.0 + * + * @param WP_Customize_Manager $wp_customize Theme Customizer object. + * + * @return void + */ + public function customizer_controls( $wp_customize ) { + + $colors_section = $wp_customize->get_section( 'colors' ); + if ( is_object( $colors_section ) ) { + $colors_section->title = __( 'Colors & Dark Mode', 'twentytwentyone' ); + } + + // Custom notice control. + include_once get_theme_file_path( 'classes/class-twenty-twenty-one-customize-notice-control.php' ); // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound + + $wp_customize->add_setting( + 'respect_user_color_preference_notice', + array( + 'capability' => 'edit_theme_options', + 'default' => '', + 'sanitize_callback' => '__return_empty_string', + ) + ); + + $wp_customize->add_control( + new Twenty_Twenty_One_Customize_Notice_Control( + $wp_customize, + 'respect_user_color_preference_notice', + array( + 'section' => 'colors', + 'priority' => 100, + 'active_callback' => function() { + return 127 >= Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) ); + }, + ) + ) + ); + + $wp_customize->add_setting( + 'respect_user_color_preference', + array( + 'capability' => 'edit_theme_options', + 'default' => false, + 'sanitize_callback' => function( $value ) { + return (bool) $value; + }, + ) + ); + + $description = '

'; + $description .= sprintf( + /* translators: %s: Twenty Twenty-One support article URL. */ + __( 'Dark Mode is a device setting. If a visitor to your site requests it, your site will be shown with a dark background and light text. Learn more about Dark Mode.', 'twentytwentyone' ), + esc_url( __( 'https://wordpress.org/support/article/twenty-twenty-one/#dark-mode-support', 'twentytwentyone' ) ) + ); + $description .= '

'; + $description .= '

' . __( 'Dark Mode can also be turned on and off with a button that you can find in the bottom right corner of the page.', 'twentytwentyone' ) . '

'; + + $wp_customize->add_control( + 'respect_user_color_preference', + array( + 'type' => 'checkbox', + 'section' => 'colors', + 'label' => esc_html__( 'Dark Mode support', 'twentytwentyone' ), + 'priority' => 110, + 'description' => $description, + 'active_callback' => function( $value ) { + return 127 < Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) ); + }, + ) + ); + + // Add partial for background_color. + $wp_customize->selective_refresh->add_partial( + 'background_color', + array( + 'selector' => '#dark-mode-toggler', + 'container_inclusive' => true, + 'render_callback' => function() { + $attrs = ( $this->switch_should_render() ) ? array() : array( 'style' => 'display:none;' ); + $this->the_html( $attrs ); + }, + ) + ); + } + + /** + * Calculate classes for the main element. + * + * @access public + * + * @since Twenty Twenty-One 1.0 + * + * @param string $classes The classes for element. + * + * @return string + */ + public function html_classes( $classes ) { + if ( ! $this->switch_should_render() ) { + return $classes; + } + + $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); + $should_respect_color_scheme = get_theme_mod( 'respect_user_color_preference', false ); + if ( $should_respect_color_scheme && 127 <= Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( $background_color ) ) { + return ( $classes ) ? ' respect-color-scheme-preference' : 'respect-color-scheme-preference'; + } + + return $classes; + } + + /** + * Adds a class to the element in the editor to accommodate dark-mode. + * + * @access public + * + * @since Twenty Twenty-One 1.0 + * + * @param string $classes The admin body-classes. + * + * @return string + */ + public function admin_body_classes( $classes ) { + if ( ! $this->switch_should_render() ) { + return $classes; + } + + global $current_screen; + if ( empty( $current_screen ) ) { + set_current_screen(); + } + + if ( $current_screen->is_block_editor() ) { + $should_respect_color_scheme = get_theme_mod( 'respect_user_color_preference', false ); + $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); + + if ( $should_respect_color_scheme && Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( $background_color ) > 127 ) { + $classes .= ' twentytwentyone-supports-dark-theme'; + } + } + + return $classes; + } + + /** + * Determine if we want to print the dark-mode switch or not. + * + * @access public + * + * @since Twenty Twenty-One 1.0 + * + * @return bool + */ + public function switch_should_render() { + global $is_IE; + return ( + get_theme_mod( 'respect_user_color_preference', false ) && + ! $is_IE && + 127 <= Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) ) + ); + } + + /** + * Add night/day switch. + * + * @access public + * + * @since Twenty Twenty-One 1.0 + * + * @return void + */ + public function the_switch() { + if ( ! $this->switch_should_render() ) { + return; + } + $this->the_html(); + $this->the_script(); + } + + /** + * Print the dark-mode switch HTML. + * + * Inspired from https://codepen.io/aaroniker/pen/KGpXZo (MIT-licensed) + * + * @access public + * + * @since Twenty Twenty-One 1.0 + * + * @param array $attrs The attributes to add to our '; + ?> + + + '; + include get_template_directory() . '/assets/js/dark-mode-toggler.js'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude + echo ''; + } + + /** + * Adds information to the privacy policy. + * + * @access public + * + * @since Twenty Twenty-One 1.0 + * + * @return void + */ + public function add_privacy_policy_content() { + if ( ! function_exists( 'wp_add_privacy_policy_content' ) ) { + return; + } + $content = '

' . __( 'Twenty Twenty-One uses LocalStorage when Dark Mode support is enabled.', 'twentytwentyone' ) . '

' + . '' . __( 'Suggested text:', 'twentytwentyone' ) . ' ' + . __( 'This website uses LocalStorage to save the setting when Dark Mode support is turned on or off.
LocalStorage is necessary for the setting to work and is only used when a user clicks on the Dark Mode button.
No data is saved in the database or transferred.', 'twentytwentyone' ); + wp_add_privacy_policy_content( 'Twenty Twenty-One', wp_kses_post( wpautop( $content, false ) ) ); + } + +} diff --git a/themes/twentytwentyone/comments.php b/themes/twentytwentyone/comments.php index e2f97619..5e3b7ef7 100644 --- a/themes/twentytwentyone/comments.php +++ b/themes/twentytwentyone/comments.php @@ -36,7 +36,7 @@ '', - /* translators: %: page number. */ + /* translators: %: Page number. */ 'pagelink' => esc_html__( 'Page %', 'twentytwentyone' ), ) ); @@ -55,7 +55,7 @@ if ( wp_get_post_parent_id( $post ) ) { echo ''; printf( - /* translators: %s: parent post. */ + /* translators: %s: Parent post. */ esc_html__( 'Published in %s', 'twentytwentyone' ), '' . esc_html( get_the_title( wp_get_post_parent_id( $post ) ) ) . '' ); diff --git a/themes/twentytwentyone/inc/block-patterns.php b/themes/twentytwentyone/inc/block-patterns.php index 9b03480e..353b15eb 100644 --- a/themes/twentytwentyone/inc/block-patterns.php +++ b/themes/twentytwentyone/inc/block-patterns.php @@ -69,7 +69,7 @@ 'categories' => array( 'twentytwentyone' ), 'viewportWidth' => 1024, 'description' => esc_html_x( 'Three images inside an overlapping columns block.', 'Block pattern description', 'twentytwentyone' ), - 'content' => '
' . esc_attr__( '“Roses Tremieres” by Berthe Morisot', 'twentytwentyone' ) . '
' . esc_attr__( '“In the Bois de Boulogne” by Berthe Morisot', 'twentytwentyone' ) . '
' . esc_attr__( '“Young Woman in Mauve” by Berthe Morisot', 'twentytwentyone' ) . '
', + 'content' => '
' . esc_attr__( '“Roses Trémières” by Berthe Morisot', 'twentytwentyone' ) . '
' . esc_attr__( '“In the Bois de Boulogne” by Berthe Morisot', 'twentytwentyone' ) . '
' . esc_attr__( '“Young Woman in Mauve” by Berthe Morisot', 'twentytwentyone' ) . '
', ) ); @@ -104,7 +104,7 @@ 'title' => esc_html__( 'Portfolio list', 'twentytwentyone' ), 'categories' => array( 'twentytwentyone' ), 'description' => esc_html_x( 'A list of projects with thumbnail images.', 'Block pattern description', 'twentytwentyone' ), - 'content' => '






', + 'content' => '






', ) ); diff --git a/themes/twentytwentyone/inc/starter-content.php b/themes/twentytwentyone/inc/starter-content.php index 62ea53c8..83521a65 100644 --- a/themes/twentytwentyone/inc/starter-content.php +++ b/themes/twentytwentyone/inc/starter-content.php @@ -12,7 +12,7 @@ /** * Function to return the array of starter content for the theme. * - * Passes it through the `twentytwenty_starter_content` filter before returning. + * Passes it through the `twenty_twenty_one_starter_content` filter before returning. * * @since Twenty Twenty-One 1.0 * @@ -40,7 +40,7 @@ function twenty_twenty_one_get_starter_content() {
-
' . esc_attr__( '“Roses Tremieres” by Berthe Morisot', 'twentytwentyone' ) . '
+
' . esc_attr__( '“Roses Trémières” by Berthe Morisot', 'twentytwentyone' ) . '
diff --git a/themes/twentytwentyone/inc/template-functions.php b/themes/twentytwentyone/inc/template-functions.php index 1cbd67b3..258a29ad 100644 --- a/themes/twentytwentyone/inc/template-functions.php +++ b/themes/twentytwentyone/inc/template-functions.php @@ -417,6 +417,10 @@ function twenty_twenty_one_password_form( $post = 0 ) { */ function twenty_twenty_one_get_attachment_image_attributes( $attr, $attachment, $size ) { + if ( is_admin() ) { + return $attr; + } + if ( isset( $attr['class'] ) && false !== strpos( $attr['class'], 'custom-logo' ) ) { return $attr; } diff --git a/themes/twentytwentyone/inc/template-tags.php b/themes/twentytwentyone/inc/template-tags.php index c7df3461..0cbfe891 100644 --- a/themes/twentytwentyone/inc/template-tags.php +++ b/themes/twentytwentyone/inc/template-tags.php @@ -25,7 +25,7 @@ function twenty_twenty_one_posted_on() { ); echo ''; printf( - /* translators: %s: publish date. */ + /* translators: %s: Publish date. */ esc_html__( 'Published %s', 'twentytwentyone' ), $time_string // phpcs:ignore WordPress.Security.EscapeOutput ); @@ -45,7 +45,7 @@ function twenty_twenty_one_posted_by() { if ( ! get_the_author_meta( 'description' ) && post_type_supports( get_post_type(), 'author' ) ) { echo '