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.

143 lines
2.5 KiB

//
// Segmented controllers
// --------------------------------------------------
12 years ago
.segmented-controller {
position: relative;
display: table;
padding: 0;
12 years ago
overflow: hidden;
font-size: 12px;
font-weight: $font-weight-light;
12 years ago
list-style: none;
background-color: $chrome-color;
border: 1px solid #ccc;
border-radius: 4px;
12 years ago
// Section within controller
li {
display: table-cell;
overflow: hidden;
width: 1%;
text-align: center;
white-space: nowrap;
border-left: 1px solid #ccc;
// Link that fills each section
> a {
display: block;
padding-top: 6px;
padding-bottom: 7px;
overflow: hidden;
line-height: 1;
color: #333;
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: #eee;
}
// Selected segment of controller
&.selected {
background-color: #ccc;
}
}
}
// Other segmented controller types
// --------------------------------------------------
// Primary
.segmented-controller-primary {
border: 1px solid $primary-color;
li {
border-color: inherit;
> a {
color: $primary-color;
}
&:active {
background-color: lighten($primary-color, 35%);
}
&.selected {
background-color: $primary-color;
> a {
color: #fff;
}
}
}
}
12 years ago
// Positive
.segmented-controller-positive {
border: 1px solid $positive-color;
li {
border-color: inherit;
> a {
color: $positive-color;
}
&:active {
background-color: lighten($positive-color, 35%);
}
&.selected {
background-color: $positive-color;
> a {
color: #fff;
}
}
}
}
// Negative
.segmented-controller-negative {
border: 1px solid $negative-color;
li {
border-color: inherit;
> a {
color: $negative-color;
}
&:active {
background-color: lighten($negative-color, 35%);
}
&.selected {
background-color: $negative-color;
> 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 {
top: 8px;
margin: 0 auto;
11 years ago
}