-
Notifications
You must be signed in to change notification settings - Fork 55
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: revert useless a:any-link:hover change #268
Conversation
✅ Deploy Preview for infima ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Size Change: -3.34 kB (-1%) Total Size: 558 kB
ℹ️ View Unchanged
|
Dist CSS Diffdiff --git a/packages/core/dist/css/default/default.css b/packages/core/dist-branch/css/default/default.css
index f258e29..52e3ab6 100644
--- a/packages/core/dist/css/default/default.css
+++ b/packages/core/dist-branch/css/default/default.css
@@ -1233,25 +1233,7 @@ a {
transition: color var(--ifm-transition-fast) var(--ifm-transition-timing-default);
}
-a:link:hover, a:visited:hover {
- color: var(--ifm-link-hover-color);
- /* autoprefixer: ignore next */
- text-decoration: var(--ifm-link-hover-decoration);
- }
-
-a:-webkit-any-link:hover {
- color: var(--ifm-link-hover-color);
- /* autoprefixer: ignore next */
- text-decoration: var(--ifm-link-hover-decoration);
- }
-
-a:-moz-any-link:hover {
- color: var(--ifm-link-hover-color);
- /* autoprefixer: ignore next */
- text-decoration: var(--ifm-link-hover-decoration);
- }
-
-a:any-link:hover {
+a:hover {
color: var(--ifm-link-hover-color);
/* autoprefixer: ignore next */
text-decoration: var(--ifm-link-hover-decoration); |
Thought about it, but we may expect more complaints like facebook/docusaurus#7617 coming in 😅 I don't have objections to this, but I wonder what the purpose of changing the style for all Edit: I see this:
Not sure if a11y experts will accept the idea of "non-link |
Looks like it may not be a big deal in this specific case if some users have an inappropriate
Yes, I think it may not be useful in the first place 😅 thanks for noticing that The created demo looks artificial and does not match what we have on the Docusaurus side. I've run this query on many Docusaurus pages and couldn't find a single usage: @srmagura I'm going to revert this change and adapt the "artificial" example ensure that breadcrumbs without links are not using |
https://www.w3.org/TR/2011/WD-html5-author-20110809/the-a-element.html I guess we can assume we'll never have this case in the future, but may revisit later the introduction of Wonder if the breadcrumb items without links can be interpreted as "placeholder" 🤪 Note we have Infima demo items using |
Maybe a11y gurus like @BenDMyers has more insight on this 😄 We do have the jsx-a11y rule that forbids this case:
|
Thanks @slorber !!! Seems like I made this change based on the Infima demo site having an example which does not actually occur in practice. Sorry for the regression. |
Revert half of #266
a:any-link:hover
change is not necessary and was based on an artificial usage of<a className="xyz">
which we don't have in practice (we use<span>
in such cases)Former issue text before reverting
Fix issue where all links have unexpected underlines:
Docusaurus issue: facebook/docusaurus#7748
See comment https://github.com/facebookincubator/infima/pull/266/files#r917208453
Alternative PR: #267
Support for
:where
is good enough and we already use it anyway: https://caniuse.com/?search=whereIt's a good new tool to keep CSS specificity low