WordPress / twentytwentytwo

Twenty Twenty-Two, the default WordPress theme that will launch with WordPress 5.9.
404 stars 92 forks source link

Remove unnecessary font weight rule font-weight rule from index and home templates #290

Closed kjellr closed 2 years ago

kjellr commented 2 years ago

This PR removes unnecessary font style + weight declarations from the home.html and index.html templates. These are unnecessary, because the same font weight rule is defined in theme.json already:

https://github.com/WordPress/twentytwentytwo/blob/e9f49804eab30b51b9cd9b7d6b16674f80483b2c/theme.json#L232

... and normal is already the default value for this text anyway.

Removing these from the templates provides more flexibility in customization from child themes, and through theme.json. For example, the "Swiss" variation in this PR tries to make all post titles bold. Before that rule was overridden here didn't work, but with this PR it works fine:

Before After
Screen Shot 2021-12-10 at 8 22 49 AM Screen Shot 2021-12-10 at 8 25 08 AM

There should be no appearance change by default, since these deleted rules exist already.