Skip to content

Commit cbd3331

Browse files
peterblazejewiczXhmikosR
authored andcommitted
Use consistent arrow class (#28105)
1 parent 049a500 commit cbd3331

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

js/src/popover.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const Default = {
2929
trigger : 'click',
3030
content : '',
3131
template : '<div class="popover" role="tooltip">' +
32-
'<div class="arrow"></div>' +
32+
'<div class="popover-arrow"></div>' +
3333
'<h3 class="popover-header"></h3>' +
3434
'<div class="popover-body"></div></div>'
3535
}

js/src/tooltip.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const AttachmentMap = {
6060
const Default = {
6161
animation : true,
6262
template : '<div class="tooltip" role="tooltip">' +
63-
'<div class="arrow"></div>' +
63+
'<div class="tooltip-arrow"></div>' +
6464
'<div class="tooltip-inner"></div></div>',
6565
trigger : 'hover focus',
6666
title : '',
@@ -103,7 +103,7 @@ const ClassName = {
103103
const Selector = {
104104
TOOLTIP : '.tooltip',
105105
TOOLTIP_INNER : '.tooltip-inner',
106-
ARROW : '.arrow'
106+
TOOLTIP_ARROW : '.tooltip-arrow'
107107
}
108108

109109
const Trigger = {
@@ -302,7 +302,7 @@ class Tooltip {
302302
behavior: this.config.fallbackPlacement
303303
},
304304
arrow: {
305-
element: Selector.ARROW
305+
element: Selector.TOOLTIP_ARROW
306306
},
307307
preventOverflow: {
308308
boundariesElement: this.config.boundary

js/tests/unit/popover.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ $(function () {
239239
.bootstrapPopover({
240240
title: 'Test',
241241
content: 'Test',
242-
template: '<div class="popover foobar"><div class="arrow"></div><div class="inner"><h3 class="title"/><div class="content"><p/></div></div></div>'
242+
template: '<div class="popover foobar"><div class="popover-arrow"></div><div class="inner"><h3 class="title"/><div class="content"><p/></div></div></div>'
243243
})
244244
.one('shown.bs.popover', function () {
245245
assert.notEqual($('.popover').length, 0, 'popover was inserted')

scss/_popover.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@include border-radius($popover-border-radius);
1818
@include box-shadow($popover-box-shadow);
1919

20-
.arrow {
20+
.popover-arrow {
2121
position: absolute;
2222
display: block;
2323
width: $popover-arrow-width;
@@ -38,7 +38,7 @@
3838
.bs-popover-top {
3939
margin-bottom: $popover-arrow-height;
4040

41-
> .arrow {
41+
> .popover-arrow {
4242
bottom: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
4343

4444
&::before {
@@ -58,7 +58,7 @@
5858
.bs-popover-right {
5959
margin-left: $popover-arrow-height;
6060

61-
> .arrow {
61+
> .popover-arrow {
6262
left: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
6363
width: $popover-arrow-height;
6464
height: $popover-arrow-width;
@@ -81,7 +81,7 @@
8181
.bs-popover-bottom {
8282
margin-top: $popover-arrow-height;
8383

84-
> .arrow {
84+
> .popover-arrow {
8585
top: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
8686

8787
&::before {
@@ -113,7 +113,7 @@
113113
.bs-popover-left {
114114
margin-right: $popover-arrow-height;
115115

116-
> .arrow {
116+
> .popover-arrow {
117117
right: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
118118
width: $popover-arrow-height;
119119
height: $popover-arrow-width;

scss/_tooltip.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
&.show { opacity: $tooltip-opacity; }
1616

17-
.arrow {
17+
.tooltip-arrow {
1818
position: absolute;
1919
display: block;
2020
width: $tooltip-arrow-width;
@@ -32,7 +32,7 @@
3232
.bs-tooltip-top {
3333
padding: $tooltip-arrow-height 0;
3434

35-
.arrow {
35+
.tooltip-arrow {
3636
bottom: 0;
3737

3838
&::before {
@@ -46,7 +46,7 @@
4646
.bs-tooltip-right {
4747
padding: 0 $tooltip-arrow-height;
4848

49-
.arrow {
49+
.tooltip-arrow {
5050
left: 0;
5151
width: $tooltip-arrow-height;
5252
height: $tooltip-arrow-width;
@@ -62,7 +62,7 @@
6262
.bs-tooltip-bottom {
6363
padding: $tooltip-arrow-height 0;
6464

65-
.arrow {
65+
.tooltip-arrow {
6666
top: 0;
6767

6868
&::before {
@@ -76,7 +76,7 @@
7676
.bs-tooltip-left {
7777
padding: 0 $tooltip-arrow-height;
7878

79-
.arrow {
79+
.tooltip-arrow {
8080
right: 0;
8181
width: $tooltip-arrow-height;
8282
height: $tooltip-arrow-width;

site/docs/4.3/components/popovers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,12 @@ Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` opti
212212
<tr>
213213
<td>template</td>
214214
<td>string</td>
215-
<td><code>'&lt;div class="popover" role="tooltip"&gt;&lt;div class="arrow"&gt;&lt;/div&gt;&lt;h3 class="popover-header"&gt;&lt;/h3&gt;&lt;div class="popover-body"&gt;&lt;/div&gt;&lt;/div&gt;'</code></td>
215+
<td><code>'&lt;div class="popover" role="tooltip"&gt;&lt;div class="popover-arrow"&gt;&lt;/div&gt;&lt;h3 class="popover-header"&gt;&lt;/h3&gt;&lt;div class="popover-body"&gt;&lt;/div&gt;&lt;/div&gt;'</code></td>
216216
<td>
217217
<p>Base HTML to use when creating the popover.</p>
218218
<p>The popover's <code>title</code> will be injected into the <code>.popover-header</code>.</p>
219219
<p>The popover's <code>content</code> will be injected into the <code>.popover-body</code>.</p>
220-
<p><code>.arrow</code> will become the popover's arrow.</p>
220+
<p><code>.popover-arrow</code> will become the popover's arrow.</p>
221221
<p>The outermost wrapper element should have the <code>.popover</code> class.</p>
222222
</td>
223223
</tr>

site/docs/4.3/components/tooltips.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Additionally, do not rely solely on `hover` as the trigger for your tooltip, as
119119

120120
<!-- Generated markup by the plugin -->
121121
<div class="tooltip bs-tooltip-top" role="tooltip">
122-
<div class="arrow"></div>
122+
<div class="tooltip-arrow"></div>
123123
<div class="tooltip-inner">
124124
Some tooltip text!
125125
</div>
@@ -210,11 +210,11 @@ Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` opti
210210
<tr>
211211
<td>template</td>
212212
<td>string</td>
213-
<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>
213+
<td><code>'&lt;div class="tooltip" role="tooltip"&gt;&lt;div class="tooltip-arrow"&gt;&lt;/div&gt;&lt;div class="tooltip-inner"&gt;&lt;/div&gt;&lt;/div&gt;'</code></td>
214214
<td>
215215
<p>Base HTML to use when creating the tooltip.</p>
216216
<p>The tooltip's <code>title</code> will be injected into the <code>.tooltip-inner</code>.</p>
217-
<p><code>.arrow</code> will become the tooltip's arrow.</p>
217+
<p><code>.tooltip-arrow</code> will become the tooltip's arrow.</p>
218218
<p>The outermost wrapper element should have the <code>.tooltip</code> class and <code>role="tooltip"</code>.</p>
219219
</td>
220220
</tr>

0 commit comments

Comments
 (0)