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