Skip to content

Tracking: fluid typography  #44888

Closed
Closed

Description

@ramonjd

An overview issue to track fluid typography follow ups and enhancements.

Related:

Fluid typography base functionality

Current improvements, fixes and extensions

Wishlist

Bugs, tasks, and issues not covered here

For bug reports and smaller tasks, we can use the [Feature] Typography issue label for tracking and visibility.

Closed unfixed

Activity

  1. added
    [Type] Tracking Issue
    [Feature] Design Tools
    [Feature] Typography
    on Oct 12, 2022
  2. self-assigned this
    on Apr 3, 2023
  3. eric-michel commented on Jul 27, 2023

    @eric-michel

    @ramonjd I have a quick question regarding #49815.

    Is there a way to independently specify the maximum viewport width for fluid font size calculations? The change in 49815 will significantly reduce the width at which our font sizes will begin shrinking, and could break certain layouts on legacy sites. Going forward, I definitely support using settings.layout.wideSize as the maximum viewport width, but I would like to keep 1600px as the max value for existing sites just to avoid any possible issues.

    If this is something I can set in theme.json right now on those older sites in anticipation of this PR becoming active in WP core, that would be super helpful.

    edit: Looking at the theme.json schema, I don't see a setting for this. I think it would be very useful to make both values (the max and the min) for the calculation independently customizable for those who wish to do so.

  4. ramonjd commented on Jul 28, 2023

    @ramonjd
    MemberAuthor

    Thanks for the question @eric-michel

    This is something I wanted to do much earlier on. See comment and commit history of:

    You're right, it's not possible to configure at the moment, unless you fiddle with the layout width.

    I think it should be possible for theme authors to configure both the min and the max in theme.json. I've added a PR here to remind myself to come back to it 😄

  5. porg commented on Aug 10, 2023

    @porg

    Please integrate #53525 to section "Wishlist"

  6. briceduclos commented on Aug 12, 2023

    @briceduclos

    @ramonjd Are there any plans to add the minimum font size factor as a configurable option in theme.json?

    $minimum_font_size_factor     = min( max( 1 - 0.075 * log( $preferred_font_size_in_px, 2 ), $default_minimum_font_size_factor_min ), $default_minimum_font_size_factor_max );
    $calculated_minimum_font_size = round( $preferred_size['value'] * $minimum_font_size_factor, 3 );
    
    

    The min and max viewport width configurable options are a great improvement. Adding the min size factor would offer precise control over the responsiveness of font sizes. For my website, the current factor makes the curve move towards the minimum too slowly at the beginning and too quickly at the end.

  7. ramonjd commented on Aug 14, 2023

    @ramonjd
    MemberAuthor

    Are there any plans to add the minimum font size factor as a configurable option in theme.json?

    Thanks for the ping.

    Allowing more config options was something that I explored in a previous, now closed, PR..

    scaleFactor is definitely something that may be useful to tweak as it controls how fast the font sizes change between min and max limits.

    Another idea, and something I'd like to pursue, is leveraging filters to override some things.

    It was decided to move slowly with this sort of stuff to provide room for more testing as every change as the potential to affect existing sites implementing the fluid font size system.

    It's on the wishlist in the description of this tracking issue 👍🏻

  8. annezazu commented on Jan 24, 2024

    @annezazu
    Contributor

    Wanted to note adding this to the mix: #58135

  9. ramonjd commented on Feb 23, 2024

    @ramonjd
    MemberAuthor

    I'm going to close this tracking PR, as the main feature has been implemented since WordPress 6.1.

    Subsequent bugfixes and stability updates are complete.

    The outstanding issues can stand on their own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Feature] Design Tools[Feature] Typography[Type] Tracking Issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions