Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styles: Paragraph styling impacts Site Title & Site Tagline #46863

Open
annezazu opened this issue Jan 3, 2023 · 10 comments · May be fixed by #47282
Open

Styles: Paragraph styling impacts Site Title & Site Tagline #46863

annezazu opened this issue Jan 3, 2023 · 10 comments · May be fixed by #47282
Assignees
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@annezazu
Copy link
Contributor

annezazu commented Jan 3, 2023

Description

When changing Styles for the Paragraph block, the site title and site tagline are also impacted, despite being separate blocks, in Gutenberg 14.8.4.

Step-by-step reproduction instructions

  1. Using 14.8.4 open the Site Editor > Styles.
  2. Head to Blocks > Paragraph
  3. Make changes and notice it impacts the Site Title and Site Tagline.
  4. Try to make changes to Site Title afterwards and notice the changes to stick.

Screenshots, screen recording, code snippet

styles.changes.mov

Environment info

  • WP 6.1.1
  • GB 14.8.4
  • TT3

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

Yes

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

Yes

@annezazu annezazu added [Type] Bug An existing feature does not function as intended Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Jan 3, 2023
@priethor priethor moved this to 💻 Needs development in Gutenberg Phase 2: Customization Jan 5, 2023
@apeatling
Copy link
Contributor

The cause of this looks to be targeting the styles on the p html element which then bleeds into any block that contains a paragraph element. You can also see the issue on blocks like post comments form.

@juanfra
Copy link
Member

juanfra commented Jan 6, 2023

Probably targeting only the paragraph block p on the entry content could be a solution.

@juanfra
Copy link
Member

juanfra commented Jan 6, 2023

I've been checking this one a bit more in-depth, and the paragraph block is not using class name, which makes it more complicated to target styles only for the content produced by this block.

We could potentially start using class names for the paragraph block and target the styles only for this type of block. The tradeoff with this fix will be that there's no backward compatibility and it'll work only for content produced after the fix. A different option could be adding more targeted css for this but it could lead into a rabbit hole.

@ndiego
Copy link
Member

ndiego commented Jan 10, 2023

Regarding block-specific classes, the same is true for lists. Recently headings were the same, but now headings receive block classes. While adding classes to every paragraph block is not ideal, I am not sure of another way to fix this without complex and potentially fragile CSS.

@apeatling
Copy link
Contributor

Good context @ndiego, thanks. I assumed adding the classname would cause a bunch of invalidations, but looks like the heading blocks classnames were added server side which avoided the issue. Adding the classname seems like the most obvious option.

@juanfra
Copy link
Member

juanfra commented Jan 18, 2023

Sounds good. I can open a PR with the changes to add the CSS class to paragraphs in the coming days.

juanfra added a commit to juanfra/gutenberg that referenced this issue Jan 19, 2023
@juanfra juanfra linked a pull request Jan 19, 2023 that will close this issue
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jan 19, 2023
@annezazu annezazu moved this to ❓ Triage in WordPress 6.2 Editor Tasks Jan 24, 2023
@ndiego ndiego moved this from ❓ Triage to 📥 Todo in WordPress 6.2 Editor Tasks Jan 30, 2023
@glendaviesnz glendaviesnz moved this from 📥 Todo to 🏗️ In Progress in WordPress 6.2 Editor Tasks Feb 2, 2023
@ndiego ndiego moved this from 🏗️ In Progress to 🦵 Punted to 6.3 in WordPress 6.2 Editor Tasks Mar 9, 2023
@priethor priethor moved this from 💻 Needs development to 🏗 In progress in Gutenberg Phase 2: Customization Apr 19, 2023
@ndiego ndiego moved this to ❓ Triage in WordPress 6.3.x Editor Tasks May 23, 2023
@ndiego ndiego moved this from ❓ Triage to 🏗️ In Progress in WordPress 6.3.x Editor Tasks May 23, 2023
@bph bph moved this from 🏗️ In Progress to 🦵 Punted to 6.4 in WordPress 6.3.x Editor Tasks Jul 17, 2023
@bph bph moved this to ❓ Triage in WordPress 6.4 Editor Tasks Jul 25, 2023
@bph bph moved this from Triage to Needs Decision in WordPress 6.4 Editor Tasks Sep 8, 2023
@annezazu annezazu moved this from Needs Decision / Discussion to Punted to 6.5 in WordPress 6.4 Editor Tasks Sep 25, 2023
@bph bph moved this to ❓ Triage in WordPress 6.5 Editor Tasks Nov 23, 2023
@bph bph moved this from ❓ Triage to 🏗️ In Progress in WordPress 6.5 Editor Tasks Nov 23, 2023
@hbhalodia
Copy link
Contributor

hbhalodia commented Dec 19, 2023

Hi, hope all are doing well. Let me know if I can pick this issue up and raise a PR for the same. I see the PR - #47282, quite old, may need rework for the same or may have conflicts.

Thanks.

hbhalodia added a commit to hbhalodia/gutenberg that referenced this issue Dec 19, 2023
This is fixed for the issue WordPress#46863, when any change to global style is added it gets effected to all the elements which have <p> tag, instead of only paragraph. So other blocks like site title was getting changed too.
@annezazu
Copy link
Contributor Author

annezazu commented Feb 5, 2024

Not enough progress has been made for 6.5. Punting this as a result!

@colorful-tones
Copy link
Member

Hi folks,
We are only one week away from the Beta 1 cut-off date for WordPress 6.6. This issue hasn’t seen any movement in a while, so we (the editor triage leads of the 6.6 release) have decided to remove it from the WordPress 6.6 Editor Tasks project board.

@shimotmk
Copy link
Contributor

Hello 👋
I found this issue too.
This pull request has a large impact, but it's very important and great.
#47282
I hope you'll move forward with fixing the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

7 participants