Skip to content

Commit

Permalink
Merge pull request #2 from btcpayserver/bootstrap-v5
Browse files Browse the repository at this point in the history
Bootstrap v5 migration
  • Loading branch information
dennisreimann authored Apr 21, 2021
2 parents cbb2a8b + 5c18962 commit 847106d
Show file tree
Hide file tree
Showing 31 changed files with 14,039 additions and 1,224 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/dist
/generated
/node_modules
/src/styles/variables/design.css
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,14 @@ npm start
```

This will bring up the dev server and pattern library on [localhost:3000](http://localhost:3000).

### 🛼 Bootstrap Customizations

To generate a custom version of Bootstrap v5 that supports our light/dark themeing, we take a three step approach:

1. Where possible we [customize the variables](./src/bootstrap/_variables.scss) offered by Bootstrap.
The general variable definitions can be looked up in the component files in `node_modules/bootstrap/scss/` after locally installing Bootstrap as a dependency.
2. We then [generate the bootstrap css](./tasks/generate-bootstrap.js) and replace some of the generated HEX values with our color variables.
This is done for the cases in which we cannot use our variables directly in step 1, because Bootstrap passes them through modifier functions (lighten/darken), which require actual color values.
3. Hard [CSS overrides](./src/bootstrap/_customizations.css) are used for extensions and customizations of the final `bootstrap.css`.
These are appended to the generated file, so that we can override things and maintain the ability to easily upgrade.
Loading

0 comments on commit 847106d

Please sign in to comment.