Skip to content

Commit d460c7e

Browse files
author
Joe Crick
committed
(master): Namespace tooltip, and clean it up.
1 parent 39af538 commit d460c7e

File tree

5 files changed

+69
-56
lines changed

5 files changed

+69
-56
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ <h2>Heading 3</h2>
994994
<a name="tooltip"></a>
995995
<h2 class="content-subhead">Tooltip</h2>
996996

997-
<div class="tooltip">
997+
<div class="pcssc-tooltip">
998998
<span class="tooltip-target">Hover Me.</span>
999999
<div class="tooltip-body">
10001000
<p>All around the mulberry bush, the Plunky chased the Sneezle</p>
@@ -1003,7 +1003,7 @@ <h2 class="content-subhead">Tooltip</h2>
10031003

10041004
<div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre
10051005
style="margin: 0; line-height: 125%">
1006-
&lt;div class=<span style="color: #a31515">&quot;tooltip&quot;</span>&gt;
1006+
&lt;div class=<span style="color: #a31515">&quot;pcssc-tooltip&quot;</span>&gt;
10071007
&lt;span class=<span style="color: #a31515">&quot;tooltip-target&quot;</span>&gt;Hover Me.&lt;/span&gt;
10081008
&lt;div class=<span style="color: #a31515">&quot;tooltip-body&quot;</span>&gt;
10091009
&lt;p&gt;All around the mulberry bush, the Plunky chased the Sneezle&lt;/p&gt;

main.css

Lines changed: 37 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

main.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/tooltip.less

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
@import '../lib/variables';
22

3-
.tooltip {
3+
.pcssc-tooltip {
44
display: inline-block;
55

6-
@media @smart-phone {
7-
min-width: 0;
8-
font-size: 12px;
9-
}
10-
116
.tooltip-target {
127
cursor: help;
138

@@ -20,22 +15,7 @@
2015
.tooltip-body {
2116
display: none;
2217
position: absolute;
23-
padding: 20px;
24-
text-align: justify;
25-
min-width: 250px;
26-
max-width: 350px;
27-
z-index: 2000;
28-
29-
@media @medium-device {
30-
min-width: 200px;
31-
}
32-
33-
@media @smart-phone {
34-
left: -150px;
35-
max-width: 200px;
36-
min-width: 100px;
37-
}
38-
18+
z-index: 1500;
3919
}
4020

4121
}

src/layout.less

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,18 @@ body {
4949
border: 1px solid green;
5050
}
5151

52-
.tooltip {
52+
.pcssc-tooltip {
5353
margin-bottom: 30px;
5454

55+
@media @smart-phone {
56+
min-width: 0;
57+
font-size: 12px;
58+
}
59+
60+
@media @medium-device {
61+
font-size: inherit;
62+
}
63+
5564
.tooltip-target {
5665
border: 1px solid lightgrey;
5766
border-radius: 5px;
@@ -61,6 +70,23 @@ body {
6170
.tooltip-body {
6271
margin-top: -90px;
6372
margin-left: 100px;
73+
text-align: justify;
74+
padding: 20px;
75+
min-width: 250px;
76+
max-width: 350px;
77+
78+
@media @smart-phone {
79+
left: -150px;
80+
max-width: 200px;
81+
min-width: 100px;
82+
}
83+
84+
@media @medium-device {
85+
min-width: 200px;
86+
max-width: 300px;
87+
left: inherit;
88+
}
89+
6490
}
6591

6692
}

0 commit comments

Comments
 (0)