Team:UCL/Template:SCJtooltip.css

From 2014.igem.org

(Difference between revisions)
 
(2 intermediate revisions not shown)
Line 1: Line 1:
-
/*! Hint.css - v1.3.3 - 2014-07-06
+
[data-tip],
-
* http://kushagragour.in/lab/hint/
+
[data-tip]:before,
-
* Copyright (c) 2014 Kushagra Gour; Licensed MIT */
+
[data-tip]:after {
-
 
+
  -webkit-box-sizing: border-box;
-
/*-------------------------------------*\
+
  -moz-box-sizing: border-box;
-
HINT.css - A CSS tooltip library
+
  box-sizing: border-box;
-
\*-------------------------------------*/
+
}
-
/**
+
[data-tip] {
-
* 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;
   position: relative;
-
  display: inline-block;
+
}
-
  /**
+
[data-tip]:hover:before,
-
  * tooltip arrow
+
[data-tip].show:before {
-
  */
+
  font-size: 16px;
-
  /**
+
  content: attr(data-tip-content);
-
  * tooltip body
+
  display: block;
-
  */ }
+
  position: absolute;
-
  .hint:before, .hint:after, [data-hint]:before, [data-hint]:after {
+
  background: #555555;
-
    position: absolute;
+
  color: #ffffff;
-
    -webkit-transform: translate3d(0, 0, 0);
+
  text-align: center;
-
    -moz-transform: translate3d(0, 0, 0);
+
  border-radius: 5px 5px 5px 5px;
-
    transform: translate3d(0, 0, 0);
+
  padding: 5px 5px 5px 5px;
-
    visibility: hidden;
+
  z-index: 9999;
-
    opacity: 0;
+
}
-
    z-index: 1000000;
+
[data-tip]:hover:after,
-
    pointer-events: none;
+
[data-tip].show:after {
-
    -webkit-transition: 0.3s ease;
+
  content: "";
-
    -moz-transition: 0.3s ease;
+
  position: absolute;
-
    transition: 0.3s ease;
+
  display: block;
-
    -webkit-transition-delay: 0ms;
+
  z-index: 1;
-
    -moz-transition-delay: 0ms;
+
}
-
    transition-delay: 0ms; }
+
[data-tip]:hover:before,
-
  .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 {
+
[data-tip].show:before,
-
    visibility: visible;
+
[data-tip]:hover:after,
-
    opacity: 1; }
+
[data-tip].show:after {
-
  .hint:hover:before, .hint:hover:after, [data-hint]:hover:before, [data-hint]:hover:after {
+
  -webkit-transition: all 0.5s ease 0s;
-
    -webkit-transition-delay: 100ms;
+
  transition: all 0.5s ease 0s;
-
    -moz-transition-delay: 100ms;
+
  -webkit-animation: fadeIn 0.5s;
-
    transition-delay: 100ms; }
+
   animation: fadeIn 0.5s;
-
   .hint:before, [data-hint]:before {
+
}
-
    content: '';
+
[data-tip].top:before,
-
    position: absolute;
+
[data-tip].bottom:before {
-
    background: transparent;
+
  left: 50%;
-
    border: 6px solid transparent;
+
  width: 150px;
-
    z-index: 1000001; }
+
  margin-left: -75px;
-
  .hint:after, [data-hint]:after {
+
}
-
    content: attr(data-hint);
+
[data-tip].top.small:before,
-
    background: #383838;
+
[data-tip].bottom.small:before {
-
    color: white;
+
   width: 75px;
-
    padding: 8px 10px;
+
  margin-left: -37.5px;
-
    font-size: 12px;
+
}
-
    line-height: 12px;
+
[data-tip].top.large:before,
-
    white-space: nowrap; }
+
[data-tip].bottom.large:before {
-
 
+
   width: 300px;
-
/**
+
   margin-left: -150px;
-
* source: hint-position.scss
+
}
-
*
+
[data-tip].top:before {
-
* 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%;
   bottom: 100%;
-
   left: 50%; }
+
   margin-bottom: 12px;
-
.hint--top:hover:after, .hint--top:hover:before, .hint--top:focus:after, .hint--top:focus:before {
+
}
-
  -webkit-transform: translateY(-8px);
+
[data-tip].bottom:before {
-
  -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%;
   top: 100%;
-
   left: 50%; }
+
   margin-top: 12px;
-
.hint--bottom:hover:after, .hint--bottom:hover:before, .hint--bottom:focus:after, .hint--bottom:focus:before {
+
}
-
   -webkit-transform: translateY(8px);
+
[data-tip].top:after,
-
  -moz-transform: translateY(8px);
+
[data-tip].bottom:after {
-
  transform: translateY(8px); }
+
   left: 50%;
-
 
+
-
/**
+
-
* right tooltip
+
-
*/
+
-
.hint--right:before {
+
   margin-left: -12px;
   margin-left: -12px;
-
   margin-bottom: -6px; }
+
  border: 12px solid transparent;
-
.hint--right:after {
+
}
-
   margin-bottom: -14px; }
+
[data-tip].top:after {
-
.hint--right:before, .hint--right:after {
+
  bottom: 100%;
 +
   margin-bottom: -12px;
 +
  border-top: 12px solid #555555;
 +
}
 +
[data-tip].bottom:after {
 +
  top: 100%;
 +
  margin-top: -12px;
 +
  border-bottom: 12px solid #555555;
 +
}
 +
[data-tip].right:before,
 +
[data-tip].left:before {
 +
  top: 50%;
 +
  width: 150px;
 +
  height: 40px;
 +
   margin-top: -20px;
 +
}
 +
[data-tip].right.small:before,
 +
[data-tip].left.small:before {
 +
  width: 75px;
 +
  height: 20px;
 +
  margin-top: -10px;
 +
}
 +
[data-tip].right.large:before,
 +
[data-tip].left.large:before {
 +
  width: 300px;
 +
  height: 100px;
 +
  margin-top: -50px;
 +
}
 +
[data-tip].right:before {
   left: 100%;
   left: 100%;
-
   bottom: 50%; }
+
   margin-left: 12px;
-
.hint--right:hover:after, .hint--right:hover:before, .hint--right:focus:after, .hint--right:focus:before {
+
}
-
  -webkit-transform: translateX(8px);
+
[data-tip].left:before {
-
  -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%;
   right: 100%;
-
   bottom: 50%; }
+
   margin-right: 12px;
-
.hint--left:hover:after, .hint--left:hover:before, .hint--left:focus:after, .hint--left:focus:before {
+
}
-
  -webkit-transform: translateX(-8px);
+
[data-tip].right:after,
-
  -moz-transform: translateX(-8px);
+
[data-tip].left:after {
-
  transform: translateX(-8px); }
+
   top: 50%;
-
 
+
   margin-top: -12px;
-
/**
+
   border: 12px solid transparent;
-
* source: hint-color-types.scss
+
}
-
*
+
[data-tip].right:after {
-
* Contains tooltips of various types based on color differences.
+
   left: 100%;
-
*
+
   margin-left: -12px;
-
* Classes added:
+
   border-right: 12px solid #555555;
-
* 1) hint--error
+
}
-
* 2) hint--warning
+
[data-tip].left:after {
-
* 3) hint--info
+
   right: 100%;
-
* 4) hint--success
+
   margin-right: -12px;
-
*
+
   border-left: 12px solid #555555;
-
*/
+
}
-
/**
+
@-webkit-keyframes fadeIn {
-
* Error
+
   from {
-
*/
+
    opacity: 0;
-
.hint--error:after {
+
   }
-
   background-color: #b34e4d;
