mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-06 22:29:44 +08:00
201 lines
3.8 KiB
SCSS
201 lines
3.8 KiB
SCSS
.bar {
|
|
position: fixed;
|
|
left: 0;
|
|
right: 0;
|
|
z-index: 10;
|
|
|
|
display: -webkit-box;
|
|
display: box;
|
|
|
|
width: 100%;
|
|
height: $bar-height;
|
|
padding: $bar-padding-portrait;
|
|
box-sizing: border-box;
|
|
|
|
background-color: $bar-bg;
|
|
border-style: solid;
|
|
border-width: 0;
|
|
|
|
@include user-select(none);
|
|
|
|
&.bar-header {
|
|
border-bottom-width: 1px;
|
|
}
|
|
&.bar-footer {
|
|
border-top-width: 1px;
|
|
}
|
|
|
|
&.bar-default {
|
|
@include bar-style($bar-default-bg, $bar-default-border-color, $gray-dark);
|
|
}
|
|
|
|
&.bar-secondary {
|
|
@include bar-style($bar-secondary-bg, $bar-secondary-border-color, $gray-dark);
|
|
}
|
|
&.bar-primary {
|
|
@include bar-style($bar-primary-bg, $bar-primary-border-color, $white);
|
|
}
|
|
&.bar-info {
|
|
@include bar-style($bar-info-bg, $bar-info-border-color, $white);
|
|
}
|
|
&.bar-success {
|
|
@include bar-style($bar-success-bg, $bar-success-border-color, $white);
|
|
}
|
|
&.bar-warning {
|
|
@include bar-style($bar-warning-bg, $bar-warning-border-color, $white);
|
|
}
|
|
&.bar-danger {
|
|
@include bar-style($bar-danger-bg, $bar-danger-border-color, $white);
|
|
}
|
|
&.bar-dark {
|
|
@include bar-style($bar-dark-bg, $bar-dark-border-color, $white);
|
|
}
|
|
|
|
//
|
|
//Disabled temporarily because it's annoying for testing.
|
|
//@media screen and (orientation : landscape) {
|
|
//padding: $barPaddingLandscape;
|
|
//}
|
|
|
|
// Title inside of a bar is centered
|
|
.title {
|
|
position: absolute;
|
|
z-index: 0;
|
|
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
|
|
line-height: $bar-height;
|
|
|
|
margin: 0;
|
|
//padding: $barPaddingVertical 0px;
|
|
|
|
min-width: 30px;
|
|
|
|
// Go into ellipsis if too small
|
|
text-overflow: ellipsis;
|
|
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
font-size: $bar-title-font-size;
|
|
}
|
|
|
|
.title a {
|
|
color: inherit;
|
|
}
|
|
|
|
.button {
|
|
@include box-flex(0);
|
|
background-color: transparent;
|
|
line-height: $bar-button-line-height;
|
|
font-size: 12px;
|
|
padding: 4px 12px;
|
|
z-index: 1;
|
|
}
|
|
|
|
.button-bar {
|
|
line-height: $bar-button-bar-line-height;
|
|
}
|
|
|
|
.button-bar + .button, .button + .button-bar {
|
|
margin-left: 5px;
|
|
}
|
|
|
|
// Place the last button in a bar on the right of the bar
|
|
.title + .button:last-child,
|
|
> .button + .button:last-child,
|
|
> .button.pull-right,
|
|
.title + .buttons {
|
|
position: absolute;
|
|
top: 5px;
|
|
right: 5px;
|
|
}
|
|
|
|
}
|
|
|
|
// Default styles for buttons inside of styled bars
|
|
|
|
.bar-default {
|
|
.button {
|
|
@include button-style($button-default-bg, $buttonDefaultBorder, $gray-dark);
|
|
}
|
|
}
|
|
|
|
.bar-secondary {
|
|
.button {
|
|
@include button-style($button-secondary-bg, $button-secondary-border, $gray-dark);
|
|
}
|
|
}
|
|
|
|
.bar-primary {
|
|
.button {
|
|
@include button-style($button-primary-bg, $button-primary-border, $white);
|
|
}
|
|
}
|
|
.bar-info {
|
|
.button {
|
|
@include button-style($button-info-bg, $button-info-border, $white);
|
|
}
|
|
}
|
|
.bar-success {
|
|
.button {
|
|
@include button-style($button-success-bg, $button-success-border, $white);
|
|
}
|
|
}
|
|
.bar-warning {
|
|
.button {
|
|
@include button-style($button-warning-bg, $button-warning-border, $white);
|
|
}
|
|
}
|
|
.bar-danger {
|
|
.button {
|
|
@include button-style($button-danger-bg, $buttonDangerBorder, $white);
|
|
}
|
|
}
|
|
.bar-dark {
|
|
// A default style for buttons
|
|
.button {
|
|
@include button-style($button-dark-bg, $button-dark-border, $white);
|
|
}
|
|
}
|
|
|
|
.bar .button-icon {
|
|
background-color: transparent;
|
|
border: 1px solid transparent;
|
|
}
|
|
|
|
// Header at top
|
|
.bar-header {
|
|
top: 0;
|
|
}
|
|
|
|
// Footer at bottom
|
|
.bar-footer {
|
|
bottom: 0;
|
|
}
|
|
|
|
// Don't render padding if the bar is just for tabs
|
|
.bar-tabs {
|
|
padding: 0;
|
|
}
|
|
|
|
.bar-header-secondary {
|
|
top: $bar-height;
|
|
display: block;
|
|
}
|
|
.bar-footer-secondary {
|
|
bottom: $bar-height;
|
|
display: block;
|
|
}
|
|
|
|
/* Pad top/bottom of content so it doesn't hide behind .bar-title and .bar-tab.
|
|
Note: For these to work, content must come after both bars in the markup */
|
|
.has-header {
|
|
top: $bar-height;
|
|
}
|
|
|
|
.has-footer {
|
|
bottom: $bar-height;
|
|
}
|