Skip to content

Commit 5e679a4

Browse files
committed
add custom scss needed to compile a bootstrap with more (bigger) breakpoints, add compiled css to replace stock bootstrap
1 parent ab0b79d commit 5e679a4

File tree

6 files changed

+13854
-8
lines changed

6 files changed

+13854
-8
lines changed

src/assets/css/bma.scss

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// bma bootstrap scss, only adds more breakpoints for now
2+
// build new css:
3+
// $ apt install npm sass
4+
// $ npm install bootstrap
5+
// $ sass bma.scss:bootstrap-v5.3.3.bmacustom.css
6+
// also update SRI in settings.py:
7+
// $ openssl dgst -sha384 -binary bootstrap-v5.3.3.bmacustom.css | openssl base64 -A
8+
9+
$grid-breakpoints: (
10+
xs: 0,
11+
sm: 576px,
12+
md: 768px,
13+
lg: 992px,
14+
xl: 1200px,
15+
xxl: 1392px, // 1320 + (12*7)
16+
3xl: 1608px, // 1512 + (12*8)
17+
4xl: 2004px, // 1896 + (12*9)
18+
5xl: 2400px, // 2280 + (12*10)
19+
6xl: 2796px // 2664 + (12*11)
20+
);
21+
22+
$container-max-widths: (
23+
sm: 540px,
24+
md: 720px,
25+
lg: 960px,
26+
xl: 1140px,
27+
xxl: 1320px,
28+
3xl: 1512px,
29+
4xl: 1896px,
30+
5xl: 2280px,
31+
6xl: 2664px
32+
);
33+
34+
// Import Bootstrap's source files
35+
@import 'node_modules/bootstrap/scss/bootstrap';

src/assets/css/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"dependencies": {
3+
"bootstrap": "^5.3.3"
4+
}
5+
}

src/bma/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@
242242

243243
BOOTSTRAP5 = {
244244
"css_url": {
245-
"url": "/static/css/vendor/bootstrap-v5.3.3.min.css",
246-
"integrity": "sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH",
245+
"url": "/static/css/vendor/bootstrap-v5.3.3.bmacustom.css",
246+
"integrity": "sha384-bpvHuf6ddouJMiDJVAGzwwrkcBiQ/8TmvS+NocB09TmO4qt7ai0jo/HF8cUomEoJ",
247247
"crossorigin": "anonymous",
248248
},
249249
"javascript_url": {

0 commit comments

Comments
 (0)