SiteWebAstrolabe/src/scss/components/_form.scss
Yves Gatesoupe f61a6057ee fix margin
2021-11-26 11:48:56 +01:00

165 lines
2.5 KiB
SCSS

.home .form-container {
svg > path:first-child {
fill: #f1f0f6;
}
}
.form-container {
// margin-top: 8rem;
padding: 0 0 6rem;
background-color: var(--color-primary);
color: var(--color-dark);
.contact-heading {
margin: 2rem 0 4rem;
}
}
.field-list {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: auto;
grid-column-gap: 1.5rem;
grid-row-gap: 1.5rem;
.full-width {
grid-column: span 2;
}
}
form br {
display: none;
}
label {
display: block;
font-weight: 600;
}
input,
textarea,
select {
@include apply-utility('font', 'base');
background-color: var(--color-primary-glare);
font: inherit;
border: 0;
margin-top: 1rem;
line-height: 1.5rem;
padding: .75rem 1.5rem;
border-radius: 1.5rem;
width: 100%;
&:focus {
outline: none;
box-shadow: var(--color-dark) 0 0 1.5px 1px;
}
}
textarea {
resize: none;
}
select {
background-image: url("data:image/svg+xml,%3Csvg width='32' height='48' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M23 32l-7.794-12h15.588L23 32z' fill='%23333'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 1.5rem top 50%;
background-size: 2rem 3rem;
-moz-appearance: none;
-webkit-appearance: none;
appearance: none;
}
label input {
margin: -.25rem 1rem 0 0;
width: auto;
vertical-align: middle;
}
fieldset {
border: 0;
margin: 0;
padding: 0;
}
legend {
display: block;
font-weight: bold;
}
.btn[type=submit] {
margin-top: 3.5rem;
padding-left: 3rem;
padding-right: 3rem;
justify-self: start;
}
.field-list {
margin: 0;
padding: 0;
list-style: none;
}
.field-list__field-group {
transition: transform 150ms;
&__description {
display: block;
margin-top: .3rem;
font-size: .875rem;
line-height: 1.25;
}
textarea + &__description {
margin-top: 0;
}
&--confirm {
font-weight: normal;
}
&__list {
list-style: none;
margin: 0;
.field-list__field-group__description {
margin: 0 0 0 1.35rem;
}
}
}
.ohnohoney {
opacity: 0;
position: absolute;
top: 0;
left: 0;
height: 0;
width: 0;
z-index: -1;
}
@media (max-width: 575.98px) {
.form-container {
svg {
width: 70rem;
overflow: hidden;
}
.contact-heading {
margin: 2rem 0;
}
}
.field-list {
display: block;
}
.field-list__field-group {
margin-top: 1.5rem;
}
.btn[type=submit] {
width: 100%;
}
}