🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

hint

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hint

1.2.2
Rubygems
Version published
Maintainers
1
Created
Source

Hint

This is gem-bundled version of Hint.css, ready to use with Rails or Compass.

Hint.css is a tooltip library written in SASS which uses only HTML/CSS to create simple tooltips. 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.

Installation

Add this line to your application's Gemfile:

gem 'hint'

Or install it yourself as:

$ gem install hint

Rails

Import hint in an SCSS file:

@import "hint";

or require it via Sprockets:

/*
 *= require hint
 */

Compass

Create new project:

$ compass create <project name> -r hint -u hint

or update an existing:

# In config.rb
require "hint"

Usage

Any element on your page which needs to have a tooltip has to be given at least one of the position classes: hint--top, hint--bottom, hint--left, hint--right to position the tooltip.

Hello Sir, <span class="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--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
  • hint--rounded

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

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

FAQs

Package last updated on 20 Jul 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts