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.

111 lines
2.1 KiB

//
// Segmented controllers
// --------------------------------------------------
12 years ago
.segmented-control {
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
.control-item {
display: table-cell;
overflow: hidden;
width: 1%;
padding-top: 6px;
padding-bottom: 7px;
line-height: 1;
color: #333;
text-align: center;
white-space: nowrap;
text-overflow: ellipsis;
border-left: 1px solid #ccc;
12 years ago
// Remove border-left and shadow from first section
&:first-child {
border-left-width: 0;
}
12 years ago
// Active states of segmented controller
&:active {
background-color: #eee;
}
&.active {
background-color: #ccc;
}
}
}
// Other segmented controller types
// --------------------------------------------------
// Primary
.segmented-control-primary {
border: 1px solid $primary-color;
.control-item {
color: $primary-color;
11 years ago
border-color: inherit;
&:active {
background-color: lighten($primary-color, 35%);
}
&.active {
11 years ago
color: #fff;
background-color: $primary-color;
}
}
}
12 years ago
// Positive
.segmented-control-positive {
border: 1px solid $positive-color;
.control-item {
color: $positive-color;
11 years ago
border-color: inherit;
&:active {
background-color: lighten($positive-color, 35%);
}
&.active {
11 years ago
color: #fff;
background-color: $positive-color;
}
}
}
// Negative
.segmented-control-negative {
border: 1px solid $negative-color;
.control-item {
color: $negative-color;
11 years ago
border-color: inherit;
&:active {
background-color: lighten($negative-color, 35%);
}
&.active {
11 years ago
color: #fff;
background-color: $negative-color;
}
}
}
12 years ago
11 years ago
// This is used to by the js to show and hide content tide to the segmented control.
.control-content {
display: none;
&.active {
display: block;
}
}