kazzkiq / balloon.css

Simple tooltips made of pure CSS
https://kazzkiq.github.io/balloon.css/
MIT License
5.03k stars 448 forks source link

Cursor style used - can we change the cursor to other cursor styles, such as default or none? #99

Closed ghost closed 6 years ago

ghost commented 6 years ago

The great page https://kazzkiq.github.io/balloon.css/ shows many useful examples - it helped me adapt balloon.css in my project (where a popup shows some additional information about an exam at a university; I use ruby to autogenerate a html table of exams, and now I use balloon.css to add additional information to this too \o/).

There is one thing I'd like to be able to customize which is the arrow type.

Right now the .css has:

cursor: pointer;

Is there a way to customize this, from within the css used?

For example:

<button data-balloon="Whats up!" data-balloon-pos="up">Hover me!</button>

to

or something like that.

The reason why I'd like to use another cursor, or rather, the same cursor, is because I'd like to only show a popup box, and otherwise do no modification at all.

Thanks for considering - feel free to drop this issue here at any moment in time.

kazzkiq commented 6 years ago

You can override the default behavior on your project, using any value acceptable by the property cursor. e.g.:

[data-balloon] {
  cursor: auto !important; /* or any other value you want */
}
dtgay commented 4 years ago

Future travelers:

You will want to use this instead:

[aria-label][data-balloon-pos] {
  cursor: auto !important; /* or any other value you want */
}