question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why does it remove :hover?

See original GitHub issue

When I have this in my css

a:hover {
  text-decoration: underline;
}

and it gets inlined, then inline-css does not include them for links. Why?

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:4
  • Comments:19 (5 by maintainers)

github_iconTop GitHub Comments

9reactions
gakimballcommented, Mar 31, 2016

I think the same process that preserves @media in the <style> element could be applied to pseudo-classes, pseudo-selectors, and @font-face as well. Basically, it would be great if any “un-inlineable” CSS could be preserved in <style>.

Whether you bundle those settings into one option or add flags for each one, I’m not sure.

3reactions
thasmocommented, Apr 6, 2016

Styles which can’t be inlined should be preserved in the style tag they origin from, imo. Basically this means all pseudo-elements (before, after, etc.), states (hover, active, etc.) and probably all @-rules (keyframes, media, font-face, etc.) and maybe even others should be preserved.

I’m not using this for emails only, so I think inline-css shouldn’t judge about support of those selectors for email clients but rather preserve everything which can’t be inlined.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS disable hover effect - Stack Overflow
I have really simple solution for this. just create a new class .noHover{ pointer-events: none; }. and use this to disable any event...
Read more >
How to Remove the CSS :hover Behavior from an Element
To remove the CSS hover effect from a specific element, you can set the pointer-events property of the element (the hover behavior of...
Read more >
How to disable a CSS :hover effect? - GeeksforGeeks
Simply remove the class which is adding the hover effect to the element using JQuery by .removeClass() method.
Read more >
CSS disable hover effect | Edureka Community
In the entire DOM, I need to disable mouse hover on a specific button (not all buttons). Please tell me how to do...
Read more >
Dealing with hover on mobile - YouTube
We can 't hover on mobile devices, so what can we do about hover animations and other things that we might need to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found