Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#59048 closed enhancement (fixed)

Fluid typography: add min and max viewport width configurable options

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

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.


3 years 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.


3 years 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
3 years ago

  • Owner set to isabel_brison
  • Resolution → fixed
  • Status new → 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:


3 years ago
#4

Committed in r56535.

Note: See TracTickets for help on using tickets.