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 Link Block: Use stable variable for underline color styling #68953

Conversation

himanshupathak95
Copy link
Contributor

@himanshupathak95 himanshupathak95 commented Jan 30, 2025

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
Copy link

github-actions bot commented Jan 30, 2025

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 <[email protected]>
Co-authored-by: t-hamano <[email protected]>

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

@himanshupathak95
Copy link
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
Copy link
Contributor

@t-hamano t-hamano left a comment

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 Adding this label triggers the Props Bot workflow for a PR. label Jan 30, 2025
@github-actions github-actions bot removed the props-bot Adding this label triggers the Props Bot workflow for a PR. label Jan 30, 2025
@t-hamano t-hamano merged commit 047fdac into WordPress:trunk Jan 30, 2025
73 of 76 checks passed
@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
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