Live data from Hacker News

Show HN: Hint.css v2.0 – Pure CSS tooltip library

kushagragour.in

31–40 of 64 posts

Re: Show HN: Hint.css v2.0 – Pure CSS tooltip library

#31
post #22

Earlier quoted context omitted.

Ditto. I was also zoomed at 150%, zooming in to 100% makes it go away. Still worth fixing if possible, since many users browse at non-100% zoom.

> "many users browse at non-100% zoom" This sounds dubious. Do you have a source for this?

100% zoom is only usable on relatively large monitors with Full HD resolution or worse.

For anything with a higher DPI (including UHD/4k, but also lower resolutions), zoom is required to be able to read the text on most pages.

I run with 125% zoom on the 5+ year old iMac I use at work, and it makes a big difference.

If you'd like to see what size the fonts are with 100% zoom on a UHD monitor, try setting the zoom to 50%. You'll see.

Re: Show HN: Hint.css v2.0 – Pure CSS tooltip library

#32
post #7

For those wondering, the main trick is here: https://github.com/chinchang/hint.css/blob/master/hint.css#L... This creates a pseudo ":after" element with content set to the value of the data-hint attribute. Smart! https://developer.mozilla.org/en-US/docs/Web/CSS/attr

That's amazingly useful. I'd never seen that before. It says that support other than with 'content' is experimental. Where else does it work? Does anyone have any other useful / novel use cases they could share?

Re: Show HN: Hint.css v2.0 – Pure CSS tooltip library

#34
post #33

I wonder why all those demo-sites include JavaScript. Doesn't this contradict their purpose of demonstrating a pure-CSS library?

Using Google Analytics to measure traffic does not contradict the purpose of demonstrating their tooltip library.

Re: Show HN: Hint.css v2.0 – Pure CSS tooltip library

#36
post #22

Earlier quoted context omitted.

Ditto. I was also zoomed at 150%, zooming in to 100% makes it go away. Still worth fixing if possible, since many users browse at non-100% zoom.

> "many users browse at non-100% zoom" This sounds dubious. Do you have a source for this?

Zooming should be as common a sanity check for web pages as viewing on a tablet or a 320px wide mobile phone should be, IMO.

Re: Show HN: Hint.css v2.0 – Pure CSS tooltip library

#39
post #25

Earlier quoted context omitted.

No. Well, you could use aria-describedby but that has to refer to a separate element. There’s no generic aria-description.

You could use aria-label potentially, but it has fairly scrict semantic connotations as a label for an input, I believe.

Yeah, that should bring in some accessibility. Right now the library uses `data-hint` attribute. We could use `aria-label` attribute instead!

Re: Show HN: Hint.css v2.0 – Pure CSS tooltip library

#40
post #22

Earlier quoted context omitted.

Ditto. I was also zoomed at 150%, zooming in to 100% makes it go away. Still worth fixing if possible, since many users browse at non-100% zoom.

> "many users browse at non-100% zoom" This sounds dubious. Do you have a source for this?

> Do you have a source for this?

I don't. However it seems odd to think people wouldn't zoom in a document viewer.

Let's get some real numbers though: I just asked Addy Osmani on Twitter if there are stats for this, since window.devicePixelRatio changes with zoom.

Post reply on HN