Giter Club home page Giter Club logo

balloon.css's Introduction






Hello, my name is Claudio Holanda Jr.
You can find me hacking at @sevn.

I speak mostly JavaScript, TypeScript, Golang, Svelte and (S)CSS.






balloon.css's People

Contributors

aduh95 avatar andrefarzat avatar andreynering avatar anthony-redfox avatar arjunsajeev avatar brunowego avatar calinou avatar danieljb avatar davesnx avatar dependabot[bot] avatar desvandev avatar ed1nh0 avatar ilkaydnc avatar jandinter avatar jonnitto avatar josephdburdick avatar kazzkiq avatar locness3 avatar lukehaas avatar marcobiedermann avatar memic84 avatar philreinking avatar smartcrash avatar spasticninja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

balloon.css's Issues

[data-balloon-break] missing :after selector

Although the option to break lines using data-balloon-break attribute is not mentioned in wiki, I guess the definition is lacking :after selector in its definition, i.e. the styling should state:

&[data-balloon-break]:before {
    white-space: normal;
}

Optional Transition

Not an issue, just something I came up while thinking about having the possibility to not have the easing animation, making it optional, so I created a new data-attribute to remove it:

[data-balloon-static]:after, [data-balloon-static]:before {
    -webkit-transition: none;
    transition: none;
}

With this if one needs the Balloon without the animation just need to add to the markup:

<button data-balloon-length="small" data-balloon="Hi." data-balloon-static>Hover me!</button>

And, of course, congratulations for the awesome work ;)

fixed tooltip

Is there a way to fixed tooltip?
I need this to indicate a update in on page

svg g?

<g data-v-7d0f1169="" name="root" class="configure" id="v-23" transform="translate(239,167) scale(1,1)" data-balloon="Whats up!" data-balloon-pos="up"> </g>

multiline

Is there anyway that the tooltip can be more than 1 line?

Tooltips in owl carousel items

Hi,

Your ballon.css is awsome, i use it a lot, even better than bootstrap.

Today i found that with overflow: hidden; elements it does not work properly.
I have tried everything that i know, but without any solution, can you help me out?

Thanks in advance,
Tiago

Wrap at screen edge?

Hey, thank you for making this CSS library.

I'm using the generated CSS file, and while using this, I noticed that tooltips are being cut off by the screen edge.

Is there a way for tooltips/balloons to wrap at the end of the screen?

Imgur

z-index of the tooltip?

Hi there,

First of all thanks a lot for this amazing tooltip. I have a tiny issue with it.
I'm using balloon.css with Material UI. I noticed that the tooltip is always underneath the components (like Select or Table Header Row). Wonder why so. I thought that it should be always on top of anything on the screen no matter what. But the opposite that it always got cut by the Material-UI components which are on the top of the page.

Hope it makes sense.

Tooltip styling affected by element

Hello. Thank you for this. It is much improved over hint.css. Also, great to see that you are actively maintaining.

I've noticed that the tooltips adopt some styles from the element being tooltipped.

A couple of uses cases:

  1. opacity is the same as the element's opacity.
    • The workaround was straightforward enough in my case (to , put the data attributes on the element, and stick the text in a child and apply opacity to that span - it's a bit klunky adding elements, but not a big deal.
  2. <strong> text in the element leads to <strong> text in the tooltip. With data-attributes on a an <h5> element (using bootstrap base styling) the tooltip text is bold. No workaround that I've been able to find here.

Here's a link to see: http://seemantk.com/viz/brennan (The tooltips over the bar charts, bar chart labels, and the 3 lists below (Interim Selection, First Full Term, Additional Terms. The tooltips on the map are from d3-tip, as balloon-css doesn't work on SVG).

Cheers,
Seemant

Hide on click

Hi I think it would make sense to hide these buttons on click as now (in chrome) there's a blue outline on click and once the button hides. Also this is the way it works in OsX and its really good UX.

