Skip to content

Commit c84b8aa

Browse files
committed
Docs page examples
1 parent 6d48258 commit c84b8aa

File tree

2 files changed

+26
-13
lines changed

2 files changed

+26
-13
lines changed

docs/index.html

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,22 @@ <h2>Usage</h2>
3737
</p>
3838

3939
<h2>Examples</h2>
40-
<p>Lorem ipsum dolor sit amet. Sample <span data-tooltip="Tooltip is visible on this element">tooltip span here</span>, but not here... </p>
41-
<blockquote>
42-
<p>Lorem ipsum dolor sit amet ... <a href="" data-tooltip="Lorem ipsum dolor sit amet...">tootltip</a></p>
43-
</blockquote>
44-
<p>
45-
... <a href="" data-tooltip="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris vitae augue maximus" class="tooltip-multiline tooltip-bottom">tootltip multiline, tooltip bottom</a>
46-
/ <a href="" data-tooltip="Lorem ipsum dolor sit amet..." class="tooltip-bottom-right">tootltip (bottom right)</a>
47-
<br><a href="" data-tooltip="Lorem ipsum dolor sit amet..." class="tooltip-bottom-left">tootltip (bottom left)</a>
48-
</p>
49-
<ul>
50-
<li><a href="" data-tooltip="Lorem ipsum dolor sit amet" class="tooltip-top">Tooltip top (default)</a></li>
51-
<li><a href="" data-tooltip="Lorem ipsum dolor sit amet" class="tooltip-top-left">Tooltip top left</a> / ... / <a href="" data-tooltip="Lorem ipsum dolor sit amet" class="tooltip-top-right">Tooltip top right</a></li>
52-
</ul>
40+
41+
<div class="examples">
42+
<p>💬 Using tooltips on different elements, <span data-tooltip="Tooltip is visible on this element">span with a tooltip here</span>, but not here.</p>
43+
<blockquote>
44+
<p>Hyperlinks with tooltip: <a href="" data-tooltip="Lorem ipsum dolor sit amet...">standard style tooltip</a> (<code>data-tooltip="Lorem ipsum dolor sit amet..."</code>).</p>
45+
</blockquote>
46+
<p>
47+
💬 <a href="" data-tooltip="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris vitae augue maximus" class="tooltip-multiline tooltip-bottom">a multiline tootltip multiline placed at the bottom</a> (<code>class="tooltip-multiline tooltip-bottom"</code>)
48+
/ <a href="" data-tooltip="Lorem ipsum dolor sit amet..." class="tooltip-bottom-right">another element with tootltip on the bottom-right</a> (<code>class="tooltip-bottom-right"</code>)
49+
and <br><a href="" data-tooltip="Lorem ipsum dolor sit amet..." class="tooltip-bottom-left">another one more (placed on bottom-left)</a> (<code>class="tooltip-bottom-left"</code>).
50+
</p>
51+
<ul>
52+
<li><a href="" data-tooltip="Lorem ipsum dolor sit amet">Element with tooltip on top (default)</a></li>
53+
<li><a href="" data-tooltip="Lorem ipsum dolor sit amet" class="tooltip-top-left">hyperlink with Tooltip on top left</a> and <a href="" data-tooltip="Lorem ipsum dolor sit amet" class="tooltip-top-right">another one with tooltip on top right</a> (<code>class="tooltip-top-left"</code>).</li>
54+
</ul>
55+
</div>
5356

5457
<h2>More Info</h2>
5558
<ul>

docs/style.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ a {
2424
font-weight: 500;
2525
text-decoration: none;
2626
}
27+
a:hover {
28+
color: #000;
29+
}
2730
img {
2831
display: block;
2932
max-width: 100%;
@@ -47,6 +50,13 @@ hr {
4750
border-bottom: solid #ddd 1px;
4851
}
4952

53+
.examples {
54+
border: dotted #bee 2px;
55+
border-radius: 3px;
56+
padding: .5rem 2rem;
57+
}
58+
59+
5060
[data-tooltip]{ border-bottom: solid #9ff 2px }
5161
[data-tooltip]:before {
5262
font-weight: 300;

0 commit comments

Comments
 (0)