mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
164 lines
3.1 KiB
SCSS
164 lines
3.1 KiB
SCSS
@import "../../../globals.ios";
|
|
@import "../toolbar";
|
|
@import "../toolbar-button";
|
|
|
|
// iOS Toolbar
|
|
// --------------------------------------------------
|
|
|
|
$toolbar-order-ios: (
|
|
back-button: 10,
|
|
menu-toggle-primary: 20,
|
|
primary: 30,
|
|
secondary: 50,
|
|
menu-toggle-secondary: 60,
|
|
);
|
|
|
|
$toolbar-ios-padding: 4px !default;
|
|
$toolbar-ios-height: 4.4rem !default;
|
|
$toolbar-ios-button-font-size: 1.7rem !default;
|
|
$toolbar-ios-title-font-size: 1.7rem !default;
|
|
|
|
$navbar-ios-height: $toolbar-ios-height !default;
|
|
|
|
|
|
.toolbar {
|
|
padding: $toolbar-ios-padding;
|
|
min-height: $toolbar-ios-height;
|
|
}
|
|
|
|
ion-navbar-section {
|
|
min-height: $navbar-ios-height;
|
|
}
|
|
|
|
// iOS Toolbar Buttons
|
|
// --------------------------------------------------
|
|
|
|
.bar-button {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
padding: 0 5px;
|
|
min-height: 32px;
|
|
border: 0;
|
|
font-size: $toolbar-ios-button-font-size;
|
|
color: $toolbar-ios-active-color;
|
|
background-color: transparent;
|
|
}
|
|
|
|
.bar-button.icon-only {
|
|
padding-right: 0;
|
|
padding-left: 0;
|
|
}
|
|
|
|
.bar-button icon {
|
|
padding: 0;
|
|
min-width: 28px;
|
|
}
|
|
|
|
|
|
// iOS Back Button
|
|
// --------------------------------------------------
|
|
|
|
.back-button {
|
|
margin: 0;
|
|
min-height: 3.2rem;
|
|
line-height: 1;
|
|
order: map-get($toolbar-order-ios, 'back-button');
|
|
overflow: visible;
|
|
transform: translateZ(0px);
|
|
}
|
|
|
|
.back-button-icon {
|
|
display: inherit;
|
|
margin: 0;
|
|
min-width: 18px;
|
|
font-size: 3.2rem;
|
|
}
|
|
|
|
|
|
// iOS Menu Toggle
|
|
// --------------------------------------------------
|
|
|
|
[menu-toggle] {
|
|
order: map-get($toolbar-order-ios, menu-toggle-primary);
|
|
cursor: pointer;
|
|
}
|
|
|
|
[menu-toggle][secondary] {
|
|
order: map-get($toolbar-order-ios, menu-toggle-secondary);
|
|
}
|
|
|
|
ion-segment-button[button] {
|
|
line-height: 2.4rem;
|
|
min-height: 2.4rem;
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
|
|
// iOS Toolbar Background
|
|
// --------------------------------------------------
|
|
|
|
.toolbar-background {
|
|
border-bottom-width: 1px;
|
|
border-bottom-style: solid;
|
|
border-color: $toolbar-ios-border-color;
|
|
background-color: $toolbar-ios-background-color;
|
|
}
|
|
|
|
&.hairlines .toolbar-background {
|
|
border-bottom-width: 0.55px;
|
|
}
|
|
|
|
|
|
// iOS Toolbar Content
|
|
// --------------------------------------------------
|
|
|
|
ion-title {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
padding: 0px 90px 1px 90px;
|
|
pointer-events: none;
|
|
transform: translateZ(0px);
|
|
}
|
|
|
|
.toolbar-title {
|
|
font-size: $toolbar-ios-title-font-size;
|
|
font-weight: 500;
|
|
text-align: center;
|
|
pointer-events: auto;
|
|
color: $toolbar-ios-text-color;
|
|
}
|
|
|
|
ion-nav-items {
|
|
flex: 1;
|
|
order: map-get($toolbar-order-ios, primary);
|
|
transform: translateZ(0px);
|
|
}
|
|
|
|
ion-nav-items[secondary] {
|
|
text-align: right;
|
|
order: map-get($toolbar-order-ios, secondary);
|
|
}
|
|
|
|
|
|
// iOS Toolbar Color Generation
|
|
// --------------------------------------------------
|
|
|
|
@each $color-name, $color-value in $colors-ios {
|
|
|
|
.toolbar[#{$color-name}] {
|
|
|
|
.toolbar-background {
|
|
background-color: $color-value;
|
|
border-color: darken($color-value, 10%);
|
|
}
|
|
|
|
.toolbar-title {
|
|
color: inverse($color-value);
|
|
}
|
|
}
|
|
|
|
}
|