This can be easily achieved by :active css selector. I can fork & update if you are willing to accept?

@Kivylius

Bug on transition

Hello @kazzkiq

I found a problem that when you hover the button, the triangle on ::after have a 1px of separation with the ::before that's the content. If you try to adjust the margin-top or the top property, there's no way that you can avoid this 1px, without overlapsing with the ::before.

Arrow customization

Hello. Congrats and thanks for this amazing plugin.

I've realized you are using svg to create arrows. This is a problem for me because it hinders arrows customizations. I wanted to simply change colors on my site overriding the .min.css and I couldn't do it.

Why don't you use simple borders to make arrows? E.g:

.arrow-right {
  width: 0; 
  height: 0; 
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;  
  border-left: 6px solid green;
}

It would be so much easier to customize colors and everything else.
Do you want help with this?

IE10 hover issue

Hello,
I don't know if I did something wrong as I didn't saw any issue related.
But on IE10 I had an issue where the tooltip was appearing if the mouse was hover the :after element, and not hover the tooltip himself. It's an issue related to the pointer-events:none which is not working < IE11.

I made a quick and dirty fix where I set by default a z-index: -1 to [data-balloon]:after and :before
and on :hover I set back the z-index to 10.

Delay in transition

There is a delay in transition when you hover out of the element which blurs the text before the tooltip is closed. I fixed it by changing the transition mixin

@mixin transition ($args...) {
-webkit-transition: $args;
-moz-transition: $args;
-ms-transition: $args;
-o-transition: $args;
transition: $args;
-webkit-transition-delay: 0ms;
-moz-transition-delay: 0ms;
-ms-transition-delay: 0ms;
-o-transition-delay: 0ms;
transition-delay: 0ms;
}

Suggestion: open top-left/right or bottom-left/right instead of left/right

It seems left/right display options primary purpose to handle narrow screen situations like smartphone in portrait orientation. However better use of space could be achieved in this scenario by keeping the balloon above or below the trigger but extending it to the left or right only instead of the default to both sides equally. Do you know what I mean?

Tool-tips are inaccessible

  1. The tool-tips are inaccessible for keyboard users. They should be triggered on focus as well as on hover.

  2. You can make it screen reader accessible by changing the data-balloon attribute to aria-label, with the caveat that it will completely override the text in the control.

Some resources that can be helpful:

overflow:hidden on parent element

I'm having an issue where I have overflow:hidden on the parent element and this makes balloons hidden too.
I need overflow:hidden so I can cut the long text and on hovering with the mouse to show the full text.
How can I fix this ?

Break line

Hi.
How can I add a break line to my tooltip?

allow variables to be overridden

There is no easy way to override the background color, or any other variables in SASS.

Can this be changes so that:

