From 6c131f48289d4e5e5f2c5af7ae996a700cb6dde7 Mon Sep 17 00:00:00 2001 From: Roy Johnson Date: Mon, 7 Oct 2024 11:52:33 -0500 Subject: [PATCH] Fix layout issues --- src/app/pages/contact/embedded.scss | 2 +- src/app/pages/contact/form.scss | 7 +++++- .../pages/errata-form/form/FileUploader.scss | 22 +++++++++++++++++++ src/app/pages/errata-form/form/form.scss | 22 +++---------------- 4 files changed, 32 insertions(+), 21 deletions(-) create mode 100644 src/app/pages/errata-form/form/FileUploader.scss diff --git a/src/app/pages/contact/embedded.scss b/src/app/pages/contact/embedded.scss index dfa70c9f3..a48e197dc 100644 --- a/src/app/pages/contact/embedded.scss +++ b/src/app/pages/contact/embedded.scss @@ -19,7 +19,7 @@ } } - button { + button:not(.clear-file) { @include button(); &.primary { diff --git a/src/app/pages/contact/form.scss b/src/app/pages/contact/form.scss index f3c2e8ac3..a8f52232c 100644 --- a/src/app/pages/contact/form.scss +++ b/src/app/pages/contact/form.scss @@ -1,4 +1,5 @@ @import 'pattern-library/core/pattern-library/headers'; +@import '../errata-form/form/FileUploader'; form { textarea { @@ -17,6 +18,11 @@ form { } + .file-button { + @include file-button(); + margin-bottom: $normal-margin; + } + .label-text { @include set-font(h4); margin-bottom: 0.5rem; @@ -25,7 +31,6 @@ form { .btn, .btn[type="submit"] { @include button(); - margin-bottom: $normal-margin; width: 12rem; padding: 0; diff --git a/src/app/pages/errata-form/form/FileUploader.scss b/src/app/pages/errata-form/form/FileUploader.scss new file mode 100644 index 000000000..eb189f107 --- /dev/null +++ b/src/app/pages/errata-form/form/FileUploader.scss @@ -0,0 +1,22 @@ +@mixin file-button() { + align-items: center; + display: grid; + grid-gap: 1rem; + grid-template-columns: repeat(3, auto) 1fr; + + &.empty { + order: 1; + + + .file-button.empty { + display: none; + } + } + + .clear-file { + appearance: none; + background-color: inherit; + color: inherit; + justify-self: left; + + } +} \ No newline at end of file diff --git a/src/app/pages/errata-form/form/form.scss b/src/app/pages/errata-form/form/form.scss index e5cc691d5..841b19acd 100644 --- a/src/app/pages/errata-form/form/form.scss +++ b/src/app/pages/errata-form/form/form.scss @@ -1,4 +1,5 @@ @import 'pattern-library/core/pattern-library/headers'; +@import './FileUploader'; .banned-notice { padding: $normal-margin; @@ -87,8 +88,7 @@ } } - .button-group, - .file-button { + .button-group { align-items: center; display: grid; grid-gap: 1rem; @@ -99,23 +99,7 @@ } .file-button { - grid-template-columns: auto auto 1fr; - - &.empty { - order: 1; - - + .file-button.empty { - display: none; - } - } - } - - .clear-file { - appearance: none; - background-color: inherit; - color: inherit; - justify-self: left; - + @include file-button(); } .btn {