chinchang / hint.css

A CSS only tooltip library for your lovely websites.

Home Page:https://kushagra.dev/lab/hint/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Html Tag in Hint attribute

Amit1150 opened this issue · comments

commented

I have added Html tag in data-hint attribute. But In tooltip It shows html tag too.

I have also set data-html="true". But It's not working.

See here Fiddle linjk

Hint.css doesn't support HTML inside the tooltips.

@chinchang - Being able to represent HTML entities would be nice for usage with FontAwesome. e.g. I want to display an exclamation-circle before the text in the data attribute.

@et Its a limitation of pseudo element's content property (which hint.css uses) that it doesn't support HTML inside it yet.

Yeah it's a bummer that we don't have multiple content properties (apparently this was suggested for CSS3 but knocked down).

I think it would be required to have some kind of multiple block elements. What are your thoughts about the following markup?

<span class="hint--bottom" data-hint="foo">
  <span class="hint--before"><i class="fa fa-exclamation-circle"></i></span>
  Hover over me
</span>

whats the intended result with the mentioned markup?

@chinchang - roughly this:
screen shot 2016-02-23 at 12 12 38 pm