$balloon-bg:             fade-out(#111, .1);
$balloon-base-size:      10px;
$balloon-arrow-height:   6px;

Looks like:

$balloon-bg:             fade-out(#111, .1) !default;
$balloon-base-size:      10px !default;
$balloon-arrow-height:   6px !default;

This would allow us to set the variables in our SASS before importing this library.

I am not sure how to do this in LESS.

Add multiple sizes to tooltips

Right now tooltips are single-line and tend to break thru screen on smaller devices. They should be configurable for different sizes to prevent this issue.

Update CDN link

In the README.md there is:

CDN version (provided by cdnjs):
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/balloon-css/0.2.4/balloon.min.css">

But this version is old. I was using it and couldn't use tooltips programattically. The problem was that the data-balloon-visible attribute did not exist in version 0.2.4

So it should be changed to version 0.5.0:

CDN version (provided by cdnjs):
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/balloon-css/0.5.0/balloon.min.css">

Receiving support?

Hi there! This isn't a issue but I didn't know where to ask!
Are you accepting donations or supports? Because Balloon is a great project and may you get some extra support, but there is no donate button o something like that.
I don't trying to spam you, but I want to invite you to beerpay.io, a simple platform to monetize open source projects, like balloon.
I know that the open source is free, but it's okay if someone want to contribute in other way.

Thanks for this work man!

Please create a new release for SASS default variables

Currently installing this library from npm does not include the defaults for the sass variables.

I have tested that they work by manually applying this code to my local node_modules code and overwriting the default tooltip background color.

Please tag a newer release to include this fix, that came in pull request #52 .

Not accessible at all

Neither keyboard only users nor screenreader users will ever be able to perceive these tooltips. A pity.

Enhancement: Add attribute to always show tooltip

I needed to be able to show a tooltip programmatically so I ended up doing something like this:

[data-balloon-show="true"]:before{
  opacity: 1 !important;
}

[data-balloon-show="false"]:after,
[data-balloon-show="false"]:before{
  opacity: 0 !important;
}

[data-balloon-show="true"]:after,
[data-balloon-show="true"]:before,
[data-balloon-show="true"][data-balloon-pos="down"]:after,
[data-balloon-show="true"][data-balloon-pos="down"]:before{
  -webkit-transform: translate(-50%, 0);
  -ms-transform: translate(-50%, 0);
  transform: translate(-50%, 0);
}

[data-balloon-show="true"][data-balloon-pos="left"]:after,
[data-balloon-show="true"][data-balloon-pos="left"]:before{
  -webkit-transform: translate(0, -50%);
  -ms-transform: translate(0, -50%);
  transform: translate(0, -50%);
}

[data-balloon-show="true"][data-balloon-pos="right"]:after,
[data-balloon-show="true"][data-balloon-pos="right"]:before{
  -webkit-transform: translate(0, -50%);
  -ms-transform: translate(0, -50%);
  transform: translate(0, -50%);
}

So if I want to always display a tooltip I can just add data-balloon-show attribute to my element and it will display. Just sharing this in case someone else needs it or if you want to add this to the lib.

Thanks.

How to set NewLine?

I tried data-balloon="Test test & # 13;& # 10; Test Test.\A Test Test
& # x a; Test Test" - but no one of them helps.
How can I break text in ballon to new line?

Thank you.

Add to Bower?

Would be excellent if this was added as a Bower package.

Should we keep LESS support?

As Balloon.css evolves and receives more and more PRs with quite advanced features, its getting harder to maintain two versions of source-code (Sass and LESS).

Since Sass became basically the lingua-franca of CSS pre-processors, and since virtually all PRs are made in Sass, I see no reason to keep updating LESS too. In the end, the final code will always compile to pure CSS anyways.

So, what do you folks think? Should Balloon.css keep only one source file (Sass), simplifying the development and deployment of new versions? Should we still keep maintaining both LESS and SASS?

Balloon.css + Carbon

Hi Claudio,

Would love to invite you to join Carbon and generate some revenue by displaying an ad on the project. Would you be interested? Could you share with me your email address so I can send more details with you?

Using variable in `data-balloon` doesn't work

Below doesn't work in react

var test = 'Whats&#10;up!';
      el = (
             <li key={index} data-balloon={test} data-balloon-pos="down" data-balloon-break>

It only works if you put the text directly inside data-balloon

<li key={index} data-balloon="Whats&#10;up!" data-balloon-pos="down" data-balloon-break>

IE11 has a lot of bugs

I've just checked balloon.css by using browserstack and found some bugs in IE11. Unfortunately, according to this article browsers_stats IE11 have 6.1% (March, 2016) of active users, but according to the another article even more (~10%). I think it should be fixed and README.md should contain information about supported browsers as well, because I'm not willing to sacrifice of my users.

IE11 Compatibility Issues

All issues and bugs related to IE11 (and IE11 ONLY) must be added in this Issue.

Screenshots of the bug are encouraged.

Image show in tooltip

Hello

I like it this tooltip app, thank you! I have a question. How I can run HTML codes in the Ballon Tooltip?

For example; I want to add image code in the tooltip, it is possible for Ballon.css?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.