WordPress.org

Make WordPress Core

Changeset 52164


Ignore:
Timestamp:
11/15/2021 07:13:33 PM (3 weeks ago)
Author:
jffng
Message:

Twenty Twenty-Two: Import the latest changes from GitHub.

Updates theme.json to use v2 shape, adds styles to search and file block as well as generic text decoration. Fixes a bug in the layout of a query block pattern.

This is a follow-up to [52081]. These changes are ongoing and development continues on GitHub. To view all of the changes included in this commit, see GitHub: https://github.com/WordPress/twentytwentytwo/compare/99db6063beb87eda7f58c3983992d94cd756d9c2...a11fb4932a0f79dc2668e92f118fd315256be9d9

Props desrosj, kjellr, poena.
See #54318.

Location:
trunk/src/wp-content/themes/twentytwentytwo
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentytwo/functions.php

    r52081 r52164  
    1414
    1515    /**
    16      * Add support for core block visual styles.
    17      * Styles load in both the editor and the front end.
    18      *
    19      * @link https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#default-block-styles
     16     * Sets up theme defaults and registers support for various WordPress features.
    2017     *
    2118     * @since Twenty Twenty-Two 1.0
     
    2522    function twentytwentytwo_support() {
    2623
     24        // Add support for block styles.
    2725        add_theme_support( 'wp-block-styles' );
     26
     27        // Enqueue editor styles.
     28        add_editor_style( 'style.css' );
    2829
    2930    }
  • trunk/src/wp-content/themes/twentytwentytwo/inc/patterns/query-image-grid.php

    r52081 r52164  
    1111                    <!-- wp:post-featured-image {"isLink":true,"width":"100%","height":"200px"} /-->
    1212
    13                     <!-- wp:group {"layout":{"type":"flex","justifyContent":"space-between"}} -->
    14                     <div class="wp-block-group"><!-- wp:post-title {"isLink":true,"style":{"typography":{"fontFamily":"var:preset|font-family|system-font","fontStyle":"normal","fontWeight":"400"}},"fontSize":"small"} /-->
     13                    <!-- wp:columns {"isStackedOnMobile":false,"style":{"spacing":{"blockGap":"0.5rem"}}} -->
     14                    <div class="wp-block-columns is-not-stacked-on-mobile"><!-- wp:column -->
     15                    <div class="wp-block-column"><!-- wp:post-title {"isLink":true,"style":{"typography":{"fontStyle":"normal","fontWeight":"400"},"spacing":{"margin":{"top":"0.2em"}}},"fontSize":"small","fontFamily":"system-font"} /--></div>
     16                    <!-- /wp:column -->
    1517
    16                     <!-- wp:post-date {"format":"m.d.y","style":{"typography":{"fontStyle":"italic","fontWeight":"400"}},"fontSize":"small"} /--></div>
    17                     <!-- /wp:group -->
     18                    <!-- wp:column {"width":"4em"} -->
     19                    <div class="wp-block-column" style="flex-basis:4em"><!-- wp:post-date {"textAlign":"right","format":"m.d.y","style":{"typography":{"fontStyle":"italic","fontWeight":"400"}},"fontSize":"small"} /--></div>
     20                    <!-- /wp:column --></div>
     21                    <!-- /wp:columns -->
    1822                    <!-- /wp:post-template -->
    1923
  • trunk/src/wp-content/themes/twentytwentytwo/style.css

    r52081 r52164  
    1717Twenty Twenty-Two is distributed under the terms of the GNU GPL.
    1818*/
     19
     20/*
     21 * Font smoothing.
     22 * This is a niche setting that will not be available via Global Styles.
     23 * https://github.com/WordPress/gutenberg/issues/35934
     24 */
     25
     26body {
     27    -moz-osx-font-smoothing: grayscale;
     28    -webkit-font-smoothing: antialiased;
     29}
     30
     31/*
     32 * Text link styles.
     33 * Necessary until the following issue is resolved in Gutenberg:
     34 * https://github.com/WordPress/gutenberg/issues/27075
     35 */
     36
     37a {
     38    text-decoration-thickness: 1px;
     39    text-underline-offset: 0.25ch;
     40}
     41
     42a:hover,
     43a:focus {
     44    text-decoration-style: dashed;
     45}
     46
     47a:active {
     48    text-decoration: none;
     49}
     50
     51/*
     52 * Search and File Block button styles.
     53 * Necessary until the following issues are resolved in Gutenberg:
     54 * https://github.com/WordPress/gutenberg/issues/36444
     55 * https://github.com/WordPress/gutenberg/issues/27760
     56 */
     57
     58.wp-block-search__button,
     59.wp-block-file .wp-block-file__button {
     60    background-color: var(--wp--preset--color--primary);
     61    border-radius: 0;
     62    border: none;
     63    color: var(--wp--preset--color--background);
     64    font-size: var(--wp--preset--typography--font-size--normal);
     65    padding: calc(.667em + 2px) calc(1.333em + 2px);
     66}
     67
     68.wp-block-file a.wp-block-file__button:hover {
     69    opacity: 1;
     70}
  • trunk/src/wp-content/themes/twentytwentytwo/theme.json

    r52081 r52164  
    11{
    2     "$schema": "https://json.schemastore.org/theme-v1.json",
    3     "version": 1,
     2    "version": 2,
    43    "customTemplates": [
    54        {
     
    159158        "spacing": {
    160159            "blockGap": true,
    161             "customMargin": true,
    162             "customPadding": true,
     160            "margin": true,
     161            "padding": true,
    163162            "units": [
    164163                "%",
     
    172171        "typography": {
    173172            "dropCap": false,
    174             "customLineHeight": true,
     173            "lineHeight": true,
    175174            "fontFamilies": [
    176175                {
     
    218217        },
    219218        "border": {
    220             "customColor": true,
    221             "customRadius": true,
    222             "customStyle": true,
    223             "customWidth": true
     219            "color": true,
     220            "radius": true,
     221            "style": true,
     222            "width": true
    224223        }
    225224    },
Note: See TracChangeset for help on using the changeset viewer.