Created
September 22, 2021 08:08
-
-
Save Tropicalista/4e9a4c4363aeb726c6c4cc5b217cb505 to your computer and use it in GitHub Desktop.
Formello SCSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@use 'button'; | |
@use 'spinner'; | |
@use 'frontend/css/tooltip'; | |
html { | |
scroll-behavior: smooth; | |
} | |
.wp-block-formello-form { | |
fieldset { | |
padding: 1em; | |
margin-bottom: 1em; | |
border: 1px solid; | |
} | |
fieldset.no-border { | |
border: none; | |
} | |
legend { | |
margin: .5em 0; | |
font-weight: bold; | |
} | |
output { | |
margin: 0 0 0 1rem; | |
border: 1px solid #d7dbdd; | |
font-size: 1rem; | |
padding: .4em .4em; | |
border-radius: 3px; | |
min-width: 2.4rem; | |
min-height: 2.6rem; | |
} | |
} | |
.wp-block-formello-form .formello, .wp-block-formello-form .formello-group { | |
display: flex; | |
flex-direction: column; | |
align-items: inherit; | |
flex-wrap: wrap; | |
margin-bottom: 2em; | |
.hide { | |
display: none; | |
} | |
.error { | |
border-color: red; | |
} | |
label { | |
padding: 0 10px 0 0; | |
margin: 0 0 5px 0; | |
flex: 0 1 auto; | |
&.align-top { | |
align-self: flex-start; | |
} | |
&.align-bottom { | |
align-self: flex-end; | |
} | |
} | |
input { | |
flex: 1 1 auto; | |
margin: 0 !important; | |
} | |
textarea, select { | |
flex: 1 1 auto; | |
width: auto; | |
margin: 0 !important; | |
} | |
small { | |
width: 100%; | |
} | |
.required { | |
color: red; | |
margin: 0 5px; | |
} | |
.error-message { | |
color: red; | |
order: 3; | |
width: 100%; | |
} | |
&.hide { | |
display: none; | |
} | |
/********** checkbox ********/ | |
&.formello-checkbox { | |
flex-direction: row; | |
align-items: center; | |
label { | |
order: 2; | |
font-weight: normal !important; | |
margin: 0 8px; | |
flex: 0 1 auto; | |
} | |
input { | |
order: 1; | |
flex: 0 1 auto; | |
} | |
small { | |
order: 3; | |
width: auto; | |
margin: 0; | |
} | |
.error-message { | |
margin: 0; | |
} | |
} | |
} | |
.wp-block-formello-form.is-bold { | |
.formello label { | |
font-weight: bold; | |
} | |
.formello-group label { | |
font-weight: bold; | |
} | |
} | |
.wp-block-formello-form.label-left { | |
.formello label { | |
text-align: left; | |
} | |
} | |
.wp-block-formello-form.label-right { | |
.formello label { | |
text-align: right; | |
} | |
} | |
.wp-block-formello-form .formello-group { | |
display: flex; | |
flex-direction: row; | |
flex-wrap: wrap; | |
margin-bottom: 1em; | |
align-items: center; | |
max-width: 100%; | |
label { | |
flex-basis: 100%; | |
} | |
small { | |
width: 100%; | |
} | |
input { | |
display: flex; | |
flex: 1; | |
min-width: 120px; | |
//align-items: flex-start; | |
} | |
.wp-block-formello-button { | |
//flex: 0 1 auto; | |
//padding-left: 0 !important; | |
margin-bottom: 0; | |
//padding-left: 0; | |
//flex-direction: row; | |
margin-left: 10px; | |
} | |
&.wp-block-formello-button button { | |
margin: 0; | |
} | |
} | |
@media screen and (min-width: 600px) { | |
.as-row .formello { | |
display: flex; | |
flex-direction: row; | |
align-items: center; | |
label { | |
flex: 0 1 180px; | |
} | |
small { | |
margin-left: 180px; | |
} | |
&.formello-checkbox { | |
margin-left: 180px; | |
} | |
.error-message { | |
margin-left: 180px; | |
} | |
.wp-block-formello-button { | |
margin-left: 180px; | |
} | |
} | |
.as-row .formello-group { | |
display: flex; | |
flex-direction: row; | |
align-items: center; | |
label { | |
flex: 0 1 180px; | |
} | |
small { | |
margin-left: 180px; | |
} | |
.wp-block-formello-button { | |
margin-left: auto; | |
} | |
&.formello-checkbox { | |
margin-left: 180px; | |
} | |
.error-message { | |
margin-left: 180px; | |
} | |
} | |
} | |
.formello-group.grouped { | |
input { | |
border-right: 0px; | |
} | |
} | |
.formello-group.grouped .wp-block-formello-button { | |
margin-left: 0; | |
} | |
.formello-message { | |
padding: .75rem 1.25rem; | |
margin: 1rem 0; | |
border: 1px solid transparent; | |
&.success { | |
background-color: #dff0d8; | |
border-color: #d0e9c6; | |
color: #3c763d; | |
} | |
&.error { | |
background-color: #fcf8e3; | |
border-color: #faf2cc; | |
color: #8a6d3b; | |
} | |
} | |
.g-recaptcha { | |
margin: 1em 0; | |
} | |
.formello-hp { | |
position: absolute !important; | |
left: -5000px; | |
} | |
[hidden] { | |
display: none !important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment