|
1 | | -@use "../../themes/ionic/ionic.globals.scss" as globals; |
2 | 1 | @import "../../themes/mixins"; |
| 2 | +@import "./tab-button.common.vars"; |
3 | 3 |
|
4 | 4 | :host { |
5 | 5 | /** |
|
158 | 158 | :host ::slotted(ion-badge[vertical]:empty) { |
159 | 159 | @include padding(0, 0); |
160 | 160 |
|
161 | | - width: globals.$ion-scale-200; |
162 | | - height: globals.$ion-scale-200; |
| 161 | + width: $tab-button-badge-size-emtpy; |
| 162 | + height: $tab-button-badge-size-emtpy; |
163 | 163 | } |
164 | 164 |
|
165 | 165 | :host ::slotted(ion-badge[vertical]) { |
166 | | - @include position($start: 50%); |
167 | | - |
168 | | - transform: translateX(globals.$ion-scale-300); |
| 166 | + @include position($start: $tab-button-badge-start-position); |
169 | 167 | } |
170 | 168 |
|
171 | 169 | :host ::slotted(ion-badge[vertical="top"]) { |
172 | | - top: globals.$ion-scale-0; |
| 170 | + top: $tab-button-badge-top-position; |
173 | 171 | } |
174 | 172 |
|
175 | | -:host ::slotted(ion-badge[vertical="bottom"]) { |
176 | | - @include position($top: 50%); |
| 173 | +:host ::slotted(ion-badge[vertical="top"]:empty) { |
| 174 | + top: $tab-button-badge-top-position-empty; |
| 175 | +} |
177 | 176 |
|
178 | | - transform: translate(globals.$ion-scale-300, calc(globals.$ion-scale-200 * -1)); |
| 177 | +:host ::slotted(ion-badge[vertical="bottom"]) { |
| 178 | + @include position($top: $tab-button-badge-bottom-position); |
179 | 179 | } |
180 | 180 |
|
181 | 181 | :host ::slotted(ion-badge[vertical="bottom"]:empty) { |
182 | | - transform: translate(globals.$ion-scale-300, calc(globals.$ion-scale-100 * -1)); |
| 182 | + @include position($top: $tab-button-badge-bottom-position-empty); |
183 | 183 | } |
184 | 184 |
|
185 | 185 | :host ::slotted(ion-badge[vertical]:not(:empty)) { |
186 | | - @include padding(2px, 4px, 4px, 4px); |
| 186 | + @include padding( |
| 187 | + $tab-button-badge-padding-top, |
| 188 | + $tab-button-badge-padding-end, |
| 189 | + $tab-button-badge-padding-bottom, |
| 190 | + $tab-button-badge-padding-start |
| 191 | + ); |
187 | 192 |
|
188 | | - min-width: globals.$ion-scale-400; |
189 | | - height: globals.$ion-scale-400; |
| 193 | + display: flex; |
| 194 | + |
| 195 | + align-items: center; |
| 196 | + justify-content: center; |
190 | 197 |
|
191 | | - font-size: globals.$ion-font-size-300; |
| 198 | + min-width: $tab-button-badge-size; |
| 199 | + height: $tab-button-badge-size; |
192 | 200 |
|
193 | | - line-height: 1; |
| 201 | + font-size: $tab-button-badge-font-size; |
194 | 202 | } |
195 | 203 |
|
196 | 204 | // Tab Button: Layout |
|
0 commit comments