Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Remove opinion from templates #31

Merged
merged 3 commits into from
Aug 11, 2022
Merged

Conversation

scruffian
Copy link
Collaborator

@scruffian scruffian commented Aug 11, 2022

There are quite a lot of styles in the templates which I think can be achieved in theme.json. If we remove these then it gives us a greater range of style options we can achieve using theme.json.

Where it makes sense I have added the opinion to theme.json.

@mikachan mikachan added the [Type] Enhancement New feature or request label Aug 11, 2022
@jffng
Copy link
Collaborator

jffng commented Aug 11, 2022

Where it makes sense I have added the opinion to theme.json.

I think this is missing from the PR?

@scruffian
Copy link
Collaborator Author

Rebased from trunk. I think this is ready for another review.

Copy link
Collaborator

@jffng jffng left a comment

Choose a reason for hiding this comment

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

The only change I noticed was is in the post titles in the single + page templates, they are smaller now:

Before After
Screen Shot 2022-08-11 at 3 37 50 PM Screen Shot 2022-08-11 at 3 38 04 PM

If we're okay with that, this PR LGTM since it will allow for more design flexibility in the variations.

@scruffian
Copy link
Collaborator Author

I made the font size bigger on the Post Title. I also added a new xx-large font size, so that people are following the right naming conventions for fonts.

I also enabled fluid typography in the base theme as I feel like that's a good default to have turned on...

@pbking
Copy link
Collaborator

pbking commented Aug 11, 2022

There are a few 32px spacers scattered about. Could those be instead tied to a preset spacing value? (i.e. --wp--preset--spacing--90 or something).

That's the only thing I see that we might yet want to move from template to configuration and shouldn't delay bringing this in.

These are good changes and it's good to see much less opinion in the templates.

@scruffian
Copy link
Collaborator Author

I don't think its possible to use variables for spacers.

Copy link
Member

@mikachan mikachan left a comment

Choose a reason for hiding this comment

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

Thanks for all the work on this! I agree with the above comments, it's great to see all these settings moved to theme.json.

We could revisit the spacers in another PR if needed.

@scruffian scruffian merged commit c30038e into WordPress:trunk Aug 11, 2022
@scruffian scruffian deleted the remove/opinion branch August 11, 2022 22:04
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.

5 participants