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

fix: correct button visited color #2247

Merged
merged 2 commits into from
Feb 21, 2024
Merged

Conversation

laurelfulford
Copy link
Contributor

@laurelfulford laurelfulford commented Feb 16, 2024

All Submissions:

Changes proposed in this Pull Request:

This PR fixes a specificity change in #2109 -- normally the text colour of the button would be overwritten in the colours PHP, but with it moving to CSS variables, the :visited colour of the button block ends up always being white, often incorrectly.

See 1200550061930446-as-1206624531643238

How to test the changes in this Pull Request:

  1. Add a set of linked button blocks to a post or page -- include:
  • The default colours
  • Custom colours using the palette (greys, or the primary, primary variation, or secondary variation colours)
  • Fully custom colours using the colour pickers.
  1. Navigate to Customizer > Colors, and change the Secondary colour to a light colour. This is used by the button block by default, and will change the button text to black.
  2. Click on your links and come back to the page; note that the visited link of the default block's text turns white:

image

  1. Apply the PR and run npm run build.
  2. Confirm that the default block's text stays black.

image

  1. Confirm the contrast on the other buttons still matches what you picked.
  2. Try switching the Secondary colour back to a darker colour, and confirm that the visited button still looks good.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@laurelfulford laurelfulford added the [Status] Needs Review The issue or pull request needs to be reviewed label Feb 16, 2024
@laurelfulford laurelfulford requested a review from a team as a code owner February 16, 2024 23:43
Copy link
Contributor

@chickenn00dle chickenn00dle left a comment

Choose a reason for hiding this comment

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

Looks good!

@github-actions github-actions bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels Feb 19, 2024
@laurelfulford laurelfulford changed the base branch from trunk to release February 20, 2024 17:01
@laurelfulford laurelfulford changed the base branch from release to trunk February 20, 2024 17:01
@laurelfulford laurelfulford changed the base branch from trunk to release February 20, 2024 19:44
@laurelfulford laurelfulford merged commit da10aec into release Feb 21, 2024
3 checks passed
@laurelfulford laurelfulford deleted the hotfix/visited-button-color branch February 21, 2024 17:07
matticbot pushed a commit that referenced this pull request Feb 21, 2024
## [1.85.1](v1.85.0...v1.85.1) (2024-02-21)

### Bug Fixes

* correct button visited color ([#2247](#2247)) ([da10aec](da10aec))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.85.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released [Status] Approved The pull request has been reviewed and is ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants