Build mobile apps with simple HTML, CSS, and JS components. http://goratchet.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

251 lines
4.8 KiB

//
// Bars
// --------------------------------------------------
12 years ago
.bar {
12 years ago
position: fixed;
right: 0;
left: 0;
z-index: 10;
height: $bar-base-height;
11 years ago
padding-right: $bar-side-spacing;
padding-left: $bar-side-spacing;
background-color: $chrome-color;
border-bottom: $border-default;
-webkit-backface-visibility: hidden; // Make sure the bar is visible when a modal animates in.
backface-visibility: hidden;
11 years ago
}
11 years ago
// Modifier class to dock any bar below .bar-nav
.bar-header-secondary {
top: $bar-base-height;
}
12 years ago
// Modifier class for footer bars
11 years ago
.bar-footer {
bottom: 0;
}
12 years ago
11 years ago
// Modifier class to dock any bar above a standard bar
.bar-footer-secondary {
bottom: $bar-base-height;
}
11 years ago
// Modifier class to dock any bar above a .bar-tab
.bar-footer-secondary-tab {
bottom: $bar-tab-height;
12 years ago
}
// Give the footers the correct border
.bar-footer,
.bar-footer-secondary,
.bar-footer-secondary-tab {
border-top: $border-default;
border-bottom: 0;
}
// Nav bar
// --------------------------------------------------
12 years ago
// Bar docked to top of viewport for showing page title and actions
.bar-nav {
12 years ago
top: 0;
}
11 years ago
// Centered text in the .bar-nav
//
// We position the absolutely to make sure the title is always centered
.title {
11 years ago
position: absolute;
12 years ago
display: block;
width: 100%;
padding: 0;
margin: 0 (-$bar-side-spacing);
font-size: $font-size-default;
font-weight: $font-weight;
line-height: $bar-base-height;
color: #000;
12 years ago
text-align: center;
white-space: nowrap;
11 years ago
}
// Retain specified title color
.title a {
color: inherit;
12 years ago
}
// multiple titles in bar
.titles {
.title {
font-size: $font-size-default - 4px;
margin-top: -0.75em;
}
.title + .title {
padding-top: 1em;
font-size: $font-size-default + 2px;
}
}
// Tab bar
// --------------------------------------------------
12 years ago
11 years ago
// Bar docked to bottom and used for primary app navigation
12 years ago
.bar-tab {
display: table;
12 years ago
bottom: 0;
width: 100%;
11 years ago
height: $bar-tab-height;
12 years ago
padding: 0;
table-layout: fixed;
border-top: $border-default;
border-bottom: 0;
11 years ago
11 years ago
// Navigational tab (Nested to be more specific for the icons in tab-items)
.tab-item {
display: table-cell;
width: 1%;
11 years ago
height: $bar-tab-height;
color: #929292;
text-align: center;
vertical-align: middle;
12 years ago
// Active states for the tab bar
&.active,
&:active {
color: $primary-color;
}
11 years ago
// Tab icon
.icon {
11 years ago
top: 3px;
width: 24px;
height: 24px;
11 years ago
padding-top: 0;
padding-bottom: 0;
11 years ago
11 years ago
// Make the text smaller if it's used with an icon
11 years ago
~ .tab-label {
display: block;
11 years ago
font-size: 11px;
}
}
}
}
// Bars with buttons
11 years ago
// --------------------------------------------------
.bar .btn {
11 years ago
position: relative;
top: 7px;
z-index: 20; // Position the buttons on top of .title
11 years ago
padding: 6px 12px 7px;
margin-top: 0;
11 years ago
font-weight: $font-weight-light;
11 years ago
// Give buttons that are floated left and right side margin
&.pull-right {
margin-left: $bar-side-spacing;
11 years ago
}
&.pull-left {
11 years ago
margin-right: $bar-side-spacing;
}
}
// Bars with link buttons (Line the text up with content)
.bar .btn-link {
top: 0;
padding: 0;
11 years ago
font-size: 16px;
line-height: $bar-base-height;
color: $primary-color;
border: 0;
11 years ago
&:active,
&.active {
color: darken($primary-color, 10%);
}
}
// Bars with block buttons
11 years ago
//
11 years ago
// Add proper padding
.bar .btn-block {
top: 6px;
padding: 7px 0;
11 years ago
margin-bottom: 0;
font-size: 16px; // Scale down font size to fit in bar.
}
// Nav buttons (Only applicable within bars)
//
11 years ago
// Buttons inside bars that sit closer against the viewport.
.bar .btn-nav {
&.pull-left {
margin-left: -5px;
11 years ago
.icon-left-nav {
margin-right: -3px;
}
}
&.pull-right {
margin-right: -5px;
11 years ago
.icon-right-nav {
margin-left: -3px;
}
}
11 years ago
}
11 years ago
// Bars with Ratchicons
11 years ago
// --------------------------------------------------
11 years ago
.bar {
.icon {
position: relative;
z-index: 20; // Position the buttons on top of .title
11 years ago
padding-top: 10px;
padding-bottom: 10px;
11 years ago
font-size: 24px;
}
11 years ago
11 years ago
// Vertical center the larger icons in btns.
.btn .icon {
11 years ago
top: 3px;
padding: 0;
11 years ago
}
11 years ago
// Handle carets in the titles
.title .icon {
padding: 0;
11 years ago
// Specific postioning of the caret icon within a title. Used with popover.js.
&.icon-caret {
top: 4px;
margin-left: -5px;
}
11 years ago
}
}
// Bars for search forms
// --------------------------------------------------
// Position/size search bar within the bar
.bar input[type="search"] {
height: 29px;
margin: 6px 0;
}
// Bars with segmented controls
// --------------------------------------------------
11 years ago
// Position the control correctly inside a bar.
.bar .segmented-control {
top: 7px;
margin: 0 auto;
}