Make WordPress Core


Ignore:
Timestamp:
04/26/2022 03:25:01 PM (22 months ago)
Author:
jffng
Message:

Twenty Twenty-Two: Add three style variations.

This commit adds three style variations to Twenty Twenty-Two, allowing users to quickly swap between different visual styles — "Blue", "Pink", and "Swiss" — for the default theme. The variations are previewed and selected from the Site Editor's global styles panel.

For the implementation, each variation is defined by its own theme.json file within the "/styles" directory of the theme. All variations leverage the internal-only theme.json handler of the Webfonts API [53282] to load locally hosted fonts.

Props kjellr, hellofromtonya.
See #55433.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentytwo/theme.json

    r52430 r53286  
    179179                    "fontFamily": "\"Source Serif Pro\", serif",
    180180                    "name": "Source Serif Pro",
    181                     "slug": "source-serif-pro"
     181                    "slug": "source-serif-pro",
     182                    "fontFace": [
     183                        {
     184                            "fontFamily": "Source Serif Pro",
     185                            "fontWeight": "200 900",
     186                            "fontStyle": "normal",
     187                            "fontStretch": "normal",
     188                            "src": [ "file:./assets/fonts/source-serif-pro/SourceSerif4Variable-Roman.ttf.woff2" ]
     189                        },
     190                        {
     191                            "fontFamily": "Source Serif Pro",
     192                            "fontWeight": "200 900",
     193                            "fontStyle": "italic",
     194                            "fontStretch": "normal",
     195                            "src": [ "file:./assets/fonts/source-serif-pro/SourceSerif4Variable-Italic.ttf.woff2" ]
     196                        }
     197                    ]
    182198                }
    183199            ],
     
    258274                    "lineHeight": "var(--wp--custom--typography--line-height--normal)",
    259275                    "fontSize": "var(--wp--preset--font-size--medium)",
     276                    "fontStyle": "italic",
    260277                    "fontWeight": "normal"
    261278                }
Note: See TracChangeset for help on using the changeset viewer.