Hacker News new | ask | show | jobs
by hftf 4239 days ago
I had seen this effect about two years ago on the website of Roman Komarov and was impressed by it at the time: http://kizu.ru/en/fun/
1 comments

I really like how he applies the styles on hover. I wanted to do something like that with SmartUnderline but unfortunately there is no way to call getComputedStyle with the :hover pseudo-class applied. (This is necessary because SmartUnderline only applies to links which have text-decoration underline.)

Traversing the enter style ruleset is possible but didn’t seem worth it for a library like this.

Another way is through a configuration option. Something like `SmartUnderline.init({ '.content a': 'hover' });` perhaps.