From e3359dd240b9705723c626f00d438dce05b9efa1 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Tue, 12 Sep 2023 14:41:25 +0200 Subject: [PATCH] Move `text-angular` rules into its own file --- app/webpacker/css/admin/all.scss | 1 + .../css/admin/components/text-angular.scss | 43 ++++++++++++++++++ app/webpacker/css/admin/openfoodnetwork.scss | 44 ------------------- 3 files changed, 44 insertions(+), 44 deletions(-) create mode 100644 app/webpacker/css/admin/components/text-angular.scss diff --git a/app/webpacker/css/admin/all.scss b/app/webpacker/css/admin/all.scss index 35e4270d8f..075fe06797 100644 --- a/app/webpacker/css/admin/all.scss +++ b/app/webpacker/css/admin/all.scss @@ -72,6 +72,7 @@ @import "components/todo"; @import "components/tooltip"; @import "components/wizard_progress"; +@import "components/text-angular"; @import "pages/enterprise_form"; @import "pages/subscription_form"; diff --git a/app/webpacker/css/admin/components/text-angular.scss b/app/webpacker/css/admin/components/text-angular.scss new file mode 100644 index 0000000000..d6eab98151 --- /dev/null +++ b/app/webpacker/css/admin/components/text-angular.scss @@ -0,0 +1,43 @@ +// textAngular wysiwyg +text-angular { + .ta-editor { + border: 1px solid $pale-blue; + border-radius: 3px; + } + + .ta-toolbar { + border: 1px solid #cdd9e4; + padding: 0.4em; + margin-bottom: -1px; + background-color: #f1f1f1; + border-radius: 0.25em 0.25em 0 0; + } + .ta-scroll-window > .ta-bind { + max-height: 400px; + min-height: 100px; + outline: none; + p { + margin-bottom: 1.5rem; + } + } + .ta-scroll-window.form-control { + min-height: 100px; + box-shadow: none !important; + } + .btn-group { + display: inline; + margin-right: 8px; + button { + padding: 5px 10px !important; // Add `!important` to be more specific than the default button styles (app/webpacker/css/admin/components/buttons.scss) + // Hope this (text-angular) will be removed soon in order to use trix editor + margin-right: 0.25em; + } + button.active:not(:hover) { + box-shadow: 0 0 0.7em rgba(0, 0, 0, 0.3) inset; + background-color: #4583bf; + } + } + a { + color: $spree-green; + } +} diff --git a/app/webpacker/css/admin/openfoodnetwork.scss b/app/webpacker/css/admin/openfoodnetwork.scss index b4de0d2f52..d8b077a321 100644 --- a/app/webpacker/css/admin/openfoodnetwork.scss +++ b/app/webpacker/css/admin/openfoodnetwork.scss @@ -19,11 +19,6 @@ table .blank-action { width: 29px; } -text-angular .ta-editor { - border: 1px solid $pale-blue; - border-radius: 3px; -} - #header #logo { top: 10px; } @@ -229,45 +224,6 @@ table#listing_enterprise_groups { border-color: $color-error; } -// textAngular wysiwyg -text-angular { - .ta-toolbar { - border: 1px solid #cdd9e4; - padding: 0.4em; - margin-bottom: -1px; - background-color: #f1f1f1; - border-radius: 0.25em 0.25em 0 0; - } - .ta-scroll-window > .ta-bind { - max-height: 400px; - min-height: 100px; - outline: none; - p { - margin-bottom: 1.5rem; - } - } - .ta-scroll-window.form-control { - min-height: 100px; - box-shadow: none !important; - } - .btn-group { - display: inline; - margin-right: 8px; - button { - padding: 5px 10px !important; // Add `!important` to be more specific than the default button styles (app/webpacker/css/admin/components/buttons.scss) - // Hope this (text-angular) will be removed soon in order to use trix editor - margin-right: 0.25em; - } - button.active:not(:hover) { - box-shadow: 0 0 0.7em rgba(0, 0, 0, 0.3) inset; - background-color: #4583bf; - } - } - a { - color: $spree-green; - } -} - span.required { color: $color-5; font-size: 110%;