mirror of https://github.com/twbs/ratchet.git
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.
131 lines
2.2 KiB
131 lines
2.2 KiB
11 years ago
|
//
|
||
|
// Segmented controllers
|
||
|
// --------------------------------------------------
|
||
12 years ago
|
|
||
11 years ago
|
.segmented-control {
|
||
11 years ago
|
position: relative;
|
||
11 years ago
|
display: table;
|
||
11 years ago
|
padding: 0;
|
||
12 years ago
|
overflow: hidden;
|
||
|
font-size: 12px;
|
||
11 years ago
|
font-weight: $font-weight-light;
|
||
12 years ago
|
list-style: none;
|
||
11 years ago
|
background-color: $chrome-color;
|
||
11 years ago
|
border: 1px solid #ccc;
|
||
12 years ago
|
border-radius: 4px;
|
||
12 years ago
|
|
||
11 years ago
|
// Section within controller
|
||
|
li {
|
||
11 years ago
|
display: table-cell;
|
||
11 years ago
|
overflow: hidden;
|
||
11 years ago
|
width: 1%;
|
||
11 years ago
|
text-align: center;
|
||
|
white-space: nowrap;
|
||
11 years ago
|
border-left: 1px solid #ccc;
|
||
11 years ago
|
|
||
|
// Link that fills each section
|
||
|
> a {
|
||
|
display: block;
|
||
11 years ago
|
padding-top: 6px;
|
||
|
padding-bottom: 7px;
|
||
11 years ago
|
overflow: hidden;
|
||
11 years ago
|
line-height: 1;
|
||
11 years ago
|
color: #333;
|
||
11 years ago
|
text-overflow: ellipsis;
|
||
|
}
|
||
12 years ago
|
|
||
11 years ago
|
// Remove border-left and shadow from first section
|
||
|
&:first-child {
|
||
|
border-left-width: 0;
|
||
|
}
|
||
12 years ago
|
|
||
11 years ago
|
// Active states of segmented controller
|
||
11 years ago
|
&:active {
|
||
11 years ago
|
background-color: #eee;
|
||
11 years ago
|
}
|
||
11 years ago
|
&.active {
|
||
11 years ago
|
background-color: #ccc;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// Other segmented controller types
|
||
|
// --------------------------------------------------
|
||
|
|
||
|
// Primary
|
||
11 years ago
|
.segmented-control-primary {
|
||
11 years ago
|
border: 1px solid $primary-color;
|
||
|
|
||
|
li {
|
||
|
border-color: inherit;
|
||
|
|
||
|
> a {
|
||
|
color: $primary-color;
|
||
|
}
|
||
|
&:active {
|
||
|
background-color: lighten($primary-color, 35%);
|
||
|
}
|
||
11 years ago
|
&.active {
|
||
11 years ago
|
background-color: $primary-color;
|
||
11 years ago
|
|
||
|
> a {
|
||
|
color: #fff;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
12 years ago
|
|
||
11 years ago
|
// Positive
|
||
11 years ago
|
.segmented-control-positive {
|
||
11 years ago
|
border: 1px solid $positive-color;
|
||
|
|
||
|
li {
|
||
|
border-color: inherit;
|
||
|
|
||
|
> a {
|
||
|
color: $positive-color;
|
||
|
}
|
||
|
&:active {
|
||
|
background-color: lighten($positive-color, 35%);
|
||
|
}
|
||
11 years ago
|
&.active {
|
||
11 years ago
|
background-color: $positive-color;
|
||
|
|
||
|
> a {
|
||
|
color: #fff;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// Negative
|
||
11 years ago
|
.segmented-control-negative {
|
||
11 years ago
|
border: 1px solid $negative-color;
|
||
|
|
||
|
li {
|
||
|
border-color: inherit;
|
||
|
|
||
|
> a {
|
||
|
color: $negative-color;
|
||
|
}
|
||
|
&:active {
|
||
|
background-color: lighten($negative-color, 35%);
|
||
|
}
|
||
11 years ago
|
&.active {
|
||
11 years ago
|
background-color: $negative-color;
|
||
|
|
||
11 years ago
|
> a {
|
||
|
color: #fff;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
11 years ago
|
}
|
||
12 years ago
|
|
||
11 years ago
|
.segmented-control-item {
|
||
11 years ago
|
display: none;
|
||
|
|
||
11 years ago
|
&.active {
|
||
11 years ago
|
display: block;
|
||
11 years ago
|
}
|
||
11 years ago
|
}
|