Make WordPress Core

Opened 13 months ago

Closed 12 months ago

Last modified 12 months ago

#59048 closed enhancement (fixed)

Fluid typography: add min and max viewport width configurable options

Reported by: ramonopoly's profile ramonopoly Owned by: isabel_brison's profile isabel_brison
Milestone: 6.4 Priority: normal
Severity: normal Version: 6.4
Component: Editor Keywords: has-patch has-unit-tests gutenberg-merge
Focuses: Cc:

Description

Let's add configurable min and max viewport width values to the typography.fluid theme.json schema, to allow theme developers to configure their own default min and max viewport widths for calculating fluid font sizes.

"What do the min and max viewport widths do?" you ask? Good question.

They define the boundaries, in terms of viewport widths, at which font size clamp values will stop being "fluid". For example, consider the following theme.json settings

Gutenberg PR has been merged: https://github.com/WordPress/gutenberg/pull/53081

As well as the core PHP changes, a NPM package update will be required to complete this task.

Change History (4)

This ticket was mentioned in PR #4989 on WordPress/wordpress-develop by @ramonopoly.


13 months ago
#1

Backporting PHP changes from:

This PR adds configurable min and max viewport width values to the typography.fluid theme.json schema, to allow theme developers to configure their own default min and max viewport widths for calculating fluid font sizes.

The min and max viewport widths the boundaries, in terms of viewport widths, at which font size clamp values will stop being "fluid".

See https://github.com/WordPress/gutenberg/pull/53081 for testing instructions.

Note that this PR will only affect the frontend.

A package update is required for the editor to reflect the changes.

Trac ticket: https://core.trac.wordpress.org/ticket/59048

This ticket was mentioned in PR #4989 on WordPress/wordpress-develop by @ramonopoly.


13 months ago
#2

Backporting PHP changes from:

This PR adds configurable min and max viewport width values to the typography.fluid theme.json schema, to allow theme developers to configure their own default min and max viewport widths for calculating fluid font sizes.

The min and max viewport widths the boundaries, in terms of viewport widths, at which font size clamp values will stop being "fluid".

See https://github.com/WordPress/gutenberg/pull/53081 for testing instructions.

Note that this PR will only affect the frontend.

A package update is required for the editor to reflect the changes.

Trac ticket: https://core.trac.wordpress.org/ticket/59048

#3 @isabel_brison
12 months ago

  • Owner set to isabel_brison
  • Resolution set to fixed
  • Status changed from new to closed

In 56535:

Editor: add configurable viewport sizes for fluid typography.

Adds options to configure min and max viewport sizes for fluid typography in theme.json settings.

Props ramonopoly.
Fixes #59048.

@isabel_brison commented on PR #4989:


12 months ago
#4

Committed in r56535.

Note: See TracTickets for help on using tickets.