Skip to content

How to absorb font size units #25137

@oandregal

Description

@oandregal

Follow-up #24250 (comment)

In developing the Global Styles sidebar, we ran into the issue of having to convert to/from units the font size property. The issue is that font size values are serialized as px values in the post editor, so we did the same for the site editor.

This makes it so the global styles sidebar has to absorb that processing from theme.json data, which was done via utility functions fromPx/toPx.

This is to discuss further steps on how to best manage font-size units. Can we make it so that the UI component is responsible to absorb this complexity?

Metadata

Metadata

Assignees

Labels

Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonNeeds DecisionNeeds a decision to be actionable or relevant[Feature] Design ToolsTools that impact the appearance of blocks both to expand the number of tools and improve the experi

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions