Commit 460ff235 authored by Johann-S's avatar Johann-S
Browse files

Documentation display tooltips/popovers arrows with css for static examples

parent aa36439e
6 merge requests!28721Hot test,!27561Adds font-weight-medium to font weight classes,!25326Adjust examples,!23995Add back cursor: pointer for .btn-link,!23178Spinner,!17021v4
Showing with 43 additions and 19 deletions
+43 -19
......@@ -298,6 +298,18 @@
margin-top: .25rem;
margin-bottom: .25rem;
}
.bs-tooltip-top-docs,
.bs-tooltip-bottom-docs {
.arrow {
left: 50%;
}
}
.bs-tooltip-right-docs,
.bs-tooltip-left-docs {
.arrow {
top: 50%;
}
}
// Popovers
.bd-example-popover-static {
......@@ -311,6 +323,18 @@
width: 260px;
margin: 1.25rem;
}
.bs-popover-top-docs,
.bs-popover-bottom-docs {
.arrow {
left: 50%;
}
}
.bs-popover-right-docs,
.bs-popover-left-docs {
.arrow {
top: 50%;
}
}
// Tooltips
.tooltip-demo a {
......
......@@ -56,32 +56,32 @@ $(function () {
Four options are available: top, right, bottom, and left aligned.
<div class="bd-example bd-example-popover-static">
<div class="popover bs-popover-top">
<div class="arrow"></div>
<div class="popover bs-popover-top bs-popover-top-docs">
<div class="arrow" x-arrow></div>
<h3 class="popover-title">Popover top</h3>
<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div>
</div>
<div class="popover bs-popover-right">
<div class="arrow"></div>
<div class="popover bs-popover-right bs-popover-right-docs">
<div class="arrow" x-arrow></div>
<h3 class="popover-title">Popover right</h3>
<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div>
</div>
<div class="popover bs-popover-bottom">
<div class="arrow"></div>
<div class="popover bs-popover-bottom bs-popover-bottom-docs">
<div class="arrow" x-arrow></div>
<h3 class="popover-title">Popover bottom</h3>
<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div>
</div>
<div class="popover bs-popover-left">
<div class="arrow"></div>
<div class="popover bs-popover-left bs-popover-left-docs">
<div class="arrow" x-arrow></div>
<h3 class="popover-title">Popover left</h3>
<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
......@@ -234,7 +234,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
<tr>
<td>template</td>
<td>string</td>
<td><code>'&lt;div class="popover" role="tooltip"&gt;&lt;div class="arrow"&gt;&lt;/div&gt;&lt;h3 class="popover-title"&gt;&lt;/h3&gt;&lt;div class="popover-content"&gt;&lt;/div&gt;&lt;/div&gt;'</code></td>
<td><code>'&lt;div class="popover" role="tooltip"&gt;&lt;div class="arrow" x-arrow&gt;&lt;/div&gt;&lt;h3 class="popover-title"&gt;&lt;/h3&gt;&lt;div class="popover-content"&gt;&lt;/div&gt;&lt;/div&gt;'</code></td>
<td>
<p>Base HTML to use when creating the popover.</p>
<p>The popover's <code>title</code> will be injected into the <code>.popover-title</code>.</p>
......
......@@ -51,26 +51,26 @@ Hover over the links below to see tooltips:
Four options are available: top, right, bottom, and left aligned.
<div class="bd-example bd-example-tooltip-static">
<div class="tooltip bs-tooltip-top" role="tooltip">
<div class="arrow"></div>
<div class="tooltip bs-tooltip-top bs-tooltip-top-docs" role="tooltip">
<div class="arrow" x-arrow></div>
<div class="tooltip-inner">
Tooltip on the top
</div>
</div>
<div class="tooltip bs-tooltip-right" role="tooltip">
<div class="arrow"></div>
<div class="tooltip bs-tooltip-right bs-tooltip-right-docs" role="tooltip">
<div class="arrow" x-arrow></div>
<div class="tooltip-inner">
Tooltip on the right
</div>
</div>
<div class="tooltip bs-tooltip-bottom" role="tooltip">
<div class="arrow"></div>
<div class="tooltip bs-tooltip-bottom bs-tooltip-bottom-docs" role="tooltip">
<div class="arrow" x-arrow></div>
<div class="tooltip-inner">
Tooltip on the bottom
</div>
</div>
<div class="tooltip bs-tooltip-left" role="tooltip">
<div class="arrow"></div>
<div class="tooltip bs-tooltip-left bs-tooltip-left-docs" role="tooltip">
<div class="arrow" x-arrow></div>
<div class="tooltip-inner">
Tooltip on the left
</div>
......@@ -140,7 +140,7 @@ You should only add tooltips to HTML elements that are traditionally keyboard-fo
<!-- Generated markup by the plugin -->
<div class="tooltip bs-tooltip-top" role="tooltip">
<div class="arrow"></div>
<div class="arrow" x-arrow></div>
<div class="tooltip-inner">
Some tooltip text!
</div>
......@@ -213,7 +213,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
<tr>
<td>template</td>
<td>string</td>
<td><code>'&lt;div class="tooltip" role="tooltip"&gt;&lt;div class="arrow"&gt;&lt;/div&gt;&lt;div class="tooltip-inner"&gt;&lt;/div&gt;&lt;/div&gt;'</code></td>
<td><code>'&lt;div class="tooltip" role="tooltip"&gt;&lt;div class="arrow" x-arrow&gt;&lt;/div&gt;&lt;div class="tooltip-inner"&gt;&lt;/div&gt;&lt;/div&gt;'</code></td>
<td>
<p>Base HTML to use when creating the tooltip.</p>
<p>The tooltip's <code>title</code> will be injected into the <code>.tooltip-inner</code>.</p>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment