Subversion Repositories LCARS

Rev

Rev 4 | Rev 69 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4 Rev 35
1
/*
1
/*
2
 * Accessible Pure CSS Tooltips
2
 * Accessible Pure CSS Tooltips
3
 * Copyright (C) 2008, 2010 Thomas 'PointedEars' Lahn <mehl@PointedEars.de>
3
 * Copyright (C) 2008, 2011 Thomas 'PointedEars' Lahn <mehl@PointedEars.de>
4
 *
4
 *
5
 * This program is free software: you can redistribute it and/or modify
5
 * This program is free software: you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License as published by
6
 * it under the terms of the GNU General Public License as published by
7
 * the Free Software Foundation, either version 3 of the License, or
7
 * the Free Software Foundation, either version 3 of the License, or
8
 * (at your option) any later version.
8
 * (at your option) any later version.
9
 *
9
 *
10
 * This program is distributed in the hope that it will be useful,
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
13
 * GNU General Public License for more details.
14
 *
14
 *
15
 * You should have received a copy of the GNU General Public License
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
 */
17
 */
18
18
19
.tooltip {
19
.tooltip {
20
  position: relative;
20
  position: relative;
21
  border-bottom: 1px dotted black;
21
  border-bottom: 1px dotted black;
22
  text-decoration: none;
22
  text-decoration: none;
23
  cursor: help;
23
  cursor: help;
24
}
24
}
25
25
26
.tooltip span {
26
.tooltip span {
27
  display: none;
27
  display: none;
28
  visibility: hidden;
28
  visibility: hidden;
29
  opacity: 0;
29
  opacity: 0;
30
  -moz-transition: visibility 0.5s linear;
30
  -moz-transition: visibility 0.5s linear;
31
  -webkit-transition: visibility 0.5s linear;
31
  -webkit-transition: visibility 0.5s linear;
32
  position: absolute;
32
  position: absolute;
33
  width: 11em;
33
  width: 11em;
34
  height: auto;
34
  height: auto;
35
  padding: 2px 5px 5px 5px;
35
  padding: 2px 5px 5px 5px;
36
  border: 1px solid #666;
36
  border: 1px solid #666;
37
  box-shadow: 6px 6px 6px #666;
37
  box-shadow: 6px 6px 6px #666;
38
  -moz-box-shadow: 6px 6px 6px #666;
38
  -moz-box-shadow: 6px 6px 6px #666;
39
  -webkit-box-shadow: 6px 6px 6px #666;
39
  -webkit-box-shadow: 6px 6px 6px #666;
40
  background-color: #ffc !important;
40
  background-color: #ffc !important;
41
  color: black;
41
  color: black;
42
  text-decoration: none;
42
  text-decoration: none;
43
}
43
}
44
44
45
.tooltip>span {
45
.tooltip>span {
46
  width: auto;
46
  width: auto;
47
  min-width: 11em;
47
  min-width: 11em;
48
}
48
}
49
49
50
.tooltip:hover span,
50
.tooltip:hover span,
51
.tooltip:focus span
51
.tooltip:focus span
52
{
52
{
53
  display: block;
53
  display: block;
54
  visibility: visible;
54
  visibility: visible;
55
  opacity: 1;
55
  opacity: 1;
56
  z-index: 1337;
56
  z-index: 1337;
57
}
57
}
58
58
59
/* Copyright note */
59
/* Copyright note */
60
.tooltip span:after {
60
.tooltip span:after {
61
  display: block;
61
  display: block;
62
  margin: 0.5em 0 0 0;
62
  margin: 0.5em 0 0 0;
63
  border-top: 1px solid gray;
63
  border-top: 1px solid gray;
64
  padding-top: 0.5em;
64
  padding-top: 0.5em;
65
  background-color: transparent;
65
  background-color: transparent;
66
  content: "Accessible Pure\a0 CSS\a0 Tooltips\0d \0a\
66
  content: "Accessible Pure\a0 CSS\a0 Tooltips\0d \0a\
67
    Copyright\a0 \a9 \a0 2008,\a0 2010\a0 \a0 \
67
    Copyright\a0 \a9 \a0 2008,\a0 2010\a0 \a0 \
68
    Thomas\a0 'PointedEars'\a0 Lahn <mehl@PointedEars.de>.\0d \0a \
68
    Thomas\a0 'PointedEars'\a0 Lahn <mehl@PointedEars.de>.\0d \0a \
69
    Distributed under the\a0 GNU\a0 GPL\a0 v3 or later.";
69
    Distributed under the\a0 GNU\a0 GPL\a0 v3 or later.";
70
  color: gray;
70
  color: gray;
71
  font-size: xx-small;
71
  font-size: xx-small;
72
}
72
}
73
73
74
*>.tooltip span:after {
74
*>.tooltip span:after {
75
  color: black;
75
  color: black;
76
  opacity: 0.9;
76
  opacity: 0.9;
77
}
77
}
78
78
79
/* elements of the tooltip contents to hide when the tooltop is displayed */
79
/* elements of the tooltip contents to hide when the tooltop is displayed */
80
.tooltip span span {
80
.tooltip span span {
81
  position: relative;
81
  position: relative;
82
  visibility: visible;
82
  visibility: visible;
83
  display: inline;
83
  display: inline;
84
  padding: 0;
84
  padding: 0;
85
  border: none;
85
  border: none;
86
}
86
}
87
87
88
.tooltip:hover span span,
88
.tooltip:hover span span,
89
.tooltip:focus span span {
89
.tooltip:focus span span {
90
  visibility: hidden;
90
  visibility: hidden;
91
  display: none;
91
  display: none;
92
}
92
}