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

Doc: Fix description and documentation for link color support #46405

Merged
merged 1 commit into from
Dec 8, 2022

Conversation

t-hamano
Copy link
Contributor

@t-hamano t-hamano commented Dec 8, 2022

What?

This PR updates the incorrect description and documentation of the block support link color. Specifically, remove explanations mainly related to the linkColor property.

Why?

My understanding is that for text color and background color, either of the following is stored as attributes:

  • Text Color: textColor, style.color.text
  • Background Color: backgroundColor, style.color.background

However, as far as the link color, it's only stored in style.elements.link.color.text, regardless of whether it is the custom color or not, and linkColor doesn't appear to be in use right now.

link

How?

In the handbook and in the schema of block.json, I have removed the description of linkColor. I have also updated the sample code presented in the Support section of the handbook to be correct.

Testing Instructions

This PR has no impact on the code.

@t-hamano t-hamano added the [Type] Developer Documentation Documentation for developers label Dec 8, 2022
@t-hamano t-hamano self-assigned this Dec 8, 2022
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

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

The updates are correct. There is no linkColor color attribute added.
We can check that in:
packages/block-editor/src/hooks/style.js and packages/block-editor/src/hooks/color.js.

@jorgefilipecosta jorgefilipecosta merged commit 6c3bdc6 into trunk Dec 8, 2022
@jorgefilipecosta jorgefilipecosta deleted the doc/fix-link-attributes-definition branch December 8, 2022 22:09
@github-actions github-actions bot added this to the Gutenberg 14.8 milestone Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants