Skip to content

Commit

Permalink
Merge pull request #2 from CapSens/add_bootstrap_code
Browse files Browse the repository at this point in the history
Add bootstrap code
  • Loading branch information
virginie-perrichon authored Apr 29, 2021
2 parents eecbdcf + 83a5020 commit 46108af
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 11 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ $ bundle install

## Pre-requisites
- This gem requires the activeadmin gem.
- This gem requires bootstrap:
```
$ yarn add [email protected]
```

## Set-up
- In `app/assets/javascripts/active_admin`, add the line:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@
@import 'variables/borders';
@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';
// Utilities
@import '../utilities/flex';
@import '../utilities/spacing';
@import '../utilities/sizing';

// Components
@import 'components/toggle_filters';
Expand Down
18 changes: 18 additions & 0 deletions app/assets/stylesheets/utilities/_flex.scss
Original file line number Diff line number Diff line change
@@ -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;
}
3 changes: 3 additions & 0 deletions app/assets/stylesheets/utilities/_sizing.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.w-100 {
width: 100% !important;
}
22 changes: 22 additions & 0 deletions app/assets/stylesheets/utilities/_spacing.scss
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 46108af

Please sign in to comment.