chinwagsocial/app/assets/stylesheets/forms.scss

272 lines
4.1 KiB
SCSS
Raw Normal View History

2016-10-23 21:05:55 +11:00
code {
font-family: 'Roboto Mono', monospace;
font-weight: 400;
}
2016-10-19 01:37:15 +11:00
.form-container {
max-width: 400px;
padding: 20px;
margin: 0 auto;
}
.simple_form {
.input {
margin-bottom: 15px;
}
2017-03-26 22:22:38 +11:00
span.hint {
display: block;
color: $color3;
font-size: 12px;
margin-top: 4px;
}
2017-03-26 22:22:38 +11:00
p.hint {
margin-bottom: 15px;
}
strong {
font-weight: 500;
}
.label_input {
display: flex;
label {
flex: 0 0 auto;
width: 100px;
}
input {
flex: 1 1 auto;
}
}
.input.file, .input.select, .input.radio_buttons {
2016-10-19 01:37:15 +11:00
padding: 15px 0;
margin-bottom: 0;
label {
font-family: inherit;
2016-10-19 01:37:15 +11:00
font-size: 16px;
color: $color5;
2016-11-17 03:51:02 +11:00
display: block;
padding-top: 5px;
2016-10-19 01:37:15 +11:00
}
}
.fields-group {
margin-bottom: 25px;
}
.input.radio_buttons .radio label {
margin-bottom: 5px;
font-family: inherit;
font-size: 14px;
color: white;
display: block;
width: auto;
}
2016-10-19 01:37:15 +11:00
.input.boolean {
margin-bottom: 5px;
label {
font-family: inherit;
2016-10-19 01:37:15 +11:00
font-size: 14px;
color: white;
2016-11-17 03:51:02 +11:00
display: block;
width: auto;
2016-10-19 01:37:15 +11:00
}
2016-11-26 00:01:14 +11:00
label.checkbox {
position: relative;
padding-left: 25px;
flex: 1 1 auto;
}
2016-10-19 01:37:15 +11:00
input[type=checkbox] {
position: absolute;
left: 0;
2016-11-26 00:01:14 +11:00
top: 1px;
margin: 0;
2016-10-19 01:37:15 +11:00
}
.hint {
padding-left: 25px;
margin-left: 0;
}
2016-10-19 01:37:15 +11:00
}
input[type=text], input[type=number], input[type=email], input[type=password], textarea {
2016-10-19 01:37:15 +11:00
background: transparent;
box-sizing: border-box;
2016-10-19 01:37:15 +11:00
border: 0;
border-bottom: 2px solid $color3;
border-radius: 2px 2px 0 0;
padding: 7px 4px;
2016-10-19 01:37:15 +11:00
font-size: 16px;
color: $color5;
2016-10-19 01:37:15 +11:00
display: block;
width: 100%;
outline: 0;
font-family: inherit;
resize: vertical;
2016-10-19 01:37:15 +11:00
&:invalid {
box-shadow: none;
}
&:focus:invalid {
border-bottom-color: $color6;
2016-10-19 01:37:15 +11:00
}
&:required:valid {
border-bottom-color: $color7;
2016-10-19 01:37:15 +11:00
}
&:active, &:focus {
border-bottom-color: $color4;
background: rgba($color8, 0.1);
2016-10-19 01:37:15 +11:00
}
}
.input.field_with_errors {
label {
color: $color6;
}
2016-10-19 01:37:15 +11:00
input[type=text], input[type=email], input[type=password] {
border-bottom-color: $color6;
2016-10-19 01:37:15 +11:00
}
.error {
display: block;
2016-10-19 01:37:15 +11:00
font-weight: 500;
color: $color6;
margin-top: 4px;
2016-10-19 01:37:15 +11:00
}
}
.actions {
margin-top: 30px;
}
2016-10-19 01:37:15 +11:00
button, .block-button {
display: block;
width: 100%;
border: 0;
border-radius: 4px;
background: $color4;
color: $color5;
font-size: 18px;
padding: 10px;
text-transform: uppercase;
text-decoration: none;
text-align: center;
box-sizing: border-box;
cursor: pointer;
font-weight: 500;
outline: 0;
margin-bottom: 10px;
2016-10-19 01:37:15 +11:00
&:hover {
background-color: lighten($color4, 5%);
}
2016-10-19 01:37:15 +11:00
&:active, &:focus {
position: relative;
top: 1px;
background-color: darken($color4, 5%);
}
2016-10-19 01:37:15 +11:00
&.negative {
background: $color6;
2016-10-19 01:37:15 +11:00
&:hover {
background-color: lighten($color6, 5%);
}
2016-10-19 01:37:15 +11:00
&:active, &:focus {
background-color: darken($color6, 5%);
2016-10-19 01:37:15 +11:00
}
}
}
select {
font-size: 16px;
}
2016-10-19 01:37:15 +11:00
}
.flash-message {
background: $color1;
color: $color3;
2016-10-19 01:37:15 +11:00
border-radius: 4px;
padding: 15px 10px;
margin-bottom: 30px;
box-shadow: 0 0 5px rgba($color8, 0.2);
2016-10-19 01:37:15 +11:00
text-align: center;
strong {
font-weight: 500;
}
}
.form-footer {
margin-top: 30px;
text-align: center;
a {
color: $color5;
2016-10-19 01:37:15 +11:00
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
}
.oauth-prompt, .follow-prompt {
margin-bottom: 30px;
text-align: center;
color: $color3;
h2 {
font-size: 16px;
margin-bottom: 30px;
}
strong {
color: $color2;
font-weight: 500;
}
}
.qr-wrapper {
display: flex;
}
.qr-code {
flex: 0 0 auto;
background: #fff;
padding: 4px;
margin-bottom: 20px;
box-shadow: 0 0 15px rgba($color8, 0.2);
display: inline-block;
svg {
display: block;
margin: 0;
}
}
.qr-alternative {
margin-left: 10px;
color: $color3;
samp {
display: block;
font-size: 14px;
}
}