diff --git a/tt1-blocks/assets/css/blocks.css b/tt1-blocks/assets/css/blocks.css index acd1a506..2bb25aff 100644 --- a/tt1-blocks/assets/css/blocks.css +++ b/tt1-blocks/assets/css/blocks.css @@ -1,8 +1,8 @@ /*-------------------------------------------------------------- -# Cover +# Border, for backwards compatibility --------------------------------------------------------------*/ -.wp-block-cover.is-style-twentytwentyone-border { +.is-style-twentytwentyone-border { border: 3px solid var(--wp--preset--color--dark-gray); } @@ -50,15 +50,6 @@ # Image --------------------------------------------------------------*/ -.wp-block-image img { - height: auto; -} - -.wp-block-image.is-style-twentytwentyone-border img, -.wp-block-image.is-style-twentytwentyone-image-frame img { - border: 3px solid var(--wp--preset--color--dark-gray); -} - .wp-block-image.is-style-twentytwentyone-image-frame img { padding: var(--wp--custom--spacing--unit); } @@ -67,10 +58,6 @@ # Latest Posts --------------------------------------------------------------*/ -.wp-block-latest-posts { - padding-left: 0; -} - .wp-block-latest-posts.is-style-twentytwentyone-latest-posts-dividers { border-top: 3px solid var(--wp--preset--color--dark-gray); border-bottom: 3px solid var(--wp--preset--color--dark-gray); @@ -137,36 +124,10 @@ margin-bottom: var(--wp--custom--spacing--horizontal); } -/*-------------------------------------------------------------- -# Media & Text ---------------------------------------------------------------*/ - -.wp-block-media-text.is-style-twentytwentyone-border { - border: 3px solid var(--wp--preset--color--dark-gray); -} - -/*-------------------------------------------------------------- -# Navigation ---------------------------------------------------------------*/ - -.wp-block-navigation .wp-block-navigation-link a:hover { - text-decoration: underline; - text-underline-offset: 3px; - text-decoration-style: dotted; - text-decoration-skip-ink: none; -} - /*-------------------------------------------------------------- # Separator --------------------------------------------------------------*/ -hr, -.wp-block-separator { - border-bottom: 1px solid var(--wp--preset--color--dark-gray); - clear: both; - opacity: 1; -} - hr[style*="text-align:right"], hr[style*="text-align: right"], .wp-block-separator[style*="text-align:right"], @@ -179,23 +140,7 @@ hr.is-style-twentytwentyone-separator-thick, border-bottom-width: 3px; } -.wp-block-separator.is-style-dots { - border-bottom: none; -} - -.wp-block-separator.is-style-dots > hr { - display: none; -} - /* In Twenty Twenty-One, separators are 100% wide. This replicates that approach */ .wp-block-separator:not(.is-style-wide):not(.is-style-dots) { width: 100%; } - -/*-------------------------------------------------------------- -# Site Title ---------------------------------------------------------------*/ - -h1.wp-block-site-title a:not(:hover):not(:focus):not(:active) { - text-decoration: none; -} diff --git a/tt1-blocks/assets/css/style-shared.css b/tt1-blocks/assets/css/style-shared.css index 1649321b..087f5de3 100644 --- a/tt1-blocks/assets/css/style-shared.css +++ b/tt1-blocks/assets/css/style-shared.css @@ -3,7 +3,6 @@ --------------------------------------------------------------*/ body { - font-family: var(--wp--custom--font-primary); -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; } @@ -20,52 +19,5 @@ a { } a:hover { - text-decoration-style: dotted; text-decoration-skip-ink: none; } - -/* - * Gutenberg remotes this underline, but Twenty Twenty-One uses it. - */ -.site-header h1.wp-block-site-title a:not(:hover):not(:focus):not(:active) { - text-decoration: underline; -} - -/* - * Alignment styles. - * These rules are temporary, and should not be relied on or - * modified too heavily by themes or plugins that build on - * Twenty Twenty-Two. These are meant to be a precursor to - * a global solution provided by the Block Editor. - * - * Relevant issues: - * https://github.com/WordPress/gutenberg/issues/35607 - * https://github.com/WordPress/gutenberg/issues/35884 - */ - -.wp-site-blocks, -body > .is-root-container, -.edit-post-visual-editor__post-title-wrapper, -.wp-block-group.alignfull, -.is-root-container .wp-block[data-align="full"] > .wp-block-group { - padding-left: var(--wp--custom--spacing--outer); - padding-right: var(--wp--custom--spacing--outer); -} - -.wp-site-blocks .alignfull, -.is-root-container .wp-block[data-align="full"] { - margin-left: calc(-1 * var(--wp--custom--spacing--outer)) !important; - margin-right: calc(-1 * var(--wp--custom--spacing--outer)) !important; - width: unset; -} - -/* Blocks inside columns don't have negative margins. */ -.wp-site-blocks .wp-block-columns .wp-block-column .alignfull, -.is-root-container .wp-block-columns .wp-block-column .wp-block[data-align="full"], -/* We also want to avoid stacking negative margins. */ -.wp-site-blocks .alignfull:not(.wp-block-group) .alignfull, -.is-root-container .wp-block[data-align="full"] > *:not(.wp-block-group) .wp-block[data-align="full"] { - margin-left: auto !important; - margin-right: auto !important; - width: inherit; -} diff --git a/tt1-blocks/patterns/links-area.php b/tt1-blocks/patterns/links-area.php index a6a6fb80..856cc7bd 100644 --- a/tt1-blocks/patterns/links-area.php +++ b/tt1-blocks/patterns/links-area.php @@ -13,26 +13,24 @@ */ ?> - -
-
- -

- - -
- -
-

/ /

-
- -
-

-
- + +
+ +

+ + +
+ +
+

/ /

+
+ +
+

- - +
+ +
- \ No newline at end of file + \ No newline at end of file diff --git a/tt1-blocks/patterns/media-text-article.php b/tt1-blocks/patterns/media-text-article.php index 0d649b36..5feac623 100644 --- a/tt1-blocks/patterns/media-text-article.php +++ b/tt1-blocks/patterns/media-text-article.php @@ -11,14 +11,17 @@ * @since 0.4.9 */ ?> - - -
-
<?php esc_attr_e( '“Playing in the Sand” by Berthe Morisot', 'tt1-blocks' ); ?>
-

-
- - -

(French, 1841-1895)', 'tt1-blocks' ) ); ?>

-
-
\ No newline at end of file + +
+ +
+
<?php esc_attr_e( '“Playing in the Sand” by Berthe Morisot', 'tt1-blocks' ); ?>
+

+
+ + +

(French, 1841-1895)', 'tt1-blocks' ) ); ?>

+
+
+
+ \ No newline at end of file diff --git a/tt1-blocks/readme.txt b/tt1-blocks/readme.txt index f030bdf1..07f3f726 100644 --- a/tt1-blocks/readme.txt +++ b/tt1-blocks/readme.txt @@ -1,7 +1,7 @@ === TT1 Blocks === Contributors: wordpressdotorg Requires at least: 5.6 -Tested up to: 5.8 +Tested up to: 6.2 Requires PHP: 5.6 Stable tag: 0.4.8 License: GPLv2 or later @@ -24,6 +24,10 @@ This theme is beta software, and is not meant for use on a production site. Bug 5. From your admin panel, visit the Site Editor to customize your site. == Changelog == + += 1.0.0 = +* Update to work with changes from WordPress 6.2 onwards + = 0.4.8 = * Update for compatibility with Gutenberg v12.1 diff --git a/tt1-blocks/style.css b/tt1-blocks/style.css index a13dd86a..0b7a84b3 100644 --- a/tt1-blocks/style.css +++ b/tt1-blocks/style.css @@ -4,10 +4,10 @@ Theme URI: https://github.com/WordPress/theme-experiments/tree/master/tt1-blocks Author: the WordPress team Author URI: https://wordpress.org/ Description: TT1 Blocks is an experimental block-based version of the Twenty Twenty-One theme. It is built to leverage the full-site editing functionality that is being built in the Gutenberg plugin. This theme is not meant for use on a production site. -Requires at least: 5.6 +Requires at least: 6.2 Tested up to: 5.8 Requires PHP: 5.6 -Version: 0.4.8 +Version: 1.0.0 License: GNU General Public License v2 or later License URI: LICENSE Text Domain: tt1-blocks diff --git a/tt1-blocks/theme.json b/tt1-blocks/theme.json index c30630a9..3dff0ba0 100644 --- a/tt1-blocks/theme.json +++ b/tt1-blocks/theme.json @@ -1,24 +1,17 @@ { - "version": 1, - "templateParts": [ - { - "name": "header", - "area": "header" - }, + "$schema": "https://schemas.wp.org/trunk/theme.json", + "version": 2, + "customTemplates": [ { - "name": "footer", - "area": "footer" + "name": "page-home", + "title": "Page without title" } ], "settings": { "appearanceTools": true, + "useRootPaddingAwareAlignments": true, "color": { "palette": [ - { - "slug": "black", - "color": "#000000", - "name": "Black" - }, { "slug": "dark-gray", "color": "#28303D", @@ -58,11 +51,6 @@ "slug": "yellow", "color": "#EEEADD", "name": "Yellow" - }, - { - "slug": "white", - "color": "#FFFFFF", - "name": "White" } ], "gradients": [ @@ -175,84 +163,23 @@ ] }, "custom": { - "font-primary": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif", - "line-height": { - "body": 1.7, - "heading": 1.3, - "page-title": 1.1 - }, "spacing": { - "unit": "20px", - "horizontal": "25px", - "vertical": "30px", - "outer": "calc(0.6 * var(--wp--custom--spacing--horizontal))" - }, - "font-weight":{ - "light": "300", - "normal": "normal" + "outer": "calc(0.6 * 25px)" } } }, "styles": { - "color": { - "background": "var(--wp--preset--color--green)", - "text": "var(--wp--preset--color--dark-gray)" - }, - "typography": { - "fontSize": "var(--wp--preset--font-size--normal)", - "lineHeight": "var(--wp--custom--line-height--body)" - }, - "elements": { - "link": { - "color": { - "text": "var(--wp--preset--color--dark-gray)" - } - }, - "h1": { - "typography": { - "fontSize": "var(--wp--preset--font-size--gigantic)", - "lineHeight": "var(--wp--custom--line-height--page-title)", - "fontWeight": "var(--wp--custom--font-weight--normal)" - } - }, - "h2": { - "typography": { - "fontSize": "var(--wp--preset--font-size--extra-large)", - "lineHeight": "var(--wp--custom--line-height--heading)", - "fontWeight": "var(--wp--custom--font-weight--normal)" - } - }, - "h3": { - "typography": { - "fontSize": "calc(1.25 * var(--wp--preset--font-size--large))", - "lineHeight": "var(--wp--custom--line-height--heading)", - "fontWeight": "var(--wp--custom--font-weight--normal)" - } - }, - "h4": { - "typography": { - "fontSize": "var(--wp--preset--font-size--large)", - "lineHeight": "var(--wp--custom--line-height--heading)" - } - }, - "h5": { - "typography": { - "fontSize": "var(--wp--preset--font-size--small)", - "lineHeight": "var(--wp--custom--line-height--heading)" - } - }, - "h6": { - "typography": { - "fontSize": "var(--wp--preset--font-size--extra-small)", - "lineHeight": "var(--wp--custom--line-height--heading)" - } - } - }, "blocks": { "core/site-tagline": { "typography": { "fontSize": "var(--wp--preset--font-size--small)", - "lineHeight": 1.4 + "lineHeight": "1.4" + }, + "spacing": { + "margin": { + "top": "0", + "bottom": "0" + } } }, "core/button": { @@ -265,7 +192,7 @@ }, "typography": { "fontSize": "var(--wp--preset--font-size--normal)", - "fontWeight": 500 + "fontWeight": "500" } }, "core/comment-author-name": { @@ -288,22 +215,30 @@ "fontSize": "var(--wp--preset--font-size--small)" } }, + "core/navigation": { + "elements": { + "link": { + ":hover": { + "typography": { + "textDecoration": "underline dotted" + } + } + } + } + }, "core/post-author": { "typography": { - "fontSize": "var(--wp--preset--font-size--extra-small)", - "lineHeight": "var(--wp--custom--line-height--body)" + "fontSize": "var(--wp--preset--font-size--extra-small)" } }, "core/post-date": { "typography": { - "fontSize": "var(--wp--preset--font-size--extra-small)", - "lineHeight": "var(--wp--custom--line-height--body)" + "fontSize": "var(--wp--preset--font-size--extra-small)" } }, "core/post-terms": { "typography": { - "fontSize": "var(--wp--preset--font-size--extra-small)", - "lineHeight": "var(--wp--custom--line-height--body)" + "fontSize": "var(--wp--preset--font-size--extra-small)" } }, "core/pullquote": { @@ -313,8 +248,8 @@ }, "spacing": { "padding": { - "top": "calc(2 * var(--wp--custom--spacing--unit))", - "bottom": "calc(2 * var(--wp--custom--spacing--unit))", + "top": "2rem", + "bottom": "2rem", "left": "0", "right": "0" } @@ -322,31 +257,33 @@ "border": { "radius": "0px", "style": "solid none", - "width": "var(--wp--custom--border--width)" + "width": "3px" } }, - "core/site-tagline": { - "spacing": { - "margin": { - "top": "0", - "bottom": "0" - } + "core/separator": { + "border": { + "color": "currentColor", + "style": "solid", + "width": "0 0 1px 0" + }, + "color": { + "text": "var(--wp--preset--color--dark-gray)" } }, "core/site-title": { "typography": { "fontSize": "var(--wp--preset--font-size--large)", - "fontWeight": "var(--wp--custom--font-weight--normal)", + "fontWeight": "normal", "textTransform": "uppercase" } }, "core/code": { "spacing": { "padding": { - "top": "var(--wp--custom--spacing--unit)", - "bottom": "var(--wp--custom--spacing--unit)", - "left": "var(--wp--custom--spacing--unit)", - "right": "var(--wp--custom--spacing--unit)" + "top": "1rem", + "bottom": "1rem", + "left": "1rem", + "right": "1rem" } }, "border": { @@ -356,12 +293,76 @@ "width": "1.5px" } } + }, + "color": { + "background": "var(--wp--preset--color--green)", + "text": "var(--wp--preset--color--dark-gray)" + }, + "elements": { + "link": { + "color": { + "text": "var(--wp--preset--color--dark-gray)" + }, + ":hover": { + "typography": { + "textDecoration": "underline dotted" + } + } + }, + "heading": { + "Typography": { + "lineHeight": "1.3" + } + }, + "h1": { + "typography": { + "fontSize": "var(--wp--preset--font-size--gigantic)", + "lineHeight": "1.1", + "fontWeight": "normal" + } + }, + "h2": { + "typography": { + "fontSize": "var(--wp--preset--font-size--extra-large)", + "fontWeight": "normal" + } + }, + "h3": { + "typography": { + "fontSize": "calc(1.25 * var(--wp--preset--font-size--large))", + "fontWeight": "normal" + } + }, + "h4": { + "typography": { + "fontSize": "var(--wp--preset--font-size--large)" + } + }, + "h5": { + "typography": { + "fontSize": "var(--wp--preset--font-size--small)" + } + }, + "h6": { + "typography": { + "fontSize": "var(--wp--preset--font-size--extra-small)" + } + } + }, + "typography": { + "fontFamily": "var(--wp--preset--font-family--system-font)", + "fontSize": "var(--wp--preset--font-size--normal)", + "lineHeight": "1.7" } }, - "customTemplates": [ + "templateParts": [ { - "name": "page-home", - "title": "Page without title" + "name": "header", + "area": "header" + }, + { + "name": "footer", + "area": "footer" } ] } \ No newline at end of file