Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Add Theme Style Variation: Onyx #357

Merged
merged 8 commits into from
Sep 17, 2023
Merged

Add Theme Style Variation: Onyx #357

merged 8 commits into from
Sep 17, 2023

Conversation

MaggieCabrera
Copy link
Collaborator

@MaggieCabrera MaggieCabrera commented Sep 13, 2023

Description

Closes #10

This PR creates the 3 style variations. We have a problem with the way we've built patterns, and some of them apply a specific font family to the markup, making the block styles inconsistent. I don't know if we can fix all of them (in some cases we are applying the Cardo font family to paragraphs so they look like they are headings when they are not).

Screenshot 2023-09-13 at 18 42 24

My first instinct is to create a custom variable called heading font and another called base font or something like that, to use them in patterns and then map them in theme.json. This would be the perfect opportunity for refs to work on block markup.

EDIT: This PR paired with #366 should cover the patterns too

@MaggieCabrera
Copy link
Collaborator Author

MaggieCabrera commented Sep 13, 2023

@richtabor @scruffian what do you think?

@MaggieCabrera
Copy link
Collaborator Author

MaggieCabrera commented Sep 13, 2023

Related: WordPress/gutenberg#49279 (comment)

@scruffian
Copy link
Contributor

@richtabor
Copy link
Member

Maybe "body" and "heading" font works better; so variations can register different fonts and they're hooked up as expected.

@MaggieCabrera
Copy link
Collaborator Author

I think a variation of paragraph could work as well, are we overdoing it with all the block styles?

@richtabor
Copy link
Member

I don't think we're overdoing it, but I'm a bit hesitant adding a style to such a prominent block. We can try it in a quick PR, but I'm not sure it's necessary.

@MaggieCabrera
Copy link
Collaborator Author

@richtabor I gave it a try here and I was sadly surprised that you can only change styles via theme.json to default variations and not theme created ones.

@richtabor
Copy link
Member

This should do the trick: #367

@richtabor
Copy link
Member

Also, we need to update accent colors to have a darker luminosity. I can do that.

CleanShot 2023-09-14 at 13 44 53 CleanShot 2023-09-14 at 13 44 49 CleanShot 2023-09-14 at 13 44 41

@richtabor richtabor changed the title Add Theme Style Variations Add Theme Style Variation: Onyx Sep 14, 2023
@richtabor
Copy link
Member

Let's focus on the first variation before doing all the others.

@richtabor
Copy link
Member

richtabor commented Sep 14, 2023

I made some adjustments, focusing on color application. Notably:

  1. Using consistent "slugs" on duotone and gradients ensures that the application of those attributes persist with different variations. That is, duotone-2 is styled by both variations — and still works when used throughout content. Also, the labels are still applicable to the actual color used, i.e. "Dark gray and cinnamon"

Notice how the duotone works for both:

CleanShot.2023-09-14.at.14.40.00.mp4
  1. Removed the additional style variations to focus on just the one. Let's get this solid, then replicate.

Copy link
Member

@richtabor richtabor left a comment

Choose a reason for hiding this comment

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

LGTM as an initial push. We'll want to circle back with font family adjustments, but let's merge this before potential conflicts.

@richtabor richtabor merged commit 20f62f5 into trunk Sep 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Style Variations
3 participants