mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
131 lines
2.1 KiB
SCSS
131 lines
2.1 KiB
SCSS
|
|
// Toolbar
|
|
// --------------------------------------------------
|
|
|
|
$toolbar-padding: 4px !default;
|
|
|
|
$toolbar-order: (
|
|
backButton: 10,
|
|
menu-toggle: 20,
|
|
title: 30,
|
|
primary: 40,
|
|
secondary: 50
|
|
);
|
|
|
|
|
|
.toolbar {
|
|
position: relative;
|
|
z-index: $z-index-toolbar;
|
|
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
order: $flex-order-toolbar-top;
|
|
flex: 0;
|
|
|
|
padding: $toolbar-padding;
|
|
width: 100%;
|
|
|
|
border: 0;
|
|
border-color: $toolbar-border-color;
|
|
background-color: $toolbar-background-color;
|
|
|
|
button,
|
|
[button] {
|
|
background-color: transparent;
|
|
color: $toolbar-active-color;
|
|
box-shadow: none;
|
|
|
|
&.activated,
|
|
&:hover,
|
|
&.hover {
|
|
color: $toolbar-active-color;
|
|
background-color: transparent;
|
|
}
|
|
}
|
|
}
|
|
|
|
.toolbar[position="bottom"] {
|
|
order: $flex-order-toolbar-bottom;
|
|
}
|
|
|
|
.toolbar-inner {
|
|
display: flex;
|
|
width: 100%;
|
|
}
|
|
|
|
.toolbar-title {
|
|
flex: 1;
|
|
order: map-get($toolbar-order, title);
|
|
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
transform: translateZ(0px);
|
|
}
|
|
|
|
.toolbar-inner-title {
|
|
width: 100%;
|
|
padding: 0 1.5rem;
|
|
}
|
|
|
|
ion-title {
|
|
display: block;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
color: $toolbar-text-color;
|
|
}
|
|
|
|
.toolbar [menu-toggle] {
|
|
display: flex;
|
|
align-items: center;
|
|
margin: 0 6px;
|
|
padding: 0;
|
|
min-width: 36px;
|
|
order: map-get($toolbar-order, 'menu-toggle');
|
|
box-shadow: none;
|
|
}
|
|
|
|
.toolbar [menu-toggle] icon {
|
|
padding: 0 6px;
|
|
font-size: 2.8rem;
|
|
}
|
|
|
|
.toolbar-item {
|
|
transform: translateZ(0px);
|
|
}
|
|
|
|
ion-nav-items {
|
|
display: block;
|
|
margin: 0 0.2rem;
|
|
}
|
|
|
|
.toolbar-primary-item {
|
|
order: map-get($toolbar-order, primary);
|
|
}
|
|
|
|
.toolbar-secondary-item {
|
|
order: map-get($toolbar-order, secondary);
|
|
}
|
|
|
|
|
|
// Toolbar Color Generation
|
|
// --------------------------------------------------
|
|
|
|
@each $color-name, $color-value in $colors {
|
|
|
|
.toolbar[#{$color-name}] {
|
|
background-color: $color-value;
|
|
border-color: darken($color-value, 10%);
|
|
|
|
ion-title,
|
|
button,
|
|
[button] {
|
|
color: inverse($color-value);
|
|
}
|
|
}
|
|
|
|
}
|