modern-normalize icon indicating copy to clipboard operation
modern-normalize copied to clipboard

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

Open coliff opened this issue 2 years ago • 5 comments

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;
  }
}

coliff avatar Jun 20 '22 11:06 coliff

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

sindresorhus avatar Jun 21 '22 13:06 sindresorhus