Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

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

Merged
kjellr merged 2 commits intotrunkfrom
remove-font-weight-rule
Dec 10, 2021
Merged

Remove unnecessary font weight rule font-weight rule from index and home templates#290
kjellr merged 2 commits intotrunkfrom
remove-font-weight-rule

Conversation

@kjellr
Copy link
Copy Markdown
Collaborator

@kjellr kjellr commented Dec 10, 2021

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:

"fontWeight": "300",

... 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.

@kjellr kjellr added the [Type] Enhancement New feature or request label Dec 10, 2021
@kjellr kjellr requested review from jffng and scruffian December 10, 2021 13:33
@kjellr kjellr self-assigned this Dec 10, 2021
<div class="wp-block-query alignwide"><!-- wp:post-template {"align":"wide"} -->
<!-- wp:group {"layout":{"inherit":true}} -->
<div class="wp-block-group"><!-- wp:post-title {"isLink":true,"align":"wide","style":{"typography":{"fontStyle":"normal","fontWeight":"300"}},"fontSize":"huge"} /-->
<div class="wp-block-group"><!-- wp:post-title {"isLink":true,"align":"wide","fontSize":"huge"} /-->
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, I made the same change in the pattern for this query layout.

@kjellr kjellr merged commit 42396d1 into trunk Dec 10, 2021
@kjellr kjellr deleted the remove-font-weight-rule branch December 10, 2021 18:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

[Type] Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants