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

Navigation Menu: apply colors using block attributes #18376

Merged
merged 1 commit into from
Nov 7, 2019

Conversation

retrofox
Copy link
Contributor

@retrofox retrofox commented Nov 7, 2019

Description

It applies the colors using the block attributes instead of using the textColor and backgroundColor properties.

Fixes #18366

How has this been tested?

Following the issue instructions:

To reproduce
Steps to reproduce the behavior:

  1. Create a post
  2. Create a navigation menu block
  3. Set background and foreground colors
  4. Save and publish the post
  5. Go to Appearance -> Themes and change the theme
  6. Go back to the post you created with the navigation block
  7. See error -> colours are not there anymore

Expected behavior
I expect the colours to be saved even if I switch themes.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

It applies the colors using the block attributes instead of using the textColor and backgroundColor properties.
@retrofox retrofox added [Type] Enhancement A suggestion for improvement. [Block] Navigation Affects the Navigation Block labels Nov 7, 2019
Copy link
Contributor

@draganescu draganescu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works and fixes the problem, color settings are preserved between switching themes.

@draganescu draganescu merged commit da5a61a into master Nov 7, 2019
@draganescu draganescu deleted the update/navigation-menu-retaining-styles branch November 7, 2019 16:01
@retrofox
Copy link
Contributor Author

retrofox commented Nov 7, 2019

Thanks, Andrei.

@youknowriad youknowriad added this to the Gutenberg 6.9 milestone Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Menu colours are lost when switching themes
3 participants