Giter Club home page Giter Club logo

Comments (7)

kazzkiq avatar kazzkiq commented on July 21, 2024 1

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.

dehghani-mehdi avatar dehghani-mehdi commented on July 21, 2024 1

@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.

handeyeco avatar handeyeco commented on July 21, 2024 1

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.

kazzkiq avatar kazzkiq commented on July 21, 2024

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.

cthedot avatar cthedot commented on July 21, 2024

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.

cthedot avatar cthedot commented on July 21, 2024

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.

seezee avatar seezee commented on July 21, 2024

+1 for this.

from balloon.css.

Related Issues (20)

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.