Skip to content

Commit

Permalink
Merge branch 'release-1.3.3'. Fixes chinchang#80
Browse files Browse the repository at this point in the history
  • Loading branch information
chinchang committed Jul 6, 2014
2 parents 4d9b69a + 262847d commit 6042198
Show file tree
Hide file tree
Showing 12 changed files with 279 additions and 19 deletions.
35 changes: 28 additions & 7 deletions Gruntfile.js
Expand Up @@ -4,10 +4,15 @@ module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

meta: {
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") + "\\n" %>' +
getBanner: function () {
return '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - <%= meta.banner %>';
},
getBannerForBaseVersion: function () {
return '/*! <%= pkg.title || pkg.name %> (base version) - v<%= pkg.version %> - <%= meta.banner %>';
},
banner: '<%= grunt.template.today("yyyy-mm-dd") + "\\n" %>' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n\n'
Expand All @@ -16,31 +21,47 @@ module.exports = function(grunt) {
sass: {
dist: {
files: {
'<%= pkg.name %>.css': 'src/<%= pkg.name %>.scss'
'<%= pkg.name %>.css': 'src/<%= pkg.name %>.scss',
'<%= pkg.name %>.base.css': 'src/<%= pkg.name %>.base.scss'
}
}
},

cssmin: {
compress: {
files: {
'<%= pkg.name %>.min.css': [ '<%= pkg.name %>.css' ]
'<%= pkg.name %>.min.css': [ '<%= pkg.name %>.css' ],
'<%= pkg.name %>.base.min.css': [ '<%= pkg.name %>.base.css' ]
}
}
},

// concat banner to final lib files
concat: {
options: {
banner: '<%= meta.banner %>'
banner: '<%= meta.getBanner() %>'
},
lib: {
src: ['<%= pkg.name %>.css'],
dest: '<%= pkg.name %>.css'
},
minlib: {
minLib: {
src: ['<%= pkg.name %>.min.css'],
dest: '<%= pkg.name %>.min.css'
},
baseLib: {
options: {
banner: '<%= meta.getBannerForBaseVersion() %>'
},
src: ['<%= pkg.name %>.base.css'],
dest: '<%= pkg.name %>.base.css'
},
baseMinLib: {
options: {
banner: '<%= meta.getBannerForBaseVersion() %>'
},
src: ['<%= pkg.name %>.base.min.css'],
dest: '<%= pkg.name %>.base.min.css'
}
},

Expand Down
8 changes: 7 additions & 1 deletion README.md
@@ -1,4 +1,4 @@
# Hint.css [v1.3.1]
# Hint.css [v1.3.3]
*A tooltip library in CSS for your lovely websites*

`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.
Expand All @@ -16,9 +16,14 @@ Get the library using one of the following ways:

1. **Github**

Full build
- [unminified] : https://raw.github.com/chinchang/hint.css/master/hint.css
- [minified] : https://raw.github.com/chinchang/hint.css/master/hint.min.css

Base build *(Does not include color themes and fancy effects)*
- [unminified] : https://raw.github.com/chinchang/hint.css/master/hint.base.css
- [minified] : https://raw.github.com/chinchang/hint.css/master/hint.base.min.css

2. **Bower**

```
Expand Down Expand Up @@ -76,6 +81,7 @@ To generate the css file, please read the [contributing page](./CONTRIBUTING.md)
- [BitCast](https://www.bitcast.io/)
- [Tridiv](http://tridiv.com/)
- [Tradus](http://tradus.com/)
- [Inkpen](http://inkpen.in/)

Are you using **hint.css** in your awesome project too? Let us know on the [mailing list](mailto:hintcss@googlegroups.com).

Expand Down
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "hint.css",
"version": "1.3.2",
"version": "1.3.3",
"main": "hint.min.css",
"author": "Kushagra Gour",
"ignore": [
Expand Down
2 changes: 1 addition & 1 deletion component.json
Expand Up @@ -2,7 +2,7 @@
"name": "hint.css",
"repo": "chinchang/hint.css",
"description": "A tooltip library in CSS for your lovely websites.",
"version": "1.3.2",
"version": "1.3.3",
"keywords": ["tooltip", "css"],
"dependencies": {},
"development": {},
Expand Down
189 changes: 189 additions & 0 deletions hint.base.css
@@ -0,0 +1,189 @@
/*! Hint.css (base version) - v1.3.3 - 2014-07-06
* http://kushagragour.in/lab/hint/
* Copyright (c) 2014 Kushagra Gour; Licensed MIT */

/*-------------------------------------*\
HINT.css - A CSS tooltip library
\*-------------------------------------*/
/**
* HINT.css is a tooltip library made in pure CSS.
*
* Source: https://github.com/chinchang/hint.css
* Demo: http://kushagragour.in/lab/hint/
*
* Release under The MIT License
*
*/
/**
* source: hint-core.scss
*
* Defines the basic styling for the tooltip.
* Each tooltip is made of 2 parts:
* 1) body (:after)
* 2) arrow (:before)
*
* Classes added:
* 1) hint
*/
.hint, [data-hint] {
position: relative;
display: inline-block;
/**
* tooltip arrow
*/
/**
* tooltip body
*/ }
.hint:before, .hint:after, [data-hint]:before, [data-hint]:after {
position: absolute;
-webkit-transform: translate3d(0, 0, 0);
-moz-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
visibility: hidden;
opacity: 0;
z-index: 1000000;
pointer-events: none;
-webkit-transition: 0.3s ease;
-moz-transition: 0.3s ease;
transition: 0.3s ease;
-webkit-transition-delay: 0ms;
-moz-transition-delay: 0ms;
transition-delay: 0ms; }
.hint:hover:before, .hint:hover:after, .hint:focus:before, .hint:focus:after, [data-hint]:hover:before, [data-hint]:hover:after, [data-hint]:focus:before, [data-hint]:focus:after {
visibility: visible;
opacity: 1; }
.hint:hover:before, .hint:hover:after, [data-hint]:hover:before, [data-hint]:hover:after {
-webkit-transition-delay: 100ms;
-moz-transition-delay: 100ms;
transition-delay: 100ms; }
.hint:before, [data-hint]:before {
content: '';
position: absolute;
background: transparent;
border: 6px solid transparent;
z-index: 1000001; }
.hint:after, [data-hint]:after {
content: attr(data-hint);
background: #383838;
color: white;
padding: 8px 10px;
font-size: 12px;
line-height: 12px;
white-space: nowrap; }

/**
* source: hint-position.scss
*
* Defines the positoning logic for the tooltips.
*
* Classes added:
* 1) hint--top
* 2) hint--bottom
* 3) hint--left
* 4) hint--right
*/
/**
* set default color for tooltip arrows
*/
.hint--top:before {
border-top-color: #383838; }

.hint--bottom:before {
border-bottom-color: #383838; }

.hint--left:before {
border-left-color: #383838; }

.hint--right:before {
border-right-color: #383838; }

/**
* top tooltip
*/
.hint--top:before {
margin-bottom: -12px; }
.hint--top:after {
margin-left: -18px; }
.hint--top:before, .hint--top:after {
bottom: 100%;
left: 50%; }
.hint--top:hover:after, .hint--top:hover:before, .hint--top:focus:after, .hint--top:focus:before {
-webkit-transform: translateY(-8px);
-moz-transform: translateY(-8px);
transform: translateY(-8px); }

/**
* bottom tooltip
*/
.hint--bottom:before {
margin-top: -12px; }
.hint--bottom:after {
margin-left: -18px; }
.hint--bottom:before, .hint--bottom:after {
top: 100%;
left: 50%; }
.hint--bottom:hover:after, .hint--bottom:hover:before, .hint--bottom:focus:after, .hint--bottom:focus:before {
-webkit-transform: translateY(8px);
-moz-transform: translateY(8px);
transform: translateY(8px); }

/**
* right tooltip
*/
.hint--right:before {
margin-left: -12px;
margin-bottom: -6px; }
.hint--right:after {
margin-bottom: -14px; }
.hint--right:before, .hint--right:after {
left: 100%;
bottom: 50%; }
.hint--right:hover:after, .hint--right:hover:before, .hint--right:focus:after, .hint--right:focus:before {
-webkit-transform: translateX(8px);
-moz-transform: translateX(8px);
transform: translateX(8px); }

/**
* left tooltip
*/
.hint--left:before {
margin-right: -12px;
margin-bottom: -6px; }
.hint--left:after {
margin-bottom: -14px; }
.hint--left:before, .hint--left:after {
right: 100%;
bottom: 50%; }
.hint--left:hover:after, .hint--left:hover:before, .hint--left:focus:after, .hint--left:focus:before {
-webkit-transform: translateX(-8px);
-moz-transform: translateX(-8px);
transform: translateX(-8px); }

/**
* source: hint-always.scss
*
* Defines a persisted tooltip which shows always.
*
* Classes added:
* 1) hint--always
*
*/
.hint--always:after, .hint--always:before {
opacity: 1;
visibility: visible; }
.hint--always.hint--top:after, .hint--always.hint--top:before {
-webkit-transform: translateY(-8px);
-moz-transform: translateY(-8px);
transform: translateY(-8px); }
.hint--always.hint--bottom:after, .hint--always.hint--bottom:before {
-webkit-transform: translateY(8px);
-moz-transform: translateY(8px);
transform: translateY(8px); }
.hint--always.hint--left:after, .hint--always.hint--left:before {
-webkit-transform: translateX(-8px);
-moz-transform: translateX(-8px);
transform: translateX(-8px); }
.hint--always.hint--right:after, .hint--always.hint--right:before {
-webkit-transform: translateX(8px);
-moz-transform: translateX(8px);
transform: translateX(8px); }
5 changes: 5 additions & 0 deletions hint.base.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions hint.css
@@ -1,4 +1,4 @@
/*! Hint.css - v1.3.2 - 2014-05-18
/*! Hint.css - v1.3.3 - 2014-07-06
* http://kushagragour.in/lab/hint/
* Copyright (c) 2014 Kushagra Gour; Licensed MIT */

Expand Down Expand Up @@ -66,12 +66,10 @@
content: attr(data-hint);
background: #383838;
color: white;
text-shadow: 0 -1px 0px black;
padding: 8px 10px;
font-size: 12px;
line-height: 12px;
white-space: nowrap;
box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3); }
white-space: nowrap; }

/**
* source: hint-position.scss
Expand Down

0 comments on commit 6042198

Please sign in to comment.