+
   to {
-
   text-shadow: 0 -1px 0px #592726; }
+
    opacity: 1;
-
.hint--error.hint--top:before {
+
   }
-
  border-top-color: #b34e4d; }
+
}
-
.hint--error.hint--bottom:before {
+
@keyframes fadeIn {
-
   border-bottom-color: #b34e4d; }
+
   from {
-
.hint--error.hint--left:before {
+
    opacity: 0;
-
  border-left-color: #b34e4d; }
+
   }
-
.hint--error.hint--right:before {
+
   to {
-
  border-right-color: #b34e4d; }
+
    opacity: 1;
-
 
+
   }
-
/**
+
}
-
* Warning
+
-
*/
+
-
.hint--warning:after {
+
-
   background-color: #c09854;
+
-
   text-shadow: 0 -1px 0px #6c5328; }
+
-
.hint--warning.hint--top:before {
+
-
   border-top-color: #c09854; }
+
-
.hint--warning.hint--bottom:before {
+
-
  border-bottom-color: #c09854; }
+
-
.hint--warning.hint--left:before {
+
-
   border-left-color: #c09854; }
+
-
.hint--warning.hint--right:before {
+
-
   border-right-color: #c09854; }
+
-
 
+
-
/**
+
-
* Info
+
-
*/
+
-
.hint--info:after {
+
-
  background-color: #3986ac;
+
-
  text-shadow: 0 -1px 0px #193b4d; }
+
-
.hint--info.hint--top:before {
+
-
   border-top-color: #3986ac; }
+
-
.hint--info.hint--bottom:before {
+
-
  border-bottom-color: #3986ac; }
+
-
.hint--info.hint--left:before {
+
-
   border-left-color: #3986ac; }
+
-
.hint--info.hint--right:before {
+
-
  border-right-color: #3986ac; }
+
-
 
+
-
/**
+
-
* Success
+
-
*/
+
-
.hint--success:after {
+
-
  background-color: #458746;
+
-
  text-shadow: 0 -1px 0px #1a321a; }
+
-
.hint--success.hint--top:before {
+
-
   border-top-color: #458746; }
+
-
.hint--success.hint--bottom:before {
+
-
   border-bottom-color: #458746; }
+
-
.hint--success.hint--left:before {
+
-
  border-left-color: #458746; }
+
-
.hint--success.hint--right:before {
+
-
  border-right-color: #458746; }
+
-
 
+
-
/**
+
-
* 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); }
+
-
 
+
-
/**
+
-
* source: hint-rounded.scss
+
-
*
+
-
* Defines rounded corner tooltips.
+
-
*
+
-
* Classes added:
+
-
* 1) hint--rounded
+
-
*
+
-
*/
+
-
.hint--rounded:after {
+
-
  border-radius: 4px; }
+
-
 
+
-
/**
+
-
* source: hint-effects.scss
+
-
*
+
-
* Defines various transition effects for the tooltips.
+
-
*
+
-
* Classes added:
+
-
* 1) hint--no-animate
+
-
* 2) hint--bounce
+
-
*
+
-
*/
+
-
.hint--no-animate:before, .hint--no-animate:after {
+
-
  -webkit-transition-duration: 0ms;
+
-
   -moz-transition-duration: 0ms;
+
-
  transition-duration: 0ms; }
+
-
 
+
-
.hint--bounce:before, .hint--bounce:after {
+
-
  -webkit-transition: opacity 0.3s ease, visibility 0.3s ease, -webkit-transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);
+
-
  -moz-transition: opacity 0.3s ease, visibility 0.3s ease, -moz-transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);
+
-
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24); }
+

Latest revision as of 14:15, 16 October 2014

[data-tip], [data-tip]:before, [data-tip]:after {

 -webkit-box-sizing: border-box;
 -moz-box-sizing: border-box;
 box-sizing: border-box;

} [data-tip] {

 position: relative;

} [data-tip]:hover:before, [data-tip].show:before {

 font-size: 16px;
 content: attr(data-tip-content);
 display: block;
 position: absolute;
 background: #555555;
 color: #ffffff;
 text-align: center;
 border-radius: 5px 5px 5px 5px;
 padding: 5px 5px 5px 5px;
 z-index: 9999;

} [data-tip]:hover:after, [data-tip].show:after {

 content: "";
 position: absolute;
 display: block;
 z-index: 1;

} [data-tip]:hover:before, [data-tip].show:before, [data-tip]:hover:after, [data-tip].show:after {

 -webkit-transition: all 0.5s ease 0s;
 transition: all 0.5s ease 0s;
 -webkit-animation: fadeIn 0.5s;
 animation: fadeIn 0.5s;

} [data-tip].top:before, [data-tip].bottom:before {

 left: 50%;
 width: 150px;
 margin-left: -75px;

} [data-tip].top.small:before, [data-tip].bottom.small:before {

 width: 75px;
 margin-left: -37.5px;

} [data-tip].top.large:before, [data-tip].bottom.large:before {

 width: 300px;
 margin-left: -150px;

} [data-tip].top:before {

 bottom: 100%;
 margin-bottom: 12px;

} [data-tip].bottom:before {

 top: 100%;
 margin-top: 12px;

} [data-tip].top:after, [data-tip].bottom:after {

 left: 50%;
 margin-left: -12px;
 border: 12px solid transparent;

} [data-tip].top:after {

 bottom: 100%;
 margin-bottom: -12px;
 border-top: 12px solid #555555;

} [data-tip].bottom:after {

 top: 100%;
 margin-top: -12px;
 border-bottom: 12px solid #555555;

} [data-tip].right:before, [data-tip].left:before {

 top: 50%;
 width: 150px;
 height: 40px;
 margin-top: -20px;

} [data-tip].right.small:before, [data-tip].left.small:before {

 width: 75px;
 height: 20px;
 margin-top: -10px;

} [data-tip].right.large:before, [data-tip].left.large:before {

 width: 300px;
 height: 100px;
 margin-top: -50px;

} [data-tip].right:before {

 left: 100%;
 margin-left: 12px;

} [data-tip].left:before {

 right: 100%;
 margin-right: 12px;

} [data-tip].right:after, [data-tip].left:after {

 top: 50%;
 margin-top: -12px;
 border: 12px solid transparent;

} [data-tip].right:after {

 left: 100%;
 margin-left: -12px;
 border-right: 12px solid #555555;

} [data-tip].left:after {

 right: 100%;
 margin-right: -12px;
 border-left: 12px solid #555555;

} @-webkit-keyframes fadeIn {

 from {
   opacity: 0;
 }
 to {
   opacity: 1;
 }

} @keyframes fadeIn {

 from {
   opacity: 0;
 }
 to {
   opacity: 1;
 }

}