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