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

Update example variation font styles #81

Merged
merged 6 commits into from
Aug 23, 2022
Merged

Conversation

mikachan
Copy link
Member

@mikachan mikachan commented Aug 18, 2022

Now that we have included the IBM Plex Mono font family, I've updated the two example style variations that use this font.

  • Example 2 uses it for all text
  • Example 4 uses it for all text, apart from headings and navigation links (which use DM Sans)

As part of this PR, I've also updated all the font styles in each example variation.

@mikachan mikachan added the [Type] Enhancement New feature or request label Aug 18, 2022
@mikachan mikachan requested a review from beafialho August 18, 2022 10:30
@beafialho
Copy link
Collaborator

Nice, this looks good to me. One question: all text (headings, paragraphs, navigation, footer, etc) on Example 2 should have the same font size, is that going we'll address later?

@mikachan
Copy link
Member Author

mikachan commented Aug 18, 2022

Oh, I didn't notice that! That's neat. I think the simplest way to do this in code is to override all the font size presets with the same size, so I've just pushed up a change that does that.

However, this change doesn't seem to be working on my local site. I'm still seeing the variables set to the base theme sizes. Also, if I try to override specific block sizes like so:

"core/post-excerpt": {
	"typography": {
		"fontSize": "var(--wp--preset--font-size--medium)"
	}
},

This also doesn't seem to apply correctly with Example 2 activated.

Could someone else please test this out and see if you're seeing the same?

Things I've tested:

  • Fluid sizes on/off
  • Different themes - Pendant and Remote

@jffng
Copy link
Collaborator

jffng commented Aug 18, 2022

think the simplest way to do this in code is to override all the font size presets with the same size

I can verify the presets are not being overridden when I activate Example 2, but I notice that it's still referring to the fluid typography sizes. I wonder if a fluid scale is set, it will override the presets regardless if a variation is set:

Screen Shot 2022-08-18 at 1 10 31 PM

Also, if I try to override specific block sizes

This works for me but after making the change in the example2.json, I have to have to go into the style picker, select example 2, and hit Save again. 😕

Maybe two issues to raise for discussion upstream?

@mikachan
Copy link
Member Author

mikachan commented Aug 18, 2022

Thanks for testing @jffng.

I tried testing with fluid sizes turned off, but I didn't go back into the style picker and re-select the variation again.

I'll search for and open any required upstream issues. Thank you!

@mikachan
Copy link
Member Author

mikachan commented Aug 18, 2022

I've made several more changes to this PR to update the font styles in all the example variations.

I've also swapped the font files for DM Sans bold and bold-italic as they were the wrong way around.

(Issue for the behaviour described above: WordPress/gutenberg#43395)

@mikachan mikachan changed the title Update example variation fonts to use IBM Plex Mono Update example variation font styles Aug 18, 2022
@mikachan
Copy link
Member Author

Do you think we could merge this and iterate if anything needs to be changed?

@beafialho
Copy link
Collaborator

beafialho commented Aug 23, 2022

Sorry I missed this one from a few days ago.

Do you think we could merge this and iterate if anything needs to be changed?

I think so.. I'm seeing Example 2 with the same size everywhere which is intended 👍

@mikachan
Copy link
Member Author

It's ok, and thank you!

@mikachan mikachan linked an issue Aug 23, 2022 that may be closed by this pull request
@bgardner
Copy link

(Experiencing same issue as @justintadlock in #100... waits for #81 to be merged to regain my sanity) :-)

@mikachan mikachan merged commit c0a16ca into trunk Aug 23, 2022
@mikachan mikachan deleted the update/example-variation-fonts branch August 23, 2022 17:45
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.

DM Sans font italicizes all bold text
4 participants