WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.5k stars 4.19k forks source link

Details Block: typography changes to summary should be separate from "answer" [open] blocks #66767

Open bradhogan opened 2 days ago

bradhogan commented 2 days ago

Description

Right now, you cannot adjust the typography of the summary (e.g. question) of the details block. A change to the type options for the summary get applied throughout the "answer" portion of the block too.

Step-by-step reproduction instructions

  1. add details block
  2. add summary text
  3. add a few sentences / paragraphs to the answer portion
  4. try to change the font size for the summary and note that those sizes are used in the answer portion too

Screenshots, screen recording, code snippet

No response

Environment info

Please confirm that you have searched existing issues in the repo.

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Please confirm which theme type you used for testing.

yogeshbhutkar commented 1 day ago

@bradhogan, I followed the above mentioned steps, I believe the font size being applied to the answer ( the hidden block ) can be conveniently changed by selecting the block and applying a different font size to it. Here's a screencast for the same.

https://github.com/user-attachments/assets/2aaea5bc-0e74-4639-a02f-e5d95169056e

Please let me know if this was what you were looking for or if there's something else that I overlooked while going through the issue description.

Thank You.

Gutenberg Plugin Info: Version 19.6.0-rc.3 WordPress Version: 6.8-alpha

Testing Update: Also tested on WordPress Version 6.6.2 and it's working as expected.

bradhogan commented 1 day ago

Yes, what you are saying does work but that is a bug imo. The behavior shouldn't be that the answer (child blocks) take on the style of the parent (question).

yogeshbhutkar commented 16 hours ago

I would like to work on this bug and come up with a corresponding PR.