1,7 → 1,11 |
<?php \header('Content-Type: text/css; charset=UTF-8'); ?> |
<?php |
require_once 'css/least/Mixins.php'; |
use de\pointedears\css\least\Mixins; |
?> |
/* |
* Accessible Pure CSS Tooltips |
* Copyright (C) 2008, 2011 Thomas 'PointedEars' Lahn <mehl@PointedEars.de> |
* Copyright (C) 2008, 2015 Thomas 'PointedEars' Lahn <mehl@PointedEars.de> |
* |
* This program is free software: you can redistribute it and/or modify |
* it under the terms of the GNU General Public License as published by |
12,12 → 16,12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
* GNU General Public License for more details. |
* |
* |
* You should have received a copy of the GNU General Public License |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
*/ |
|
.tooltip { |
.tooltip-container { |
position: relative; |
border-bottom: 1px dotted black; |
text-decoration: none; |
24,12 → 28,14 |
cursor: help; |
} |
|
.tooltip span { |
display: none; |
.tooltip-container .tooltip { |
visibility: hidden; |
opacity: 0; |
-moz-transition: visibility 0.5s linear; |
-webkit-transition: visibility 0.5s linear; |
<?php |
Mixins::transition('-property', 'opacity, visibility'); |
Mixins::transition('-delay', '0.5s, 0.6s'); |
Mixins::transition('-duration', '0.1s, 0s'); |
?> |
position: absolute; |
width: 11em; |
height: auto; |
41,24 → 47,29 |
background-color: #ffc !important; |
color: black; |
text-decoration: none; |
overflow: auto; |
} |
|
.tooltip>span { |
.tooltip-container>.tooltip { |
width: auto; |
min-width: 11em; |
} |
|
.tooltip:hover span, |
.tooltip:focus span |
.tooltip-container:hover .tooltip, |
.tooltip-contaniner:focus .tooltip |
{ |
display: block; |
visibility: visible; |
opacity: 1; |
<?php |
Mixins::transition('-property', 'opacity'); |
Mixins::transition('-delay', '0.5s'); |
Mixins::transition('-duration', '0.1s'); |
?> |
z-index: 1337; |
} |
|
/* Copyright note */ |
.tooltip span:after { |
.tooltip-container .tooltip:after { |
display: block; |
margin: 0.5em 0 0 0; |
border-top: 1px solid gray; |
65,7 → 76,7 |
padding-top: 0.5em; |
background-color: transparent; |
content: "Accessible Pure\a0 CSS\a0 Tooltips\0d \0a\ |
Copyright\a0 \a9 \a0 2008,\a0 2010\a0 \a0 \ |
Copyright\a0 \a9 \a0 2008,\a0 2015\a0 \a0 \ |
Thomas\a0 'PointedEars'\a0 Lahn <mehl@PointedEars.de>.\0d \0a \ |
Distributed under the\a0 GNU\a0 GPL\a0 v3 or later."; |
color: gray; |
72,13 → 83,13 |
font-size: xx-small; |
} |
|
*>.tooltip span:after { |
*>.tooltip-container .tooltip:after { |
color: black; |
opacity: 0.9; |
} |
|
/* elements of the tooltip contents to hide when the tooltop is displayed */ |
.tooltip span span { |
/* elements of the tooltip contents to hide when the tooltip is displayed */ |
.tooltip-container .tooltip .hidden { |
position: relative; |
visibility: visible; |
display: inline; |
86,8 → 97,8 |
border: none; |
} |
|
.tooltip:hover span span, |
.tooltip:focus span span { |
.tooltip-container:hover .tooltip .hidden, |
.tooltip-container:focus .tooltip .hidden { |
visibility: hidden; |
display: none; |
} |