-
Notifications
You must be signed in to change notification settings - Fork 90
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
chore(links): update visited links colors and application #1735
Conversation
✅ Deploy Preview for stacks ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it just me or is there no more hover color change on the Visited link? I think it use to go up/down a stop depending on dark/light mode. I'm looking at the Stacks docs now and in the PR env here
I can reproduce the same. It looks like now visited links are always |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not expect this "simple" ticket to involve so many changes. 😱
Apart from the point raised from @CGuindon the other changes seems reasonable to me. I feel we are wrestling quite a bit CSS specificity (hence the many changes). I also do think there is a high probability we might have missed something but it is also a relatively low risk change so I am ok with going ahead with it.
Thanks @dancormier for the thorough PR.
I would keep the same logic of color stops |
I'd like to punt on implementing visited styles for links within `.s-input-message` since the link colors do not follow our standard 400/500/600 pattern for default/hover/visited. @CGuindon thoughts?
I've added input messageI noticed tests were failing for the s-input-message component and realized that the visited link style was being applied to the link within that element (for some reason, our visual tests render those links as if they're visited no matter what 🤷♂️). I found that we use a different color pattern than our usual 400/500/600 pattern for default/hover/visited. @CGuindon would we be okay to punt on visited link styles for anchors within |
|
To be clear, the links only show up as visited in the visual tests images, not by default when the component is rendered.
They would stay as they are now (visited state will not change the color of the link within the input messages) |
@CGuindon @giamir I decided to ditch the This is the most significant change: a {
&:visited {
&:not([class*="s-"]),
&.s-link,
&.s-sidebarwidget--action,
&.s-user-card--link {
&:hover {
color: var(--_li-fc-hover-visited);
}
color: var(--_li-fc-visited);
}
}
} This is specifying to apply these styles to anchors that don't include a class starting with @giamir I'd like to get your thoughts on this approach and it's relative safety when compared to the previous approach when you have a moment. The stuff below is nonsense, so feel free to ignore it. Story time (aka TIL about properties allowed in
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see all the purples now 🎉!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@giamir I'd like to get your thoughts on this approach and it's relative safety when compared to the previous approach when you have a moment.
I think &:not([class*="s-"])
is pretty smart and not less safe than what we had before. Great work @dancormier! 🎉
)" This reverts commit fdc320d.
* fix(links): make visited dark mode links purple-500 * Update color for .s-link__visited * Fix link visited selector, anchor visited selector * minor formatting fix * Prevent changes from impacting input messages I'd like to punt on implementing visited styles for links within `.s-input-message` since the link colors do not follow our standard 400/500/600 pattern for default/hover/visited. @CGuindon thoughts? * Implement style for hover + visited links * formatting * Use purple-600 for visited+hover * exclude all `.s-*` elements from default visited styles (with exception) * fix typo * Revert unneeded breadcrumb visited override * whitespace fix
STACK-481
This PR updates the visited link style to
purple-500
(andpurple-600
when visited and hovering) where appropriate.Changes of note
(see this change for the list of unaffected elements). I'll be testing this in Core, but would appreciate feedback on this approach in the meantime.:link
—:visited
—:hover
—:active
). See the:visited
MDN page for more detailsTesting these changes
Tip
The below seems to not work in incognito/private browser modes since (TIL) these modes do not honor visited link styles (at least in Mac Firefox and Chrome)
https://deploy-preview-1735--stacks.netlify.app//product/components/links/#
(note the#
at the end. Observe that the appropriate links are nowpurple-500
. Ensure this renders as expected in all modes.purple-500
when expected