[type='checkbox'] + label,
[type='radio'] + label {
display: inline-block;
+ vertical-align: baseline;
+
margin-#{$global-left}: $form-spacing * 0.5;
margin-#{$global-right}: $form-spacing;
margin-bottom: 0;
- vertical-align: baseline;
&[for] {
cursor: pointer;
$background-alpha: 0.1
) {
&:not(:focus) {
- background-color: rgba($background, $background-alpha);
border-color: $background;
+ background-color: rgba($background, $background-alpha);
}
}
display: none;
margin-top: $form-spacing * -0.5;
margin-bottom: $form-spacing;
+
font-size: $input-error-font-size;
font-weight: $input-error-font-weight;
color: $input-error-color;
$legend-padding: rem-calc(0 3) !default;
@mixin fieldset {
- border: $fieldset-border;
- padding: $fieldset-padding;
margin: $fieldset-margin;
+ padding: $fieldset-padding;
+ border: $fieldset-border;
legend {
// Covers up the fieldset's border to create artificial padding
- background: $body-background;
- padding: $legend-padding;
margin: 0;
margin-#{$global-left}: rem-calc(-3);
+ padding: $legend-padding;
+ background: $body-background;
}
}
@mixin foundation-form-fieldset {
fieldset {
- border: 0;
- padding: 0;
margin: 0;
+ padding: 0;
+ border: 0;
}
legend {
- margin-bottom: $form-spacing * 0.5;
max-width: 100%;
+ margin-bottom: $form-spacing * 0.5;
}
.fieldset {
.input-group-label {
@extend %input-group-child;
- text-align: center;
padding: 0 $input-prefix-padding;
+ border: $input-prefix-border;
background: $input-prefix-background;
+
color: $input-prefix-color;
- border: $input-prefix-border;
+ text-align: center;
white-space: nowrap;
@if $global-flexbox {
- flex: 0 0 auto;
display: flex;
+ flex: 0 0 auto;
align-items: center;
}
@else {
flex: 0 0 auto;
}
@else {
- height: 100%;
width: 1%;
+ height: 100%;
}
a,
button,
label {
@extend %input-group-child;
- font-size: $input-font-size;
height: $height;
padding-top: 0;
padding-bottom: 0;
+
+ font-size: $input-font-size;
}
}
@mixin form-label {
display: block;
margin: 0;
+
font-size: $form-label-font-size;
font-weight: $form-label-font-weight;
line-height: $form-label-line-height;
@mixin form-label-middle {
$input-border-width: get-border-value($input-border, width);
+
margin: 0 0 $form-spacing;
padding: ($form-spacing / 2 + rem-calc($input-border-width)) 0;
}
@mixin foundation-meter-element {
meter {
- -webkit-appearance: none;
- -moz-appearance: none;
display: block;
width: 100%;
height: $meter-height;
margin-bottom: 1rem;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+
@if has-value($meter-radius) {
border-radius: $meter-radius;
}
// For Firefox
- background: $meter-background;
border: 0;
+ background: $meter-background;
// Chrome/Safari/Edge
&::-webkit-meter-bar {
- background: $meter-background;
-
+ border: 0;
@if has-value($meter-radius) {
border-radius: $meter-radius;
}
-
- border: 0;
+
+ background: $meter-background;
}
&::-webkit-meter-inner-element {
@mixin foundation-progress-element {
progress {
- -webkit-appearance: none;
- -moz-appearance: none;
display: block;
width: 100%;
height: $progress-height;
margin-bottom: $progress-margin-bottom;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+
@if hasvalue($progress-radius) {
border-radius: $progress-radius;
}
// For Firefox
- background: $progress-background;
border: 0;
+ background: $progress-background;
&::-webkit-progress-bar {
background: $progress-background;
input[type="range"] {
$margin: ($slider-handle-height - $slider-height) / 2;
- -webkit-appearance: none;
- -moz-appearance: none;
display: block;
width: 100%;
height: auto;
- cursor: pointer;
margin-top: $margin;
margin-bottom: $margin;
+
+ -webkit-appearance: none;
+ -moz-appearance: none;
+
border: 0;
line-height: 1;
+ cursor: pointer;
@if has-value($slider-radius) {
border-radius: $slider-radius;
}
&::-webkit-slider-handle {
- -webkit-appearance: none;
- background: $slider-handle-background;
width: $slider-handle-width;
height: $slider-handle-height;
margin-top: -$margin;
+ -webkit-appearance: none;
+ background: $slider-handle-background;
+
@if has-value($slider-radius) {
border-radius: $slider-radius;
}
// Firefox
&::-moz-range-track {
- -moz-appearance: none;
height: $slider-height;
+ -moz-appearance: none;
background: $slider-background;
}
&::-moz-range-thumb {
- -moz-appearance: none;
- background: $slider-handle-background;
width: $slider-handle-width;
height: $slider-handle-height;
margin-top: -$margin;
+ -moz-appearance: none;
+ background: $slider-handle-background;
+
@if has-value($slider-radius) {
border-radius: $slider-radius;
}
// Internet Explorer
&::-ms-track {
height: $slider-height;
- background: $slider-background;
- color: transparent;
+
border: 0;
- overflow: visible;
border-top: $margin solid $body-background;
border-bottom: $margin solid $body-background;
+ background: $slider-background;
+
+ overflow: visible;
+ color: transparent;
}
&::-ms-thumb {
- background: $slider-handle-background;
width: $slider-handle-width;
height: $slider-handle-height;
border: 0;
+ background: $slider-handle-background;
@if has-value($slider-radius) {
border-radius: $slider-radius;
@at-root {
output {
- line-height: $slider-handle-height;
vertical-align: middle;
margin-left: 0.5em;
+ line-height: $slider-handle-height;
}
}
}
$height: ($input-font-size + ($form-spacing * 1.5) - rem-calc(1));
height: $height;
+ margin: 0 0 $form-spacing;
padding: ($form-spacing / 2);
+
+ -webkit-appearance: none;
+ -moz-appearance: none;
border: $input-border;
- margin: 0 0 $form-spacing;
- font-size: $input-font-size;
+ border-radius: $select-radius;
+ background-color: $select-background;
+
font-family: $input-font-family;
+ font-size: $input-font-size;
line-height: normal;
color: $input-color;
- background-color: $select-background;
- border-radius: $select-radius;
- -webkit-appearance: none;
- -moz-appearance: none;
@if $select-triangle-color != transparent {
@include background-triangle($select-triangle-color);
- background-size: 9px 6px;
- background-position: $global-right (-$form-spacing) center;
background-origin: content-box;
+ background-position: $global-right (-$form-spacing) center;
background-repeat: no-repeat;
+ background-size: 9px 6px;
+
padding-#{$global-right}: ($form-spacing * 1.5);
}
// Focus state
&:focus {
+ outline: none;
border: $input-border-focus;
background-color: $input-background-focus;
- outline: none;
box-shadow: $input-shadow-focus;
@if has-value($input-transition) {
box-sizing: border-box;
width: 100%;
height: $height;
+ margin: 0 0 $form-spacing;
padding: $form-spacing / 2;
+
border: $input-border;
- margin: 0 0 $form-spacing;
+ border-radius: $input-radius;
+ background-color: $input-background;
+ box-shadow: $input-shadow;
font-family: $input-font-family;
font-size: $input-font-size;
font-weight: $input-font-weight;
color: $input-color;
- background-color: $input-background;
- box-shadow: $input-shadow;
- border-radius: $input-radius;
@if has-value($input-transition) {
transition: $input-transition;
// Focus state
&:focus {
+ outline: none;
border: $input-border-focus;
background-color: $input-background-focus;
- outline: none;
box-shadow: $input-shadow-focus;
@if has-value($input-transition) {
// Reset styles on button-like inputs
[type='submit'],
[type='button'] {
- border-radius: $form-button-radius;
-webkit-appearance: none;
-moz-appearance: none;
+ border-radius: $form-button-radius;
}
// Reset Normalize setting content-box to search elements