Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.43k stars 1.99k forks source link

Links in certain blocks respect the custom font size set in Styles rather than the custom font size set at the individual block level #96718

Open hacchism opened 2 days ago

hacchism commented 2 days ago

Quick summary

If custom font size is set for Links in Styles, that overrides the custom font size set for certain blocks (i.e. Paragraph Block, Heading Block, Navigation Block, or Social Icons Block).

Steps to reproduce

I'm writing details on how to replicate the issue with Paragraph Block as an example, but a similar issue can be replicated with other blocks like Heading Block, Navigation Block, or Social Icons Block.

  1. Activate one of the FSE themes.
  2. Go to Appearance > Editor > Styles and set custom font size for Links.
  3. Create a new page and add a Paragraph Block.
  4. Write some text and make a part of it a text link.
  5. Set custom font size for the Paragraph Block.

What you expected to happen

Both the normal text and the text link in the paragraph shows up with the custom font size set for the particular Paragraph block as follows:

Image

What actually happened

Only the text link shows up smaller respecting the Small custom font size set in Styles as follows:

Image

Impact

Some (< 50%)

Available workarounds?

No but the platform is still usable

If the above answer is "Yes...", outline the workaround.

No response

Platform (Simple and/or Atomic)

No response

Logs or notes

No response

vykes-mac commented 1 day ago

I was able to reproduce the issue. This is not dotcom specific the behaviour is the same in the default gutenberg editor.

more discussion in slack p1732576483908169-slack-C45SNKV4Z

vykes-mac commented 1 day ago

There is also a similar issue already reported in gutenberg https://github.com/WordPress/gutenberg/issues/67133. This seem to affect a lot of blocks that may include a link.