sir-dunxalot / ember-tooltips

Easy and extendible tooltips for Ember components - http://sir-dunxalot.github.io/ember-tooltips/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Specifying an overriding css class does nothing

ChiefBK opened this issue · comments

commented

According to the documentation it looks like I can add a CSS class to the ember-tooltip component:

{{ember-tooltip class='tooltip-warning'}}

I have a simple CSS class

.drive-dashboard__table-tooltip {
  background-color: white;
  color: black;
}

And specified this with my component:

{{#ember-tooltip class="drive-dashboard__table-tooltip" event="click" side="bottom"}}
          A tooltip for the settings
{{/ember-tooltip}}

Which rendered the following:
screen shot 2019-02-20 at 3 39 38 pm

No different than the default tooltip CSS.

However if I change the component attributes:

{{#ember-tooltip tooltipClassName="ember-tooltip drive-dashboard__table-tooltip" event="click" side="bottom"}}
          A tooltip for the settings
{{/ember-tooltip}}

It renders correctly with the overridden CSS class
screen shot 2019-02-20 at 3 42 31 pm

What is the proper way to override the CSS of the pop-up?

class will only apply to the wrapper element, rather than the actual tooltip element right now, so the tooltipClassName approach is the correct way to do this.

There's a pending PR #327, which will hopefully clean this up a bit, and provide a more clear way to specify custom classes