Comments (7)
To enforce the neutrality of tooltip font styles. Operational System tooltips are usually "style-agnostic", they open the same way regardless of the context they're in. This is what I believe Balloon.css should achieve too.
!important
is probably the ugliest feature of CSS ever. But sometimes its useful to have a directive like that exactly for cases where you want to make sure style remains the same without outside interference (aka. CSS Specificity).
from balloon.css.
@kazzkiq thanks for the support,
One possible solution, provide another css file
(for example balloon.theme.css) and move all !important
rules there, so some users like me can ignore this css file.
from balloon.css.
Just FYI, I was looking at https://kazzkiq.github.io/balloon.css/ and noticed that the Font Awesome example is broken for me (OSX Chrome/Firefox) as it just shows squares rather than icons.
Looking through the code, I think it's because font-family: sans-serif !important;
is overriding font-family: FontAwesome;
When I change it to font-family: FontAwesome !important;
it works as expected.
I was going to file a separate issue/PR, but it seems like it's related to this issue.
from balloon.css.
Thats more of a philosophical debate:
Should Just Work
vs should give me freedom to fix it myself
The addition of !important
came from requests in #37. Not sure what's the best approach to make everyone happy.
from balloon.css.
Can't make everyone happy I guess ;)
IMHO to "force" people to override something like font-family with !important is quite harsh.
The example in #37 would IMHO simply work even without !important, why is this needed?
from balloon.css.
I'd use Balloon CSS if I wanted "nice" non system tooltips. Otherwise at least for short tooltips a title would be just fine. I disagree tooltips cannot be nice and should look the same everywhere, color can be styles too, or can it not?
And as said, the example in #37 would work even if removing the !important, it is simply not needed to override the sites styles as :after if nowhere styled and e.g. a "strong" elements boldness is overwritten with a simple font-weight: normal for :after. Just my 2 cents though
from balloon.css.
+1 for this.
from balloon.css.
Related Issues (20)
- Accessibility issue due to aria-label HOT 5
- Tooltip causing extra overflow when inside an overflow container on mobile HOT 1
- question/feature_request(enhancement): tooltip on click HOT 2
- Tooltip does not appear when triggered for a svg <line> element HOT 1
- question/feature_request(mobile): sticky hover
- bug/question(positioning): tooltips goes off a screen HOT 1
- Ballons are still working with font-awesome? HOT 1
- bug/(positioning):tooltips text is off on Chrome
- Features suggestion
- Feature request: fade out
- Italic tooltip text HOT 2
- Bug report sticky header and tooltip
- Is it possible to remove the arrow that appears with the popup? HOT 2
- Add link in tooltip
- Add IDs to heading elements on Github Pages documentation site
- Bug: Transparent pixels between triangle and rounded rectangle
- Is it possible to hide tooltip when focus but still show when hover
- Not disappearing after click ( Angular Material 15.1.0) HOT 1
- Is it possible to show it initially the hide on hover?
- Center text HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from balloon.css.