mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
200 lines
3.7 KiB
SCSS
200 lines
3.7 KiB
SCSS
@import "../../../globals.ios";
|
|
@import "../toolbar";
|
|
@import "../toolbar-button";
|
|
|
|
// iOS Toolbar
|
|
// --------------------------------------------------
|
|
|
|
$toolbar-order-ios: (
|
|
back-button: 0,
|
|
menu-toggle-start: 1,
|
|
buttons-left: 2,
|
|
buttons-start: 3,
|
|
content: 4,
|
|
buttons-end: 5,
|
|
buttons-right: 6,
|
|
menu-toggle-end: 7,
|
|
);
|
|
|
|
$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 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
|
|
// --------------------------------------------------
|
|
|
|
.toolbar-content {
|
|
flex: 1;
|
|
order: map-get($toolbar-order-ios, content);
|
|
}
|
|
|
|
.toolbar-title {
|
|
font-size: $toolbar-ios-title-font-size;
|
|
font-weight: 500;
|
|
text-align: center;
|
|
pointer-events: auto;
|
|
color: $toolbar-ios-text-color;
|
|
}
|
|
|
|
ion-title {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
padding: 0px 90px 1px 90px;
|
|
pointer-events: none;
|
|
transform: translateZ(0px);
|
|
}
|
|
|
|
|
|
// iOS Toolbar Buttons
|
|
// --------------------------------------------------
|
|
|
|
ion-buttons {
|
|
flex: 1;
|
|
order: map-get($toolbar-order-ios, buttons-start);
|
|
transform: translateZ(0px);
|
|
}
|
|
|
|
ion-buttons[left] {
|
|
order: map-get($toolbar-order-ios, buttons-left);
|
|
}
|
|
|
|
ion-buttons[end] {
|
|
text-align: right;
|
|
order: map-get($toolbar-order-ios, buttons-end);
|
|
}
|
|
|
|
ion-buttons[right] {
|
|
text-align: right;
|
|
order: map-get($toolbar-order-ios, buttons-right);
|
|
}
|
|
|
|
.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-left icon {
|
|
margin-left: -0.1em;
|
|
padding-right: 0.3em;
|
|
font-size: 1.4em;
|
|
line-height: 0.67;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.bar-button-icon-right icon {
|
|
margin-right: -0.2em;
|
|
padding-left: 0.4em;
|
|
font-size: 1.4em;
|
|
line-height: 0.67;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.bar-button-icon-only {
|
|
padding: 0;
|
|
min-width: 0.9em;
|
|
|
|
icon {
|
|
padding: 0 0.1em;
|
|
font-size: 1.8em;
|
|
line-height: 0.67;
|
|
pointer-events: none;
|
|
}
|
|
}
|
|
|
|
|
|
// iOS Toolbar 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 Toolbar Menu Toggle
|
|
// --------------------------------------------------
|
|
|
|
[menu-toggle] {
|
|
order: map-get($toolbar-order-ios, menu-toggle-start);
|
|
cursor: pointer;
|
|
}
|
|
|
|
[menu-toggle][end],
|
|
[menu-toggle][right] {
|
|
order: map-get($toolbar-order-ios, menu-toggle-end);
|
|
}
|
|
|
|
ion-segment-button[button] {
|
|
line-height: 2.4rem;
|
|
min-height: 2.4rem;
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
|
|
// 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);
|
|
}
|
|
}
|
|
|
|
}
|