From a8d0996b2c0ca7425eea4edb3f1d58cbcf12c122 Mon Sep 17 00:00:00 2001 From: virginie-perrichon Date: Wed, 28 Apr 2021 16:02:26 +0200 Subject: [PATCH 1/4] add Bootstrap code needed, delete Bootstrap import --- app/assets/stylesheets/bootstrap/_flex.scss | 18 +++++++++++++++ app/assets/stylesheets/bootstrap/_sizing.scss | 3 +++ .../stylesheets/bootstrap/_spacing.scss | 22 +++++++++++++++++++ app/assets/stylesheets/light_admin/_base.scss | 9 +++----- 4 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 app/assets/stylesheets/bootstrap/_flex.scss create mode 100644 app/assets/stylesheets/bootstrap/_sizing.scss create mode 100644 app/assets/stylesheets/bootstrap/_spacing.scss diff --git a/app/assets/stylesheets/bootstrap/_flex.scss b/app/assets/stylesheets/bootstrap/_flex.scss new file mode 100644 index 0000000..b65d97b --- /dev/null +++ b/app/assets/stylesheets/bootstrap/_flex.scss @@ -0,0 +1,18 @@ +.d-flex { + display: -ms-flexbox !important; + display: flex !important; +} + +.justify-content-between { + -ms-flex-pack: justify !important; + justify-content: space-between !important; +} + +.align-items-center { + -ms-flex-align: center !important; + align-items: center !important; +} + +.text-center { + text-align: center !important; +} diff --git a/app/assets/stylesheets/bootstrap/_sizing.scss b/app/assets/stylesheets/bootstrap/_sizing.scss new file mode 100644 index 0000000..b95103b --- /dev/null +++ b/app/assets/stylesheets/bootstrap/_sizing.scss @@ -0,0 +1,3 @@ +.w-100 { + width: 100% !important; +} diff --git a/app/assets/stylesheets/bootstrap/_spacing.scss b/app/assets/stylesheets/bootstrap/_spacing.scss new file mode 100644 index 0000000..b311e18 --- /dev/null +++ b/app/assets/stylesheets/bootstrap/_spacing.scss @@ -0,0 +1,22 @@ +.px-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; +} + +.py-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; +} + +.mx-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; +} + +.ml-auto { + margin-left: auto !important; +} + +.mt-4 { + margin-top: 1.5rem !important; +} diff --git a/app/assets/stylesheets/light_admin/_base.scss b/app/assets/stylesheets/light_admin/_base.scss index 453ca4a..1ac02b0 100644 --- a/app/assets/stylesheets/light_admin/_base.scss +++ b/app/assets/stylesheets/light_admin/_base.scss @@ -5,12 +5,9 @@ @import 'variables/shadows'; // Required Bootstrap -@import 'bootstrap/scss/functions'; -@import 'bootstrap/scss/variables'; -@import 'bootstrap/scss/mixins'; - -@import 'bootstrap/scss/images'; -@import 'bootstrap/scss/utilities'; +@import '../bootstrap/flex'; +@import '../bootstrap/spacing'; +@import '../bootstrap/sizing'; // Components @import 'components/toggle_filters'; From e5371319fdf1cf8276bf45927996177d827b8dfe Mon Sep 17 00:00:00 2001 From: virginie-perrichon Date: Wed, 28 Apr 2021 16:44:59 +0200 Subject: [PATCH 2/4] rename base.scss --- app/assets/stylesheets/light_admin/{_base.scss => base.scss} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename app/assets/stylesheets/light_admin/{_base.scss => base.scss} (100%) diff --git a/app/assets/stylesheets/light_admin/_base.scss b/app/assets/stylesheets/light_admin/base.scss similarity index 100% rename from app/assets/stylesheets/light_admin/_base.scss rename to app/assets/stylesheets/light_admin/base.scss From 3a2d11c5d165b8252df8d66e82b004447a5fd963 Mon Sep 17 00:00:00 2001 From: virginie-perrichon Date: Wed, 28 Apr 2021 16:53:32 +0200 Subject: [PATCH 3/4] update readme file --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 5ed6a61..82bf675 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,6 @@ $ bundle install ## Pre-requisites - This gem requires the activeadmin gem. -- This gem requires bootstrap: -``` -$ yarn add bootstrap@4.6.0 -``` ## Set-up - In `app/assets/javascripts/active_admin`, add the line: From 83a50200036a9b143fdeb0e1517fb55d337b7429 Mon Sep 17 00:00:00 2001 From: virginie-perrichon Date: Thu, 29 Apr 2021 09:22:42 +0200 Subject: [PATCH 4/4] renamme folder --- app/assets/stylesheets/light_admin/base.scss | 8 ++++---- .../stylesheets/{bootstrap => utilities}/_flex.scss | 0 .../stylesheets/{bootstrap => utilities}/_sizing.scss | 0 .../stylesheets/{bootstrap => utilities}/_spacing.scss | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename app/assets/stylesheets/{bootstrap => utilities}/_flex.scss (100%) rename app/assets/stylesheets/{bootstrap => utilities}/_sizing.scss (100%) rename app/assets/stylesheets/{bootstrap => utilities}/_spacing.scss (100%) diff --git a/app/assets/stylesheets/light_admin/base.scss b/app/assets/stylesheets/light_admin/base.scss index 1ac02b0..22ca39d 100644 --- a/app/assets/stylesheets/light_admin/base.scss +++ b/app/assets/stylesheets/light_admin/base.scss @@ -4,10 +4,10 @@ @import 'variables/borders'; @import 'variables/shadows'; -// Required Bootstrap -@import '../bootstrap/flex'; -@import '../bootstrap/spacing'; -@import '../bootstrap/sizing'; +// Utilities +@import '../utilities/flex'; +@import '../utilities/spacing'; +@import '../utilities/sizing'; // Components @import 'components/toggle_filters'; diff --git a/app/assets/stylesheets/bootstrap/_flex.scss b/app/assets/stylesheets/utilities/_flex.scss similarity index 100% rename from app/assets/stylesheets/bootstrap/_flex.scss rename to app/assets/stylesheets/utilities/_flex.scss diff --git a/app/assets/stylesheets/bootstrap/_sizing.scss b/app/assets/stylesheets/utilities/_sizing.scss similarity index 100% rename from app/assets/stylesheets/bootstrap/_sizing.scss rename to app/assets/stylesheets/utilities/_sizing.scss diff --git a/app/assets/stylesheets/bootstrap/_spacing.scss b/app/assets/stylesheets/utilities/_spacing.scss similarity index 100% rename from app/assets/stylesheets/bootstrap/_spacing.scss rename to app/assets/stylesheets/utilities/_spacing.scss