mirror of
https://github.com/pebble-dev/clay.git
synced 2026-09-01 22:57:41 -04:00
add radio component
This commit is contained in:
@@ -50,11 +50,10 @@ h6 {
|
||||
@include font-size(0.8);
|
||||
}
|
||||
|
||||
.component {
|
||||
label {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: $item-spacing-v;
|
||||
|
||||
.input {
|
||||
white-space: nowrap;
|
||||
@@ -84,6 +83,10 @@ h6 {
|
||||
}
|
||||
}
|
||||
|
||||
.component {
|
||||
padding-bottom: $item-spacing-v;
|
||||
@include tap-highlight();
|
||||
}
|
||||
|
||||
.section {
|
||||
background: $color-gray-4;
|
||||
@@ -126,14 +129,6 @@ h6 {
|
||||
|
||||
}
|
||||
|
||||
label.component{
|
||||
-webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
|
||||
|
||||
&:active {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
strong {
|
||||
@include font-pfdin(medium);
|
||||
color: $color-orange;
|
||||
|
||||
@@ -33,3 +33,11 @@
|
||||
font-size:$font-size;
|
||||
line-height: $base-line-height * ceil($font-size / $base-line-height);
|
||||
}
|
||||
|
||||
@mixin tap-highlight($color: rgba(255, 255, 255, 0.1)) {
|
||||
-webkit-tap-highlight-color: $color;
|
||||
|
||||
&:active {
|
||||
background-color: $color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
@import "bourbon";
|
||||
@import "clay";
|
||||
|
||||
.component-radio {
|
||||
|
||||
@include tap-highlight(rgba(0,0,0,0));
|
||||
display: block;
|
||||
|
||||
|
||||
> .label {
|
||||
display: block;
|
||||
padding-bottom: $item-spacing-v / 2;
|
||||
}
|
||||
|
||||
.radio-group {
|
||||
|
||||
label {
|
||||
padding: $item-spacing-v / 2 0;
|
||||
@include tap-highlight();
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 0.9em;
|
||||
padding: 0 $item-spacing-h / 2;
|
||||
}
|
||||
|
||||
input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
i {
|
||||
display: block;
|
||||
position: relative;
|
||||
border-radius: $base-height;
|
||||
width: $base-height;
|
||||
height: $base-height;
|
||||
border: 2px solid $color-gray-7;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
input:checked ~ i {
|
||||
border-color: $color-orange;
|
||||
|
||||
&:after {
|
||||
$padding: 15%;
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: $padding;
|
||||
right: $padding;
|
||||
top: $padding;
|
||||
bottom: $padding;
|
||||
border-radius: $base-height;
|
||||
background: $color-orange;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user