 Hey there, and welcome to Learn WordPress. In this lesson, you're going to learn what happens when you add a theme.json file to a classic theme. The theme.json is a file that allows block theme developers to control the settings and styles of the blocks in the editor. This allows for a central point of configuration while also providing a more consistent experience when configuring theme settings and styles. To learn more about the theme.json file in block themes and how to use it, check out the introduction to theme.json tutorial on learn.wordpress.org. Let's take a look at what happens when you add a theme.json file to a classic theme by adding one to the 2021 theme. To do this, let's first familiarize ourselves with the layout of a page as well as some block editor settings when using 2021. As you can see, in the block editor, the page header and its content is a fixed width and is center aligned. When the page is rendered, the page header and content structure is determined by the styling applied in the theme style.css file. If we want to change the color of something in the editor, say the text color. The only colors listed are those set up by the theme. In this case, this is achieved by adding theme support for the editor color palette feature and passing the theme colors in an array. Now let's add a theme.json file to the 2021 theme. To do this, switch to a code editor like Visual Code Studio and create a new file in the root of the theme folder called theme.json. Next, use the curly braces to start a new JSON object and add the schema and version keys and their respective values. If you refresh the page in the block editor, the first thing you'll notice is that the editor content is slightly out of alignment. This is because that by adding a theme.json to the theme, the default theme.json that ships with WordPress is now activated. That theme.json does not configure the settings, layout, content size setting, so you need to create it. Settings, layout, content size, and we'll set it to 650. If you refresh the page, everything is set correctly. Fortunately, this does not affect the front-end rendering of the page, as this still uses the styling from the theme.style.css file. However, you might find that some default WordPress theme.json settings and styles conflict with or duplicate your existing CSS rules, so it's a good idea to check this and fix anything that's causing issues. If you want to inspect the default WordPress theme.json file, you can find it in your WordPress install in the wp-includes folder. For example, if you go to change the color of the paragraph text, you'll notice that the available colors include the colors specified by the default WordPress theme.json. One of the major benefits of using a theme.json file in your classic themes is the ability to add support for block editor functionality without having to use the add theme support function in your themes functions.php file. For example, let's take a look at the editor color palette feature. In the 2021 theme, the theme colors are set up in the functions.php file, using the add theme support function. However, with the theme.json file, all of this code can be replicated under the settings color palette key. Now, if you remove the color palette from the functions.php file, but specify them in the theme.json file, you can see that all the colors are still available in the editor. This, and all the rest of the block editor settings and styles as detailed in the theme.json tutorial, can also be added and applied to your theme.json file. For a full list of theme features that can be enabled by a theme.json, and therefore removed from functions.php, check out the backward compatibility with add theme support section of the global settings and styles how to guide in the block editor handbook. Happy coding!