mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00

- Updates the iOS buttons in a toolbar to use the proper global theming variables - Updates the iOS segment to use the correct background variable when checked - Updates the iOS back button and menu button to use the proper color in a toolbar - Updates the iOS buttons in a toolbar w/ color to use the proper contrast colors (background, borders, text, hover, focus), mostly solid and outline buttons were affected - Updates the CSS that applies the global toolbar variables so that it won't affect toolbars w/ a color fixes #18184, fixes #17840
80 lines
1.5 KiB
SCSS
80 lines
1.5 KiB
SCSS
@import "../../themes/ionic.globals";
|
|
|
|
// Menu Button
|
|
// --------------------------------------------------
|
|
|
|
:host {
|
|
/**
|
|
* @prop --color: Color of the menu button
|
|
*
|
|
* @prop --padding-top: Padding top of the button
|
|
* @prop --padding-end: Padding end of the button
|
|
* @prop --padding-bottom: Padding bottom of the button
|
|
* @prop --padding-start: Padding start of the button
|
|
*/
|
|
--padding-top: 0;
|
|
--padding-bottom: 0;
|
|
|
|
color: var(--color);
|
|
|
|
text-align: center;
|
|
text-decoration: none;
|
|
text-overflow: ellipsis;
|
|
text-transform: none;
|
|
|
|
white-space: nowrap;
|
|
font-kerning: none;
|
|
}
|
|
|
|
button {
|
|
@include text-inherit();
|
|
@include margin(0);
|
|
@include padding(var(--padding-top), var(--padding-end), var(--padding-bottom), var(--padding-start));
|
|
@include font-smoothing();
|
|
|
|
display: flex;
|
|
|
|
position: relative;
|
|
|
|
flex-flow: row nowrap;
|
|
flex-shrink: 0;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
height: 32px;
|
|
|
|
border: 0;
|
|
|
|
outline: none;
|
|
|
|
background: transparent;
|
|
|
|
line-height: 1;
|
|
|
|
cursor: pointer;
|
|
user-select: none;
|
|
z-index: 0;
|
|
appearance: none;
|
|
}
|
|
|
|
ion-icon {
|
|
@include margin(0);
|
|
@include padding(0);
|
|
|
|
pointer-events: none;
|
|
}
|
|
|
|
// Menu Button with Color
|
|
// --------------------------------------------------
|
|
|
|
:host(.ion-color) .button-native {
|
|
color: current-color(base);
|
|
}
|
|
|
|
// Menu Button in Toolbar: Global Theming
|
|
// --------------------------------------------------
|
|
|
|
:host-context(ion-toolbar:not(.ion-color)) {
|
|
color: #{var(--ion-toolbar-color, var(--color))};
|
|
}
|