ensl.org/app/assets/stylesheets/components/_forms.scss

131 lines
2.2 KiB
SCSS
Raw Normal View History

2014-04-06 14:14:03 +00:00
/*
Forms
*/
form {
.fields {
> .field_with_errors:first-child,
> label {
padding: 11px 0;
line-height: 16px;
}
2014-04-06 14:14:03 +00:00
> .field_with_errors {
2014-04-06 14:14:03 +00:00
input,
textarea {
border: $input-border-width solid $flash-error;
2014-04-06 14:14:03 +00:00
&:hover,
&:focus {
border-color: $flash-error;
}
2014-04-06 14:14:03 +00:00
&:focus {
color: $input-text;
}
}
}
2014-04-06 14:14:03 +00:00
input,
textarea {
background-color: $input-primary;
color: $input-text;
font-size: em(16);
padding: $input-padding;
height: em(40);
border: $input-border-colour solid $input-border-width;
&:hover {
border: $input-border-width solid lighten($input-secondary, 20%);
}
&:focus {
border: $input-border-width solid $input-secondary;
color: $input-secondary;
outline: none;
background: transparent;
}
}
textarea {
height: auto;
width: 100%;
}
2014-04-06 14:14:03 +00:00
}
.controls {
margin-bottom: em(20);
button,
input {
@include button($button-secondary);
margin-bottom: 0;
outline: none;
}
}
}
2014-04-06 14:14:03 +00:00
form.dark {
.fields {
2014-04-06 14:14:03 +00:00
input {
color: white;
background: $input-dark-background-colour;
border: $input-dark-border-colour solid $input-dark-border-width;
2014-04-06 14:14:03 +00:00
&:hover {
border: $input-dark-border-width solid $input-dark-border-hover-colour;
2014-04-06 14:14:03 +00:00
}
&:focus {
border: $input-dark-border-width solid $input-dark-border-focus-colour;
}
&:-webkit-autofill {
-webkit-text-fill-color: white !important;
-webkit-box-shadow: 0 0 0px 1000px $input-dark-background-colour inset;
2014-04-06 14:14:03 +00:00
}
}
}
.controls {
margin-bottom: 20px;
2014-04-06 14:14:03 +00:00
button,
input {
background-color: $purple;
2014-04-06 14:14:03 +00:00
}
}
}
2014-04-06 14:14:03 +00:00
form.square {
@include span-columns(12);
&.small {
@include span-columns(6);
}
&.medium {
2014-04-06 14:14:03 +00:00
@include span-columns(9);
}
2014-04-06 14:14:03 +00:00
&.large {
@include span-columns(12);
}
2014-04-06 14:14:03 +00:00
> .field_with_errors:first-child,
> label {
@include span-columns(3);
}
input {
@include span-columns(9);
}
.controls {
@include span-columns(9);
@include shift(3);
2014-04-06 14:14:03 +00:00
}
}