chinchang / hint.css

A CSS only tooltip library for your lovely websites.
https://kushagra.dev/lab/hint/
MIT License
8.42k stars 701 forks source link

Add $hintSelector variable #158

Open ryanve opened 7 years ago

ryanve commented 7 years ago

This would allow customizing like

$hintSelector: '.hint';
$hintPrefix: 'hint--';

to use like

<div class="hint hint--top">example</div>

and make it easy to customize via .hint

chinchang commented 7 years ago

@ryanve Thanks for the pull request. I would just like to know if there was any use case of yours to change the selector of the tooltips?

ryanve commented 7 years ago

Of course :) I'm using aria-label for the tooltip content so the only way to customize all tooltips would be by the somewhat cumbersome attribute selectors. Being able to use a simple base class like .hint seems cleaner and less error prone.