Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme.json: Add custom properties for Inter Heading font sizes #164

Merged
merged 2 commits into from
Dec 5, 2024

Conversation

ryelle
Copy link
Contributor

@ryelle ryelle commented Dec 4, 2024

See #163 — This sets up the custom properties for "Inter Heading" font sizes and line heights. This also adds the same "breakpoint" switch as the EB Garamond headings, so using the custom property will automatically switch down to the "small screen" font size at 599px.

This can be used in the child themes like so:

"styles": {
	"elements": {
		"h3": {
			"typography": {
				"fontSize": "var(--wp--custom--heading--level-5--inter--typography--font-size)",
				"lineHeight": "var(--wp--custom--heading--level-5--inter--typography--line-height)"
			}
		}
	}
}

Screenshots

No visual change in this PR, this just makes the properties available.

How to test the changes in this Pull Request:

Instructions in the child theme repo: WordPress/wporg-photo-directory#37

@ryelle
Copy link
Contributor Author

ryelle commented Dec 4, 2024

cc @StevenDufresne @adamwoodnz — no review needed (unless you want to), just FYI that these properties exist now.

@ryelle ryelle merged commit 412f17d into trunk Dec 5, 2024
@ryelle ryelle deleted the try/inter-font-sizes branch December 5, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant