|
18 | 18 | @include border-radius($border-radius-lg); |
19 | 19 | @include box-shadow($popover-box-shadow); |
20 | 20 |
|
| 21 | + // Arrows |
| 22 | + // |
| 23 | + // .popover-arrow is outer, .popover-arrow::after is inner |
| 24 | + |
| 25 | + .arrow::before, |
| 26 | + .arrow::after { |
| 27 | + position: absolute; |
| 28 | + display: block; |
| 29 | + width: 0; |
| 30 | + height: 0; |
| 31 | + border-color: transparent; |
| 32 | + border-style: solid; |
| 33 | + } |
| 34 | + |
| 35 | + .arrow::before { |
| 36 | + content: ""; |
| 37 | + border-width: $popover-arrow-outer-width; |
| 38 | + } |
| 39 | + .arrow::after { |
| 40 | + content: ""; |
| 41 | + border-width: $popover-arrow-width; |
| 42 | + } |
21 | 43 |
|
22 | 44 | // Popover directions |
23 | 45 |
|
24 | 46 | &.bs-popover-top { |
25 | 47 | margin-bottom: $popover-arrow-width; |
26 | 48 |
|
27 | | - ::before, |
28 | | - ::after { |
| 49 | + .arrow::before, |
| 50 | + .arrow::after { |
29 | 51 | left: 50%; |
30 | 52 | border-bottom-width: 0; |
31 | 53 | } |
32 | 54 |
|
33 | | - ::before { |
| 55 | + .arrow::before { |
34 | 56 | bottom: -$popover-arrow-outer-width; |
35 | 57 | margin-left: -$popover-arrow-outer-width; |
36 | 58 | border-top-color: $popover-arrow-outer-color; |
37 | 59 | } |
38 | 60 |
|
39 | | - ::after { |
| 61 | + .arrow::after { |
40 | 62 | bottom: -($popover-arrow-outer-width - 1); |
41 | 63 | margin-left: -$popover-arrow-width; |
42 | 64 | border-top-color: $popover-arrow-color; |
|
46 | 68 | &.bs-popover-right { |
47 | 69 | margin-left: $popover-arrow-width; |
48 | 70 |
|
49 | | - ::before, |
50 | | - ::after { |
| 71 | + .arrow::before, |
| 72 | + .arrow::after { |
51 | 73 | top: 50%; |
52 | 74 | border-left-width: 0; |
53 | 75 | } |
54 | 76 |
|
55 | | - ::before { |
| 77 | + .arrow::before { |
56 | 78 | left: -$popover-arrow-outer-width; |
57 | 79 | margin-top: -$popover-arrow-outer-width; |
58 | 80 | border-right-color: $popover-arrow-outer-color; |
59 | 81 | } |
60 | 82 |
|
61 | | - ::after { |
| 83 | + .arrow::after { |
62 | 84 | left: -($popover-arrow-outer-width - 1); |
63 | 85 | margin-top: -($popover-arrow-outer-width - 1); |
64 | 86 | border-right-color: $popover-arrow-color; |
|
68 | 90 | &.bs-popover-bottom { |
69 | 91 | margin-top: $popover-arrow-width; |
70 | 92 |
|
71 | | - ::before, |
72 | | - ::after { |
| 93 | + .arrow::before, |
| 94 | + .arrow::after { |
73 | 95 | left: 50%; |
74 | 96 | border-top-width: 0; |
75 | 97 | } |
76 | 98 |
|
77 | | - ::before { |
| 99 | + .arrow::before { |
78 | 100 | top: -$popover-arrow-outer-width; |
79 | 101 | margin-left: -$popover-arrow-outer-width; |
80 | 102 | border-bottom-color: $popover-arrow-outer-color; |
81 | 103 | } |
82 | 104 |
|
83 | | - ::after { |
| 105 | + .arrow::after { |
84 | 106 | top: -($popover-arrow-outer-width - 1); |
85 | 107 | margin-left: -$popover-arrow-width; |
86 | 108 | border-bottom-color: $popover-arrow-color; |
|
102 | 124 | &.bs-popover-left { |
103 | 125 | margin-right: $popover-arrow-width; |
104 | 126 |
|
105 | | - ::before, |
106 | | - ::after { |
| 127 | + .arrow::before, |
| 128 | + .arrow::after { |
107 | 129 | top: 50%; |
108 | 130 | border-right-width: 0; |
109 | 131 | } |
110 | 132 |
|
111 | | - ::before { |
| 133 | + .arrow::before { |
112 | 134 | right: -$popover-arrow-outer-width; |
113 | 135 | margin-top: -$popover-arrow-outer-width; |
114 | 136 | border-left-color: $popover-arrow-outer-color; |
115 | 137 | } |
116 | 138 |
|
117 | | - ::after { |
| 139 | + .arrow::after { |
118 | 140 | right: -($popover-arrow-outer-width - 1); |
119 | 141 | margin-top: -($popover-arrow-outer-width - 1); |
120 | 142 | border-left-color: $popover-arrow-color; |
|
143 | 165 | padding: $popover-content-padding-y $popover-content-padding-x; |
144 | 166 | color: $popover-content-color; |
145 | 167 | } |
146 | | - |
147 | | - |
148 | | -// Arrows |
149 | | -// |
150 | | -// .popover-arrow is outer, .popover-arrow::after is inner |
151 | | - |
152 | | -.arrow::before, |
153 | | -.arrow::after { |
154 | | - position: absolute; |
155 | | - display: block; |
156 | | - width: 0; |
157 | | - height: 0; |
158 | | - border-color: transparent; |
159 | | - border-style: solid; |
160 | | -} |
161 | | - |
162 | | -.arrow::before { |
163 | | - content: ""; |
164 | | - border-width: $popover-arrow-outer-width; |
165 | | -} |
166 | | -.arrow::after { |
167 | | - content: ""; |
168 | | - border-width: $popover-arrow-width; |
169 | | -} |
0 commit comments