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

Reset styles doesn't work when style set via pushing to global styles #46860

Open
dsas opened this issue Jan 3, 2023 · 1 comment
Open

Reset styles doesn't work when style set via pushing to global styles #46860

dsas opened this issue Jan 3, 2023 · 1 comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended

Comments

@dsas
Copy link
Contributor

dsas commented Jan 3, 2023

Description

When I use the new 'Push to Global Styles' button introduced in #46446, resetting styles afterwards behaves oddly - it doesn't seem to reset all properties.

What actually happens is that when 'Pushing' to Global Styles some local styles are moved to Global Styles, but some local styles are copied to Global Styles. This means that when resetting global styles, some local styles still remain.

It seems that link color gets moved, but background and text colours are copied. I've tested this on the post title, post excerpt and headings blocks.

Step-by-step reproduction instructions

  1. Open up the site editor
  2. Go to the archive page (just an example any will do)
  3. Choose the Post Title block (just an example, post excerpt behaves the same way)
  4. Set a background colour and a link colour. Note the preview update
  5. In the settings sidebar press 'Advanced' and then 'Push to Global Styles'
  6. Save
  7. Note that the link colours in the sidebar have been reset but the background colour remains
  8. Open the global styles sidebar, open the three dot menu and reset to defaults
  9. Note that the link colour has been reset but not the background colour.

Screenshots, screen recording, code snippet

Screen.Capture.on.2023-01-03.at.18-14-13.mp4

Environment info

Checked out the 4.19.0-rc1 and have built and ran via the provided wp-env on a clean site db.

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

@kathrynwp kathrynwp 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 [Feature] Block settings menu The block settings screen labels Jan 3, 2023
@ndiego ndiego added the Needs Testing Needs further testing to be confirmed. label Jan 10, 2023
@Mamaduka Mamaduka removed Needs Testing Needs further testing to be confirmed. [Feature] Block settings menu The block settings screen labels Jan 10, 2023
@Mamaduka
Copy link
Member

The issue was tested during the Editor Weekly Bug Scrub, and we were able to reproduce the problem.

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 [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants