Skip to content

Navigation Link Block: Use stable variable for underline color styling - #68953

Merged
t-hamano merged 1 commit into
WordPress:trunkfrom
himanshupathak95:update/navigation-link-underline-color-variable
Jan 30, 2025
Merged

t-hamano merged 1 commit into
WordPress:trunkfrom
himanshupathak95:update/navigation-link-underline-color-variable

Conversation

@himanshupathak95

@himanshupathak95 himanshupathak95 commented Jan 30, 2025 •

Copy link
Copy Markdown
Contributor

Follow-up of: #68628
Related: #68628 (comment)

What?

Updates the navigation link block's invalid/draft state underline color to use an SCSS variable.

Why?

To maintain consistency with Gutenberg's color system and improve maintainability.

Testing Instructions

  1. Create a new post
  2. Add a Navigation block
  3. Add a Navigation Link block within it
  4. Set the link to a draft post
  5. Verify that the underline color appears red (#cc1818)
  6. Create an invalid link state (linking to a trashed post)
  7. Verify that the underline color appears red (#cc1818)

Screenshots

Before After
Before navigation link invalid state 1 After navigation link invalid state 1
Before navigation link invalid state 2 After navigation link invalid state 2

@himanshupathak95
himanshupathak95 marked this pull request as ready for review January 30, 2025 05:30
@github-actions

github-actions Bot commented Jan 30, 2025 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@himanshupathak95

Copy link
Copy Markdown
Contributor Author

@t-hamano I have updated the variable and tested the changes.

I think this PR is ready to be shipped.

Thanks for the suggestion 😇

@t-hamano t-hamano added [Type] Code Quality Issues or PRs that relate to code quality [Block] Navigation Link Affects the Navigation Link Block labels Jan 30, 2025

@t-hamano t-hamano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

Just to be sure, here's how much the colors will change with this PR.

  • Color on the left (trunk): The red color defined in --wp--preset--color--vivid-red, that is, the default theme.json.
  • Color on the right (This PR): The red color defined by the $alert-red variable in the base-styles package.

image

@t-hamano t-hamano added the props-bot Manually triggers Props Bot to ensure the list of props is up to date. label Jan 30, 2025
@github-actions github-actions Bot removed the props-bot Manually triggers Props Bot to ensure the list of props is up to date. label Jan 30, 2025
@t-hamano
t-hamano merged commit 047fdac into WordPress:trunk Jan 30, 2025
@github-actions github-actions Bot added this to the Gutenberg 20.3 milestone Jan 30, 2025
Kallyan01 pushed a commit to Kallyan01/gutenberg that referenced this pull request Feb 24, 2025
…ordPress#68953)

Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
…ordPress#68953)

Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Navigation Link Affects the Navigation Link Block [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants