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

Only show dotted underline on abbr[title] if @media (supports: hover) media query #62

Open
coliff opened this issue Jun 20, 2022 · 1 comment

Comments

@coliff
Copy link

coliff commented Jun 20, 2022

Currently we have this:

abbr[title] {
  text-decoration: underline dotted;
}

This means that abbr tags have dotted underline even on iPhone and iPad where its impossible to see the title as browser doesn't support hover - even with a mouse connected.

I propose to change this to:

@media (hover: none) {
  abbr[title] {
    text-decoration: none;
  }
}

@media (hover: hover) {
  abbr[title] {
    text-decoration: underline dotted;
  }
}
@sindresorhus
Copy link
Owner

Makes sense to be, but I will leave it open for a while to gather feedback.

It should use this media query: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/hover

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants