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

Preset colors from the default palette are serialized as inline styles #36770

Closed
oandregal opened this issue Nov 23, 2021 · 4 comments · Fixed by #36841
Closed

Preset colors from the default palette are serialized as inline styles #36770

oandregal opened this issue Nov 23, 2021 · 4 comments · Fixed by #36841
Assignees
Labels
[Feature] Colors Color management [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Bug An existing feature does not function as intended

Comments

@oandregal
Copy link
Member

oandregal commented Nov 23, 2021

In testing the new color UI component that shows up to 3 different palettes (default, theme, custom), I've noticed that preset colors from the default palette are serialized as inline colors, instead of having their class applied, like the theme colors.

How to reproduce

  • Use a theme with theme.json support, for example TwentyTwentyTwo.
  • Add a paragraph block with a link.
  • Select a preset color from the theme palette for text, a preset color from the theme palette for background, and a preset color from the theme palette for link.

Notice that the color is serialized in the inline style attribute of the block instead of being serialized as a class.

@oandregal oandregal added [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [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 Nov 23, 2021
@oandregal oandregal changed the title Global Styles: default & theme presets Preset colors from the default palette are serialized as inline styles Nov 23, 2021
@oandregal oandregal removed the Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json label Nov 23, 2021
@jorgefilipecosta jorgefilipecosta self-assigned this Nov 23, 2021
@skorasaurus skorasaurus added the [Feature] Colors Color management label Nov 23, 2021
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Nov 24, 2021
@oandregal oandregal reopened this Dec 3, 2021
@oandregal
Copy link
Member Author

oandregal commented Dec 3, 2021

I still can repro this. cc @jorgefilipecosta

@oandregal oandregal removed the [Status] In Progress Tracking issues with work in progress label Dec 3, 2021
@Mamaduka
Copy link
Member

Mamaduka commented Jan 5, 2022

I'm removing this issue from WP 5.9 project board since RC1 was released last night. But we should try and fix this in a minor release.

@jorgefilipecosta
Copy link
Member

This issue seems to be already fixed on Gutenberg and WordPress core, @oandregal would you be able to retest?

@oandregal
Copy link
Member Author

I've retested this in the latest WordPress 5.9 and WordPress 5.8 with the latest plugin: it works as expected so it can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Colors Color management [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants