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(button): fix anchor hover + visited font color #1883

Merged
merged 5 commits into from
Feb 24, 2025

Conversation

dancormier
Copy link
Contributor

@dancormier dancormier commented Feb 21, 2025

The button component does not receive the correct styling when it meets the following conditions:

  • It is in a :hover state
  • It's rendered as an <a />
  • It has the .s-btn__filled class applied
  • It's :visited

This is due to the styles from :not(.s-btn__outlined) overriding the styles applied to .s-btn__filled.

Relates to

@dancormier dancormier added the bug A reproducible problem with the Stacks code label Feb 21, 2025
@dancormier dancormier requested a review from giamir February 21, 2025 23:12
Copy link

netlify bot commented Feb 21, 2025

Deploy Preview for stacks ready!

Name Link
🔨 Latest commit 7fd1391
🔍 Latest deploy log https://app.netlify.com/sites/stacks/deploys/67bcc79ae743bc0008be21ab
😎 Deploy Preview https://deploy-preview-1883--stacks.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@giamir giamir left a comment

Choose a reason for hiding this comment

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

I can confirm this fix the hover+visited issue for links that looks like filled buttons.

Maybe the only thing we could in this PR or another one is to have a place in the doc where we document and showcase links that have the same styles as a button. Maybe in the links page.

Thanks @dancormier

@dancormier dancormier marked this pull request as ready for review February 24, 2025 19:25
@dancormier dancormier enabled auto-merge (squash) February 24, 2025 19:27
@dancormier dancormier merged commit 55eaa6a into develop Feb 24, 2025
11 checks passed
@dancormier dancormier deleted the dcormier/fix-btn-filled-visited-hover-fc branch February 24, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A reproducible problem with the Stacks code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants