A simple CSS tooltip made with Sass

Overview

Simptip [v1.0.4]

A simple CSS tooltip made with Sass

Visit Site, Documentation and some examples

Installation

Install with npm, Yarn or Bower:

npm:

npm install simptip --save

Yarn (note that yarn add automatically saves the package to the dependencies in package.json):

yarn add simptip

Bower:

bower add simptip --save

Usage

I'll explain with an example:

<link rel="stylesheet" type="text/css" href="simptip-mini.css" />

or:

<link rel="stylesheet" type="text/css" href="simptip.css" />

Then you can do something like this:

<span class="simptip-position-top" data-tooltip="Tooltip's content"> Text </span>

What you see in the data-tooltip attribute is the text content of the tooltips, and the value of class attribute is tooltop's position.

You can use .simptip-position-right , .simptip-position-bottom and .simptip-position-left class for other positions that you would like.

You can also use more features of Simptip by adding these classes:

  • .half-arrow : change tooltip's arrow to half arrow
  • .simptip-smooth : makes soft edge for tooltip
  • .simptip-fade : fades effect for show/hide
  • .simptip-movable : shows movable effect
  • .simptip-multiline : makes multiline body for tooltip
  • .simptip-success : changes color to green spectrum
  • .simptip-info : changes color to blue spectrum
  • .simptip-warning : changes color to orange spectrum
  • .simptip-danger : changes color to red spectrum
Let me know if you use it in your projects.

License

Copyright (c) 2013 @arashmanteghi

Licensed under the MIT license.

Comments
  • Namespacing

    Namespacing

    I think it’s better to namespace your code and use OCSS. like this:

    <span class="simptip simptip--position-top simptip--half-arrow"></span>
    

    this way, it’s easier to read and you wont have any conflicts with other styles and scripts.

    opened by sallar 3
  • Add link inside tooltip

    Add link inside tooltip

    Hello there!

    Is it possible to place a link inside the tooltip, like

    <span class="simptip-position-right simptip-movable simptip-multiline simptip-info" data-tooltip="To view this file you need the free Adobe Acrobat Reader. Click to open.">

    Greetings from Germany!

    opened by 70hundert 2
  • add silent classes, new customize output feature, other updates

    add silent classes, new customize output feature, other updates

    reduced redundancy for [data-tooltip]:hover,:focus area

    decreased selector specificity for .simptip-movable. Moved code into /** features **/ area

    New silent classes to reduce class declarations in scss file.

    convert diverse color hex values to variables and add them to variables section

    Added new Customize CSS Output to turn on / off tooltip features and styling to reduce the amount of compiled CSS without having to actually delete any code.

    opened by scottaohara 2
  • slight cleanup

    slight cleanup

    removed duplicate declaration of position:absolute from [data-tooltip]:before

    remove excess vendor prefixes from mixins, and recycle transition mixin into fade mixin.

    delete extra whitespace & convert sass only sections to sass comments so they don't compile in the unminified CSS.

    opened by scottaohara 2
  • Tooltip on input:text focus

    Tooltip on input:text focus

    Hi Arash,

    Thank you very much for this clean solution (no js is a big plus for me).

    I've been trying to add a tooltip to an input text (instead of placeholder), but it looks like it doesn't work (Fx 22), despite the :focus rules in the code. Im using multiline mode.

    According to that snippet:

       [data-tooltip]:hover:before, [data-tooltip]:hover:after, [data-tooltip]:focus:before, [data-tooltip]:focus:after {
          visibility: visible;
          opacity: 1;
        }
    

    I think it should at least show up.

    Have you got any idea/suggestion what i could be doing wrong? (I tested on div/span and tooltips are working perfectly).

    Regards, Paweł

    opened by pavelloz 2
  • Fix broken headings in Markdown files

    Fix broken headings in Markdown files

    GitHub changed the way Markdown headings are parsed, so this change fixes it.

    See bryant1410/readmesfix for more information.

    Tackles bryant1410/readmesfix#1

    opened by bryant1410 1
  • NuGet Package

    NuGet Package

    Arash jan, Would you please add simptip NuGet package. It's really useful for Microsoft software developers. You can find a less than a hour solution to build and deploy NuGet package in here http://docs.nuget.org/docs/creating-packages/using-a-gui-to-build-packages

    Thank you ;-)

    opened by amastaneh 1
  • simptip-multiline && simptip-position--left-and-right && mb0

    simptip-multiline && simptip-position--left-and-right && mb0

    When used simptip-multiline -- simptip-position-left:after or simptip-position-right:after -- margin-bottom should be 0.

    http://cl.ly/image/0i401a1z3u2U with mb0 http://cl.ly/image/0Q1L3r471J0x

    opened by Krknv 1
  • [enhancement] Add missing bower.json.

    [enhancement] Add missing bower.json.

    Hey, maintainer(s) of arashmanteghi/simptip!

    We at VersionEye are working hard to keep up the quality of the bower's registry.

    We just finished our initial analysis of the quality of the Bower.io registry:

    7530 - registered packages, 224 of them doesnt exists anymore;

    We analysed 7306 existing packages and 1070 of them don't have bower.json on the master branch ( that's where a Bower client pulls a data ).

    Sadly, your library arashmanteghi/simptip is one of them.

    Can you spare 15 minutes to help us to make Bower better?

    Just add a new file bower.json and change attributes.

    {
      "name": "arashmanteghi/simptip",
      "version": "1.0.0",
      "main": "path/to/main.css",
      "description": "please add it",
      "license": "Eclipse",
      "ignore": [
        ".jshintrc",
        "**/*.txt"
      ],
      "dependencies": {
        "<dependency_name>": "<semantic_version>",
        "<dependency_name>": "<Local_folder>",
        "<dependency_name>": "<package>"
      },
      "devDependencies": {
        "<test-framework-name>": "<version>"
      }
    }
    
    

    Read more about bower.json on the official spefication and nodejs semver library has great examples of proper versioning.

    NB! Please validate your bower.json with jsonlint before commiting your updates.

    Thank you!

    Timo, twitter: @versioneye email: [email protected] VersionEye - no more legacy software!

    opened by timgluz 1
  • Manual line breaks not working

    Manual line breaks not working

    Hey arash,

    I'm trying to get manual line breaks working for the multiline option, but it just doesn't work out. I've tried all the recommendations from

    http://stackoverflow.com/questions/3340802/add-line-break-within-tooltips and http://stackoverflow.com/questions/6502054/web-tooltip-universally-accepted-linebreak-character

    but to no avail. You wouldn't happen to know how to add a manual line break for multiline tooltips, would you?

    opened by tliebig 1
  • Remove filter: blur from $multiline

    Remove filter: blur from $multiline

    Would recommend removing the filter blur declarations for the @if $multiline == true rules as the performance hit on the the iPad affects the rendering of the text inside the tooltip.

    Also, can't really any other reason as to why it's there anyway unless I've missed something?

    opened by thomasbritton 0
  • the tooltip on input textbox does not work

    the tooltip on input textbox does not work

    the tooltip plugin does not work when use on input textbox but on a or span tag is trust

    <input type="text" class="simptip-position-top" data-tooltip="Hello">

    opened by mehdirajabi59 1
  • Not work with js

    Not work with js

    var arr = new Array(); $("*").each(function(){ arr = $(this).attr("title"); if($(this).attr("title") !== undefined){ var t = $(this).attr("title"); $(this).addClass('ttt').removeAttr("title").attr('data-title',t); } });

    and tt not show Oo, your css is on the page.

    opened by inverser-pro 0
Releases(v1.0.4)
Owner
Arash Manteghi
frontend developer
Arash Manteghi
Opentip is an open source javascript tooltip based on the protoype framework.

Opentip Opentip is a free opensource Java-Script tooltip class. Features It supports: Stems (little pointers) Automatic content download with AJAX Dif

Matias Meno 1.3k Dec 6, 2022
A jQuery tooltip plugin

Tooltipster A flexible and extensible jQuery plugin for modern tooltips by Caleb Jacob and Louis Ameline under MIT license. Compatible with Mozilla Fi

Caleb Jacob 2.8k Dec 29, 2022
A tooltip style toolbar jQuery plugin

Toolbar.js A jQuery plugin that creates tooltip style toolbars. Update Toolbar.js has been overhauled with new functionality, a completely new design

Paul Kinzett 2.3k Dec 18, 2022
Cooltipz.css - A highly customisable, minimal, pure CSS tooltip library

Cooltipz.css - Cool tooltips Cool customisable tooltips made from pure CSS Lightweight • Accessible • Customisable • Simple Cooltipz.css is a pure CSS

Jack Domleo 110 Dec 24, 2022
Data-tip.css - Wow, such tooltip, with pure css!

Notice: hint.css has been much better since I complained about it months ago, so try out its new features instead of this one! data-tip.css Wow, such

EGOIST 117 May 26, 2021
Simple pure CSS ToolTip

PureCSSToolTip Simple pure CSS ToolTip purecsstooltip.css is used to the added tooltip for a web app, web page without javascript. This full of CSS co

Gokul S 3 Sep 19, 2022
Source code for Chrome/Edge/Firefox/Opera extension Magic CSS (Live editor for CSS, Less & Sass)

Live editor for CSS, Less & Sass (Magic CSS) Extension Live editor for CSS, Less & Sass (Magic CSS) for Google Chrome, Microsoft Edge, Mozilla Firefox

null 210 Dec 13, 2022
A CSS only tooltip library for your lovely websites.

Hint.css A tooltip library in CSS for your lovely websites Demo • Get started • Who's using this? • Browser support • FAQs • Contributing • License hi

Kushagra Gour 8.3k Jan 2, 2023
Tooltip using only CSS and very low build size.

css-only-tooltip A very lightweight tooltip utitlity library, made using only CSS with dynamic light and dark themes. Insatallation Using npm $ npm in

Rajiv 4 Dec 11, 2022
A simple step by step tooltip helper for any site

Tooltip Sequence A minimalistic set of tooltips on your app. What it does So suppose you create a Web Application and you want to take your users or a

Sooraj Sivadasan Nair 299 Dec 21, 2022
Rent-A Movie is a website based on movie renting. The user can leave likes, comments or make reservations for movies they would like to rent. Made using tvMaze API, Involvement API, HTML, SASS and JavaScript

Rent-A Movie "Rent-A Movie" is a website for movie renting where you can make reservations, add comments & likes or just get details about movies that

Zeeshan Haider 19 Aug 23, 2022
blog with angular made in sass and firebase auth with google, facebook and github also you can copy to clipboard

BlogAngular This project was generated with Angular CLI version 14.1.2. Development server Run ng serve for a dev server. Navigate to http://localhost

John Gualteros 1 Oct 2, 2022
Sass makes CSS fun!

Sass makes CSS fun again. Sass is an extension of CSS, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well

Sass 14.3k Dec 31, 2022
A CSS button library built using Sass and Compass

Buttons 2.0 Buttons 2.0 Buttons is a highly customizable production ready mobile web and desktop css button library. Buttons is a free open source pro

Alex Wolfe 5.1k Jan 4, 2023
💅 A ready-to-go with a well-thought-out structure Electron app boilerplate with ReactJS, TypeScript, CSS / SASS modules, SWC, Eslint, Prettier, GitHub Action releases and more.

Electron App ??  A ready-to-go with a well-thought-out structure Electron app boilerplate with ReactJS, TypeScript, CSS / SASS modules, SWC, Eslint, P

Dalton Menezes 155 Dec 29, 2022
Convert css (scss/sass) to vanilla-extract.

CSS-to-vanilla-extract ⚡ Welcome ?? Convert CSS (SCSS/SASS) to vanilla-extract. playground Install npm i -D c2ve Usage Once installed, you can run it

j1ngzoue 31 Jan 4, 2023
iHover is a collection of hover effects using pure CSS, inspired by codrops article, powered by Sass.

Intro iHover is a collection of hover effects using pure CSS, inspired by this codrops article, powered by Sass. Demo: https://gudh.github.io/ihover/d

null 3.5k Jan 4, 2023
:iphone: A super lightweight HTML, Sass, CSS, and JavaScript framework for building responsive websites

Responsive Boilerplate A powerful, accessible, developer friendly, framework for building responsive websites Responsive Boilerplate is the developers

ResponsiveBP 845 Dec 22, 2022
A library of icons rendered purely in CSS and compiled using SASS.

Welcome to PureIcons.css: This is a library of icons rendered purely in CSS and compiled using SASSs. It is currently at 79 icons. More will be added

William Troup 2 Apr 27, 2021
Opentip is an open source javascript tooltip based on the protoype framework.

Opentip Opentip is a free opensource Java-Script tooltip class. Features It supports: Stems (little pointers) Automatic content download with AJAX Dif

Matias Meno 1.3k Dec 6, 2022