Skip to content

Hide paragraph Drop Cap and Fit Text controls when a state is selected - #78672

Merged
talldan merged 2 commits into
trunkfrom
hide/paragraph-drop-cap-when-state-selected
May 28, 2026
Merged

talldan merged 2 commits into
trunkfrom
hide/paragraph-drop-cap-when-state-selected

Conversation

@talldan

@talldan talldan commented May 26, 2026

Copy link
Copy Markdown
Contributor

Stacked on top of #78670, so that should be merged first. Also lets check perf results before merging this. If it shows issues I can look at further optimizations.

What?

Hides the paragraph block's drop cap control when a responsive state (Mobile / Tablet) is selected.

Why?

Currently changing drop cap for a given viewport isn't supported, so this avoid confusion for users.

The drop cap implementation will need some improvements for it to be supported.

How?

Hides the control by checking the hasSelectedStyleState, which was implemented in #78670.

Testing Instructions

  1. Add a paragraph with some text
  2. Select 'Mobile' or 'Tablet' from the state dropdown in the block inspector block card
  3. Check that Drop cap can't be changed for those responsive states

Screenshots or screencast

Before After
Screenshot 2026-05-26 at 5 48 01 pm Screenshot 2026-05-26 at 5 47 31 pm

Use of AI Tools

OpenCode / Codex

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

Labels

[Block] Paragraph Affects the Paragraph Block [Package] Block editor /packages/block-editor [Package] Block library /packages/block-library [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants