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