{"id":33258,"date":"2022-03-18T08:11:24","date_gmt":"2022-03-18T15:11:24","guid":{"rendered":"https:\/\/dhblog.dream.press\/blog\/?p=33258"},"modified":"2025-05-21T18:57:50","modified_gmt":"2025-05-22T01:57:50","slug":"wordpress-global-styles","status":"publish","type":"post","link":"https:\/\/www-dev.dreamhost.com\/blog\/wordpress-global-styles\/","title":{"rendered":"Decoding WordPress: An Introduction to Global Styles"},"content":{"rendered":"\n<p>WordPress blocks and <a href=\"https:\/\/www.dreamhost.com\/blog\/wordpress-full-site-editing\/\" target=\"_blank\" rel=\"noopener\">Full-Site Editing (FSE)<\/a> features make building and styling a <a href=\"https:\/\/www.dreamhost.com\/blog\/secrets-to-successful-website\/\" target=\"_blank\" rel=\"noopener\">successful website<\/a> quick and easy.<\/p>\n\n\n\n<p>Global Styles can help you unify the <a href=\"https:\/\/www.dreamhost.com\/wordpress\/guide-to-wp-templates\/\" target=\"_blank\" rel=\"noopener\">appearance of your WordPress site<\/a> without having to edit single blocks or pages. So whether you want to change your background color or adjust the heading typography, you\u2019ll be able to make your modifications in a single place, resulting in a more cohesive and all-around better <a href=\"https:\/\/www.dreamhost.com\/blog\/what-is-user-experience\/\" target=\"_blank\" rel=\"noopener\">User Experience (UX)<\/a>.<\/p>\n\n\n\n<p>In this post, we\u2019ll walk you through Global Styles. We\u2019ll explain what they are, their benefits, and how the new features work. Then we\u2019ll discuss how to use them to style your WordPress website. Let\u2019s get started!<\/p>\n\n\n\n<h2 id=\"h-an-overview-of-wordpress-global-styles\" class=\"wp-block-heading\"><b>An Overview of WordPress Global Styles<\/b><\/h2>\n\n\n\n<p>Before working with Global Styles, it\u2019s important to understand what they are and how they operate. This feature works in conjunction with <i>theme.json<\/i>, a new theme settings file. Developers can <a href=\"https:\/\/developer.wordpress.org\/themes\/advanced-topics\/theme-json\/\" target=\"_blank\" rel=\"noopener\">use theme.json<\/a> to define defaults for a site as well as individual blocks. Gutenberg automatically applies this JSON when you place the file in the root directory of a block-based theme.<\/p>\n\n\n\n<p>This file is one of the most useful tools of the new full site editor in WordPress 5.9. The file lets theme authors share Global Styles as well as Global Settings. <a href=\"https:\/\/www.dreamhost.com\/blog\/wordpress-crash-course\/\" target=\"_blank\" rel=\"noopener\">WordPress<\/a> reformats the data taken from these JSON objects and turns it into CSS. Then users can further customize the styles in the WordPress editor.<\/p>\n\n\n\n<p>In previous iterations of the <a href=\"https:\/\/wordpress.org\/plugins\/gutenberg\/\" target=\"_blank\" rel=\"noopener\">Gutenberg plugin<\/a>, you had to register support for the style properties of a block before you were able to work with them in <i>theme.json<\/i>. Also, in classic themes and older versions, you had to use PHP to define things such as your color choices <a href=\"https:\/\/www.dreamhost.com\/blog\/web-safe-fonts\/\" target=\"_blank\" rel=\"noopener\">and fonts<\/a>. Then you needed to add styles for the front and back end sides of your theme.<\/p>\n\n\n\n<p>However, with the latest release, when you use a theme with the<i> theme.json<\/i> file in place, WordPress automatically adds the styles defined there to your stylesheet. You can use this system to add entirely new color palettes, change the typography of themes, and more.<\/p>\n\n\n\n<h2 id=\"h-why-use-wordpress-global-styles\" class=\"wp-block-heading\"><b>Why Use WordPress Global Styles<\/b><\/h2>\n\n\n\n<p>No matter your skill level, you\u2019ll likely find using Global Styles an intuitive and accessible experience. Overall, it can streamline the <a href=\"https:\/\/www.dreamhost.com\/blog\/elements-of-webdesign\/\" target=\"_blank\" rel=\"noopener\">web design<\/a> process by making it easier to change the look and feel of your site. If you\u2019re a WordPress beginner, taking advantage of these Global Styles may mean that you won\u2019t need to <a href=\"https:\/\/www.dreamhost.com\/blog\/how-to-hire-web-developer\/\" target=\"_blank\" rel=\"noopener\">hire a developer<\/a> in order to <a href=\"https:\/\/www.dreamhost.com\/blog\/how-to-design-a-website\/\" target=\"_blank\" rel=\"noopener\">design your website<\/a>. Sorry, developers.<\/p>\n\n\n\n<p>On the flip side though, this new feature might be particularly useful for theme developers. That\u2019s because Global Styles helps WordPress developers style blocks within the <a href=\"https:\/\/www.dreamhost.com\/blog\/how-to-update-old-wordpress-posts-block-editor\/\" target=\"_blank\" rel=\"noopener\">Block Editor<\/a>. This can be highly advantageous, especially for new theme authors. It offers a variety of controls that minimize the need to create custom solutions for styling a site.<\/p>\n\n\n\n<p>In other words, Global Styles simplifies theme development to a great degree. As a result, it can help developers avoid <a href=\"https:\/\/www.dreamhost.com\/blog\/scary-web-design-mistakes\/\" target=\"_blank\" rel=\"noopener\">damaging design mistakes<\/a>.<\/p>\n\n\n\n<div class=\"article-newsletter article-newsletter--gradient\">\n\n\n<h2>Get Content Delivered Straight to Your Inbox<\/h2><p>Subscribe now to receive all the latest updates, delivered directly to your inbox.<\/p><form class=\"nwsl-form\" id=\"newsletter_block_\" novalidate><div class=\"messages\"><\/div><div class=\"form-group\"><label for=\"input_newsletter_block_\"><input type=\"email\"name=\"email\"id=\"input_newsletter_block_\"placeholder=\"Enter your email address\"novalidatedisabled=\"disabled\"\/><\/label><button type=\"submit\"class=\"btn btn--brand\"disabled=\"disabled\"><span>Sign Me Up!<\/span><svg width=\"21\" height=\"14\" viewBox=\"0 0 21 14\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n<path d=\"M13.8523 0.42524L12.9323 1.34521C12.7095 1.56801 12.7132 1.9304 12.9404 2.14865L16.7241 5.7823H0.5625C0.251859 5.7823 0 6.03416 0 6.3448V7.6573C0 7.96794 0.251859 8.2198 0.5625 8.2198H16.7241L12.9405 11.8535C12.7132 12.0717 12.7095 12.4341 12.9323 12.6569L13.8523 13.5769C14.072 13.7965 14.4281 13.7965 14.6478 13.5769L20.8259 7.39879C21.0456 7.17913 21.0456 6.82298 20.8259 6.60327L14.6477 0.42524C14.4281 0.205584 14.0719 0.205584 13.8523 0.42524Z\" fill=\"white\"\/>\n<\/svg>\n<\/button><\/div><\/form><\/div>\n\n\n<h2 id=\"h-creating-the-theme-json-file\" class=\"wp-block-heading\"><b>Creating the theme.json File<\/b><\/h2>\n\n\n\n<p>The<i> theme.json<\/i> file contains two important parts: settings and styles. Settings refer to a list of global or contextual configuration values that determine how the editor and blocks behave. For example, it influences which controls are enabled by default, which controls are hidden from the User Interface (UI), the available color palette, typography settings, etc.<\/p>\n\n\n\n<p>Styles handles the theme\u2019s design language and enables theme authors to define elements such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Font size<\/li>\n\n\n\n<li>Line height<\/li>\n\n\n\n<li>Background colors<\/li>\n\n\n\n<li>Link colors<\/li>\n<\/ul>\n\n\n\n<p>If you want to <a href=\"https:\/\/developer.wordpress.org\/themes\/advanced-topics\/theme-json\/\" target=\"_blank\" rel=\"noopener\">create a <i>theme.json<\/i> file<\/a>, you can make a new file of that name and then place it inside the root folder of your theme. All the contents of your file should be inserted inside two curly brackets: { }.<\/p>\n\n\n\n<p>Next, you\u2019ll use property names and values within double quotes and separated with a colon, for example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{\n\n\"property-name\": \"value\"\n\n}<\/pre>\n\n\n\n<p>The property name can either be a setting or a block name. Below is an example of a very basic <i>theme.json<\/i> file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{\n\n&nbsp;&nbsp;&nbsp;&nbsp;\"version\": 1,\n\n&nbsp;&nbsp;&nbsp;&nbsp;\"settings\": {},\n\n&nbsp;&nbsp;&nbsp;&nbsp;\"styles\": {},\n\n&nbsp;&nbsp;&nbsp;&nbsp;\"customTemplates\": {},\n\n&nbsp;&nbsp;&nbsp;&nbsp;\"templateParts\": {}\n\n}<\/pre>\n\n\n\n<p>Version 1 of the <i>theme.json <\/i>format is the earliest, most stable version. However, version 2 is used starting with WordPress 5.9. While the version section must be the first to follow the opening curly bracket, the subsequent sections can be placed in any order.<\/p>\n\n\n\n<p>As we mentioned, the two main sections of the file are Settings and Styles. So let\u2019s have a closer look at the presets for each.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-settings-presets\"><b>Settings Presets<\/b><\/h3>\n\n\n\n<p><a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-json\/#presets\" target=\"_blank\" rel=\"noopener\">Presets<\/a> refer to the default controls as well as any custom CSS properties and are generated by the values in <i>theme.json<\/i>. Some of the main preset categories include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Color<\/li>\n\n\n\n<li>Typography<\/li>\n\n\n\n<li>Layout<\/li>\n\n\n\n<li>Spacing<\/li>\n<\/ul>\n\n\n\n<p>Categories can also have subcategories. For example, a subcategory of Color could be Color Palette:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{\n\n\"version\": 2,\n\n\"settings\": {\n\n\"color\": {\n\n\"palette\": [\n\n{<\/pre>\n\n\n\n<p>Each preset also creates a custom CSS property using the \u201c&#8211;wp&#8211;preset&#8211;{preset-category}&#8211;{preset-slug}\u201d naming convention.<\/p>\n\n\n\n<p>There are a ton of presets and examples that you can use to create your <i>theme.json<\/i> file, so we won\u2019t go over all of them here. However, you can refer to the <a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-json\/\" target=\"_blank\" rel=\"noopener\">WordPress Handbook<\/a> for more detailed guidance.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-styles-presets\"><b>Styles Presets<\/b><\/h3>\n\n\n\n<p><a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-json\/#styles\" target=\"_blank\" rel=\"noopener\">Styles presets<\/a> control the styles of objects within blocks. For example, the following would be a way to use the hex value for a background and a Global Styles preset for the text color:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"version\": 2,\n\n\"settings\": { ... },\n\n\"styles\": {\n\n\"color\": {\n\n\"background\": \"#FBF\",\n\n\"text\": \"var(--wp--preset--color--purple)\"\n\n}\n\n}\n\n}<\/pre>\n\n\n\n<p>If we wanted to change the heading color of a block, it would look similar to this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"version\": 2,\n\n\"settings\": {...},\n\n\"styles\": {\n\n...,\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"blocks\": {\n\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \"core\/heading\": {\n\n &nbsp; &nbsp; \"color\": {\n\n&nbsp; &nbsp; &nbsp; \"text\": \"var(--wp--preset--color--blue)\"\n\n &nbsp; &nbsp; }<\/pre>\n\n\n\n<p>Again, there are nearly infinite examples and ways to use presets for block styles. You can refer to WordPress documentation for a <a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-json\/#block-styles\" target=\"_blank\" rel=\"noopener\">full breakdown<\/a>.<\/p>\n\n\n\n<p>There are also <a href=\"https:\/\/fullsiteediting.com\/lessons\/templates-and-template-parts\/\" target=\"_blank\" rel=\"noopener\">Template and Template parts<\/a> sections. These include the base files of your theme, such as <i>index.html<\/i>, as well as sections to organize and structure your theme.<\/p>\n\n\n\n<h2 id=\"h-how-to-style-your-wordpress-site-using-global-styles\" class=\"wp-block-heading\"><b>How to Style Your WordPress Site Using Global Styles<\/b><\/h2>\n\n\n\n<p>If you\u2019re looking for a beginner-friendly way to use Global Styles to style your website, you can use the Global Styles interface with a WordPress block theme. Note that you will only have access to the Styles interface with <a href=\"https:\/\/www.dreamhost.com\/blog\/wordpress-full-site-editing-update\/\" target=\"_blank\" rel=\"noopener\">WordPress 5.9<\/a> or higher.<\/p>\n\n\n\n<div class=\"single__related-article\">\n\t<span>Related Article<\/span>\n\t<div class=\"single__related-article__wrap\">\n\t\t<div class=\"single__related-article__title\">\n\t\t\tHow To Build a Website This Weekend: Complete Beginner\u2019s Guide\n\t\t<\/div>\n\t\t<a href=\"https:\/\/www-dev.dreamhost.com\/blog\/beginners-website-guide\/\" class=\"btn btn--sm btn--brand\" target=\"_blank\" rel=\"noopener\">\n\t\t\tRead More\n\t\t<\/a>\n\t<\/div>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-choosing-a-block-based-theme\"><b>Choosing a Block-Based Theme<\/b><\/h3>\n\n\n\n<p>First, you\u2019ll need a block-based theme. To find one, you can navigate to the <a href=\"https:\/\/wordpress.org\/themes\/\" target=\"_blank\" rel=\"noopener\">WordPress Theme Directory<\/a> from your admin dashboard by browsing to<i> Appearance &gt; Themes &gt; Add New<\/i>. Next, you can click on the <i>Feature Filter<\/i> and select <i>Full Site Editing<\/i>, followed by <i>Apply<\/i>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1067\" height=\"563\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-global-styles.jpg\" alt=\"WordPress Full-Site Editing theme feature filter\" class=\"wp-image-33280 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/03\/wordpress-global-styles.jpg.webp 1067w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-global-styles-300x158.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-global-styles-1024x540.jpg 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-global-styles-768x405.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/03\/wordpress-global-styles-600x317.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/03\/wordpress-global-styles-730x385.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/03\/wordpress-global-styles-784x414.jpg.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/03\/wordpress-global-styles-877x463.jpg.webp 877w\" data-sizes=\"(max-width: 1067px) 100vw, 1067px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1067px; --smush-placeholder-aspect-ratio: 1067\/563;\" \/><\/figure><\/div>\n\n\n<p>Once you <a href=\"https:\/\/www.dreamhost.com\/blog\/how-to-pick-wordpress-theme\/\" target=\"_blank\" rel=\"noopener\">find a WordPress theme<\/a> you like, you can hover your mouse over it, then select <i>Install<\/i> followed by <i>Activate<\/i>. We\u2019ll be using <a href=\"https:\/\/make.wordpress.org\/core\/2021\/10\/06\/introducing-twenty-twenty-two\/\" target=\"_blank\" rel=\"noopener\">Twenty Twenty-Two<\/a>, which may already be installed if you are using WordPress 5.9 or later.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-accessing-the-styles-interface\"><b>Accessing the Styles Interface<\/b><\/h3>\n\n\n\n<p>Next, head over to your Theme Editor (<i>Appearance &gt; Editor<\/i>). In the top right-hand corner of the screen, you\u2019ll see a half-shaded circle, which represents the Styles panel:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"794\" height=\"537\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-global-styles-twenty-twenty-two.jpg\" alt=\"WordPress Global styles panel\" class=\"wp-image-33279 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/03\/wordpress-global-styles-twenty-twenty-two.jpg.webp 794w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-global-styles-twenty-twenty-two-300x203.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-global-styles-twenty-twenty-two-768x519.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/03\/wordpress-global-styles-twenty-twenty-two-600x406.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/03\/wordpress-global-styles-twenty-twenty-two-730x494.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/03\/wordpress-global-styles-twenty-twenty-two-784x530.jpg.webp 784w\" data-sizes=\"(max-width: 794px) 100vw, 794px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 794px; --smush-placeholder-aspect-ratio: 794\/537;\" \/><\/figure><\/div>\n\n\n<p>When you first click on it, it will present a Styles Welcome Guide. If you need access to this in the future, you can find it by clicking on the three vertical dots in the upper right-hand corner and selecting <i>Welcome Guide<\/i>.<\/p>\n\n\n\n<p>The preview window shows you how the current style of your theme looks. Under the Styles panel, you\u2019ll find settings for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Typography<\/li>\n\n\n\n<li>Colors<\/li>\n\n\n\n<li>Layout<\/li>\n\n\n\n<li>Blocks<\/li>\n<\/ul>\n\n\n\n<p>Let\u2019s take a closer look at each.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-typography\"><b>Typography<\/b><\/h4>\n\n\n\n<p>Under <i>Typography<\/i>, you can manage the typography settings for two elements: <i>Text<\/i> and <i>Links<\/i>.<\/p>\n\n\n\n<p>You can change the font family and size:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"663\" height=\"388\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-global-styles-4.jpg\" alt=\"WordPress Global Styles typography settings screen\" class=\"wp-image-33278 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/03\/wordpress-global-styles-4.jpg.webp 663w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-global-styles-4-300x176.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/03\/wordpress-global-styles-4-600x351.jpg.webp 600w\" data-sizes=\"(max-width: 663px) 100vw, 663px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 663px; --smush-placeholder-aspect-ratio: 663\/388;\" \/><\/figure><\/div>\n\n\n<p>You can also adjust the line height and select a font-weight. You\u2019ll have these same options for your links. When you\u2019re done, remember to save your changes.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-colors\"><b>Colors<\/b><\/h4>\n\n\n\n<p>Under <i>Colors<\/i>, you\u2019ll find the default color presets that come with your theme. To create your own color palettes, you can enter the <i>HEX<\/i> value numbers or use the drag-and-drop color picker to generate your preferred colors:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"663\" height=\"388\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-global-styles-3.jpg\" alt=\"WordPress Global Styles color settings\" class=\"wp-image-33277 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/03\/wordpress-global-styles-3.jpg.webp 663w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-global-styles-3-300x176.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/03\/wordpress-global-styles-3-600x351.jpg.webp 600w\" data-sizes=\"(max-width: 663px) 100vw, 663px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 663px; --smush-placeholder-aspect-ratio: 663\/388;\" \/><\/figure><\/div>\n\n\n<p>You can also rename the colors to something more identifiable or descriptive than the standard hexadecimal alphanumeric values. You can add custom gradients, apply duo-tone filters to images, and more.<\/p>\n\n\n\n<p>Next, you can modify the colors for three main elements: <i>Background<\/i>, <i>Text<\/i>, and <i>Links<\/i>. You can also select any of these elements to customize the styling. The changes will be applied instantly as you are editing.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-layout\"><b>Layout<\/b><\/h4>\n\n\n\n<p>Under <i>Layout<\/i>, you can adjust padding and other elements. This is straightforward and can be very useful when you need to make a minor adjustment (for example, for the sake of page symmetry).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-blocks\"><b>Blocks<\/b><\/h4>\n\n\n\n<p>Finally, you can change the appearance of individual blocks. After you select <i>Blocks <\/i>from the Styles panel, you\u2019ll find a list of blocks on your site.<\/p>\n\n\n\n<p>Let\u2019s say you wanted to change the style of your Heading block. You can select <i>Heading <\/i>from the list, then adjust its <i>Colors <\/i>and <i>Typography <\/i>settings:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"926\" height=\"426\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-global-styles-2.jpg\" alt=\"Styling options for the WordPress Heading block\" class=\"wp-image-33276 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/03\/wordpress-global-styles-2.jpg.webp 926w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-global-styles-2-300x138.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-global-styles-2-768x353.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/03\/wordpress-global-styles-2-600x276.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/03\/wordpress-global-styles-2-730x336.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/03\/wordpress-global-styles-2-784x361.jpg.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/03\/wordpress-global-styles-2-877x403.jpg.webp 877w\" data-sizes=\"(max-width: 926px) 100vw, 926px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 926px; --smush-placeholder-aspect-ratio: 926\/426;\" \/><\/figure><\/div>\n\n\n<p>When you\u2019re done, you can click on <i>Save<\/i>. If you ever want to revert back to the theme styles you had before making changes, you can navigate to the Styles panel, click on the three vertical dots, and then select <i>Reset to defaults<\/i>.<\/p>\n\n\n\n<h2 id=\"h-a-better-way-to-use-and-style-wordpress\" class=\"wp-block-heading\"><b>A Better Way to Use and Style WordPress<\/b><\/h2>\n\n\n\n<p>WordPress is continuously working to improve the editing experience for its users. Now, thanks to Global Styles, theme development has just become that much easier for both beginners and seasoned professionals.<\/p>\n\n\n\n<p>As discussed in this post, you can create a<i> theme.json<\/i> file to apply Global Styles configurations to your theme. You can also use the Styles editor with a block-based theme to customize the appearance of your site. All this makes designing a successful website a breeze.<\/p>\n\n\n\n<p>DreamHost is a team of experienced web experts. We understand the importance of optimizing your WordPress experience. We promise to support your efforts using the latest <a href=\"https:\/\/www.dreamhost.com\/blog\/ways-to-support-open-source\/\" target=\"_blank\" rel=\"noopener\">open-source<\/a> tech and award-winning support. Check out our <a href=\"https:\/\/www.dreamhost.com\/wordpress\/managed\/\" target=\"_blank\" rel=\"noopener\">Managed WordPress hosting plans<\/a> today to learn more!<\/p>\n\n\n\n\n\n<div\n\tclass=\"article-cta-shared article-cta-small\"\n>\n    <div class=\"tr-img-wrap-outer jsLoading\"><img decoding=\"async\" class=\"js-img-lazy \" src=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/themes\/blog2018\/assets\/img\/lazy-loading-transparent.webp\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/themes\/blog2018\/assets\/img\/article-small-ad-cta-placeholder.webp 1x, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/themes\/blog2018\/assets\/img\/article-small-ad-cta-placeholder-x2.webp 2x\"  alt=\"Ad background image\" \/><\/div>\n\n\n\n\n  <div class=\"content-btm\">\n    <h2\n      class=\"h2--md\"\n    >\n      Do More with DreamPress\n    <\/h2>\n    <p\n      class=\"p--md\"\n    >\n      DreamPress Plus and Pro users get access to Jetpack Professional (and 200+ premium themes) at no added cost!\n    <\/p>\n\n            <a\n            href=\"https:\/\/www.dreamhost.com\/wordpress\/managed\/\"\n                        class=\"btn btn--white-outline btn--sm btn--round\"\n                                    target=\"_blank\"\n            rel=\"noopener noreferrer\"\n            >\n                            Check Out Plans                    <\/a>\n\n  <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>WordPress blocks and Full-Site Editing (FSE) features make building and styling a successful website quick and easy. Global Styles can help you unify the appearance of your WordPress site without having to edit single blocks or pages. So whether you want to change your background color or adjust the heading typography, you\u2019ll be able to [&hellip;]<\/p>\n","protected":false},"author":1062,"featured_media":33273,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_yoast_wpseo_metadesc":"Global Styles can help you control the appearance of your WordPress website without having to go in and edit single blocks or pages. Read on to learn more.","toc_headlines":"[[\"h-an-overview-of-wordpress-global-styles\",\"<b>An Overview of WordPress Global Styles<\/b>\"],[\"h-why-use-wordpress-global-styles\",\"<b>Why Use WordPress Global Styles<\/b>\"],[\"h-creating-the-theme-json-file\",\"<b>Creating the theme.json File<\/b>\"],[\"h-how-to-style-your-wordpress-site-using-global-styles\",\"<b>How to Style Your WordPress Site Using Global Styles<\/b>\"],[\"h-a-better-way-to-use-and-style-wordpress\",\"<b>A Better Way to Use and Style WordPress<\/b>\"]]","hide_toc":false,"footnotes":""},"categories":[13121,550,696],"tags":[],"class_list":["post-33258","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-decoding-wordpress","category-tutorials","category-wordpress"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.3 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>An Introduction to WordPress Global Styles - DreamHost<\/title>\n<meta name=\"description\" content=\"Global Styles can help you control the appearance of your WordPress website without having to go in and edit single blocks or pages. Read on to learn more.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www-dev.dreamhost.com\/blog\/wordpress-global-styles\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Decoding WordPress: An Introduction to Global Styles\" \/>\n<meta property=\"og:description\" content=\"Global Styles can help you control the appearance of your WordPress website without having to go in and edit single blocks or pages. Read on to learn more.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www-dev.dreamhost.com\/blog\/wordpress-global-styles\/\" \/>\n<meta property=\"og:site_name\" content=\"DreamHost Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DreamHost\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-18T15:11:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-22T01:57:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-full-site-editing-global-styles-social.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jason Cosper\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-full-site-editing-global-styles-social.jpeg\" \/>\n<meta name=\"twitter:creator\" content=\"@dreamhost\" \/>\n<meta name=\"twitter:site\" content=\"@dreamhost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jason Cosper\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"An Introduction to WordPress Global Styles - DreamHost","description":"Global Styles can help you control the appearance of your WordPress website without having to go in and edit single blocks or pages. Read on to learn more.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www-dev.dreamhost.com\/blog\/wordpress-global-styles\/","og_locale":"en_US","og_type":"article","og_title":"Decoding WordPress: An Introduction to Global Styles","og_description":"Global Styles can help you control the appearance of your WordPress website without having to go in and edit single blocks or pages. Read on to learn more.","og_url":"https:\/\/www-dev.dreamhost.com\/blog\/wordpress-global-styles\/","og_site_name":"DreamHost Blog","article_publisher":"https:\/\/www.facebook.com\/DreamHost\/","article_published_time":"2022-03-18T15:11:24+00:00","article_modified_time":"2025-05-22T01:57:50+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-full-site-editing-global-styles-social.jpeg","type":"image\/jpeg"}],"author":"Jason Cosper","twitter_card":"summary_large_image","twitter_image":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-full-site-editing-global-styles-social.jpeg","twitter_creator":"@dreamhost","twitter_site":"@dreamhost","twitter_misc":{"Written by":"Jason Cosper","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www-dev.dreamhost.com\/blog\/wordpress-global-styles\/#article","isPartOf":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/wordpress-global-styles\/"},"author":{"name":"Jason Cosper","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#\/schema\/person\/2273b8bf7336df78f6d99a89c17253c4"},"headline":"Decoding WordPress: An Introduction to Global Styles","datePublished":"2022-03-18T15:11:24+00:00","dateModified":"2025-05-22T01:57:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/wordpress-global-styles\/"},"wordCount":1632,"publisher":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#organization"},"image":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/wordpress-global-styles\/#primaryimage"},"thumbnailUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-full-site-editing-global-styles-featured-1.jpeg","articleSection":["Decoding WordPress","Tutorials","WordPress"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www-dev.dreamhost.com\/blog\/wordpress-global-styles\/","url":"https:\/\/www-dev.dreamhost.com\/blog\/wordpress-global-styles\/","name":"An Introduction to WordPress Global Styles - DreamHost","isPartOf":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/wordpress-global-styles\/#primaryimage"},"image":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/wordpress-global-styles\/#primaryimage"},"thumbnailUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-full-site-editing-global-styles-featured-1.jpeg","datePublished":"2022-03-18T15:11:24+00:00","dateModified":"2025-05-22T01:57:50+00:00","description":"Global Styles can help you control the appearance of your WordPress website without having to go in and edit single blocks or pages. Read on to learn more.","breadcrumb":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/wordpress-global-styles\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www-dev.dreamhost.com\/blog\/wordpress-global-styles\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www-dev.dreamhost.com\/blog\/wordpress-global-styles\/#primaryimage","url":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-full-site-editing-global-styles-featured-1.jpeg","contentUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/03\/wordpress-full-site-editing-global-styles-featured-1.jpeg","width":900,"height":598,"caption":"WordPress Full Site Editing Global Styles"},{"@type":"BreadcrumbList","@id":"https:\/\/www-dev.dreamhost.com\/blog\/wordpress-global-styles\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dhblog.dream.press\/blog\/"},{"@type":"ListItem","position":2,"name":"Decoding WordPress: An Introduction to Global Styles"}]},{"@type":"WebSite","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#website","url":"https:\/\/www-dev.dreamhost.com\/blog\/","name":"DreamHost Blog","description":"","publisher":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www-dev.dreamhost.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#organization","name":"DreamHost","url":"https:\/\/www-dev.dreamhost.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/dhblog.dream.press\/blog\/wp-content\/uploads\/2019\/01\/dh_logo-blue-2.png","contentUrl":"https:\/\/dhblog.dream.press\/blog\/wp-content\/uploads\/2019\/01\/dh_logo-blue-2.png","width":1200,"height":168,"caption":"DreamHost"},"image":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DreamHost\/","https:\/\/x.com\/dreamhost","https:\/\/www.instagram.com\/dreamhost\/","https:\/\/www.linkedin.com\/company\/dreamhost\/","https:\/\/www.youtube.com\/user\/dreamhostusa"]},{"@type":"Person","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#\/schema\/person\/2273b8bf7336df78f6d99a89c17253c4","name":"Jason Cosper","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/02\/IMG_4807-scaled.jpeg","url":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/02\/IMG_4807-scaled.jpeg","contentUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/02\/IMG_4807-scaled.jpeg","caption":"Jason Cosper"},"description":"Jason is DreamHost\u2019s WordPress Product Advocate, based out of Bakersfield, CA. He is currently working on making our DreamPress product even better. In his free time, he likes to curl up on the couch and watch scary movies with his wife Sarah and three very small dogs. Follow him on Twitter.","url":"https:\/\/www-dev.dreamhost.com\/blog\/author\/jasoncosper\/"}]}},"lang":"en","translations":{"en":33258,"es":33260,"pt":52864,"de":52868,"pl":54238,"uk":54247,"ru":54273,"it":68241,"fr":70068,"nl":70101},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/33258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/users\/1062"}],"replies":[{"embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/comments?post=33258"}],"version-history":[{"count":9,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/33258\/revisions"}],"predecessor-version":[{"id":61554,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/33258\/revisions\/61554"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/media\/33273"}],"wp:attachment":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/media?parent=33258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/categories?post=33258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/tags?post=33258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}