From 715f0a61cc17a3d66ec86fb4826a276075f2f216 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Tue, 5 Nov 2024 13:17:14 +0100 Subject: [PATCH] impoorting the form classes from homegrade theme --- resources/css/components/forms.css | 159 +++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 resources/css/components/forms.css diff --git a/resources/css/components/forms.css b/resources/css/components/forms.css new file mode 100644 index 0000000..fc24440 --- /dev/null +++ b/resources/css/components/forms.css @@ -0,0 +1,159 @@ +form:not(.metabox-location-side):not( + .metabox-location-normal + ):not( + .metabox-location-advanced, + .search-module__search-form + ) { + select, + textarea, + input:not([type='submit']):not( + .gform_next_button, + .gform_previous_button, + .search-module__search-form__input + ) { + @apply !border-neutral-400 !text-lg !font-semibold !border; + line-height: 1 !important; + + &:focus-visible { + outline: solid 1px; + outline-offset: 3px !important; + @apply outline-primary; + } + } + + input[type='text'] { + @apply !py-6; + text-indent: 6px !important; + } + + input:not( + [type='checkbox'], + [type='submit'], + [type='file'], + [type='radio'], + .gform-theme-button, + .search-module__search-form__input + ) { + @apply !rounded-lg py-6; + } + select { + @apply !rounded-lg !h-12 !pt-3 !text-base; + text-indent: 6px !important; + } + + input[type='submit'] { + @apply !px-8 !py-3 !border-none !rounded-full !font-bold !text-lg; + &:hover, + &:focus-visible { + @apply !bg-primary; + /* filter: brightness(0.4); */ + } + } + input[type='file'] { + @apply !rounded-lg; + } + label:not(.gform-field-label--type-sub):not( + .gform-field-label--type-inline + ) { + @apply !font-bold !text-neutral-900 !text-lg; + } + legend { + @apply font-bold !text-neutral-900; + } + label { + @apply !text-neutral-700 !text-base !font-medium; + } +} +legend { + @apply !text-lg; +} +legend.gfield_label + .gfield_description { + @apply !pb-4; +} + +.gform_wrapper { + .gform_title { + @apply hidden; + } + .gfield_required_asterisk { + @apply !text-3xl !inline-block; + line-height: 0.5; + transform: translateY(3px) !important; + margin-top: -10px !important; + } + .gform_required_legend { + .gfield_required { + transform: translateY(12px) !important; + } + } + .gfield_description { + @apply !text-neutral-600 !text-sm !font-medium; + } + .gf_page_steps, + .field_description_below { + @apply !border-none; + } + .gf_step_active { + @apply !text-patrimoine-sante-securite !font-semibold; + } + .gform-theme-button { + @apply !rounded-full; + } + .gform_heading { + @apply !pb-8; + } + .gf_progressbar { + @apply !py-0; + } + .gf_progressbar_title { + @apply !pb-3; + } + .gform_previous_button, + .gform_next_button { + @apply !border-none !bg-patrimoine-sante-securite !text-white !font-semibold !text-lg !px-6 !py-3; + } + .gsection_description { + @apply !text-base; + } + .gsection_title { + @apply !text-patrimoine-sante-securite !text-xl !font-bold !mb-0 !mt-4; + } + .gfield_validation_message { + @apply !text-patrimoine-sante-securite !font-semibold; + } +} +.gform_drop_area { + @apply !bg-gray !border-neutral-400; +} + +.gform_validation_errors { + @apply !my-6; +} +.gform_confirmation_wrapper { + @apply py-8 rounded-xl; +} +.gform_confirmation_message { + @apply !bg-emerald-50 !text-emerald-700 !text-center !text-lg !font-semibold rounded-lg p-6; +} + +.gfield_validation_message { + @apply !text-patrimoine-sante-securite !font-semibold; +} + +.gform_heading { + @apply !hidden; +} +#gform_fields_18 { + .publication-list { + @apply mb-10; + } +} +.section_titling + .gform_wrapper { + @apply mt-16; +} + +.homegrade-blocks-box-monoblock { + .gform_wrapper { + @apply max-w-5xl !mx-auto; + } +}