GithubHelp home page GithubHelp logo

lomodd / hint.css Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chinchang/hint.css

0.0 1.0 0.0 93 KB

A tooltip library in CSS for your lovely websites.

Home Page: http://kushagragour.in/lab/hint/

License: MIT License

hint.css's Introduction

hint.css

A tooltip library in CSS

hint.css is written as a pure CSS resource using which you can create cool tooltips for your web app. It does not rely on JavaScript and rather uses data- attribute*, pseudo elements, content property and CSS3 transitions to create the tooltips. Also it uses BEM naming convention particularly for the modifiers.

Note: CSS3 Transitions on pseudo elements is currently available on Firefox only. On rest of the browsers it degrades gracefully without any transition. Though the good news is that it will be coming soon on webkit also.

Read more about it.

###Try it out: http://kushagragour.in/lab/hint/

Get Started

Download one of the 2 library version:

And include it in the HEAD of your page:

<link rel="stylesheet" href="hint.css"></link>

or

<link rel="stylesheet" href="hint.min.css"></link>

Any element in your markup which needs to have a tooltip has to be given atleast 2 classes: hint & any one of hint--top, hint--bottom, hint--left, hint--right to position the tooltip.

Hello Sir, <span class="hint  hint--bottom">hover me.</span>

The tooltip text needs to be given using the data-hint attribute on that element.

Hello Sir, <span class="hint  hint--bottom" data-hint="Thank you!">hover me.</span>

Use it with other available modifiers in various combinations. Available modifiers:

  • hint--error
  • hint--info
  • hint--warning
  • hint--success
  • hint--always

Check out some examples at http://kushagragour.in/lab/hint/

Contributing

hint.css is developed in SASS and the source files can be found in the src/ directory.

If you would like to create more types of tooltips/ fix bugs/ enhance the library etc. you are more than welcome to submit your pull requests.

Changelog

See the Changelog

License

Copyright (c) 2013 Kushagra Gour Licensed under the MIT license.

Credits

This doesn't make use of a lot of BEM methodology but big thanks to @csswizardry, @necolas for their awesome articles on BEM and to @joshnh through whose work I came to know about it :)

hint.css's People

Contributors

chinchang avatar

Watchers

James Cloos avatar

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.