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.

85 lines
1.9 KiB

//
// Segmented controllers
// --------------------------------------------------
12 years ago
.segmented-controller {
display: -webkit-box;
display: box;
padding: 0;
11 years ago
margin: 0 0 10px 0;
12 years ago
overflow: hidden;
font-size: 12px;
font-weight: $font-weight-light;
12 years ago
list-style: none;
background-color: transparent;
border: 1px solid $primary-color;
border-radius: 4px;
11 years ago
@include box-orient(horizontal);
12 years ago
// Section within controller
li {
overflow: hidden;
text-align: center;
white-space: nowrap;
border-left: 1px solid $primary-color;
11 years ago
@include box-flex(1);
// Link that fills each section
> a {
display: block;
11 years ago
padding: 6px 16px 7px;
overflow: hidden;
line-height: 1;
color: $primary-color;
text-overflow: ellipsis;
}
12 years ago
// Remove border-left and shadow from first section
&:first-child {
border-left-width: 0;
}
12 years ago
// Active state of segmented controller
&:active {
background-color: rgba(213,233,255,1);
}
// Selected segment of controller
&.selected {
background-color: $primary-color;
11 years ago
@include transition(background-color .2s linear);
12 years ago
// Set color of links to white
> a {
color: #fff;
}
}
}
}
12 years ago
.segmented-controller-item {
display: none;
&.selected {
display: block;
}
}
// Segmented controller in all bars
// --------------------------------------------------
// Remove standard segmented bottom margin
[class*="bar-"] .segmented-controller {
11 years ago
margin: 3px 0;
11 years ago
@include box-flex(1);
}
.bar-nav .segmented-controller {
11 years ago
margin-bottom: 4px;
}
// Add margins between segmented controllers and buttons
[class*="bar-"] .segmented-controller + [class*="button"],
[class*="bar-"] [class*="button"] + .segmented-controller {
margin-left: $bar-side-spacing; // Equal to the right and left padding on buttons & icons
12 years ago
}