Skip to content

Commit 5343a0f

Browse files
Select bootstrap features and set fonts
Importing only some features drastically reduces the size of bootstrap.min.css
1 parent fe70297 commit 5343a0f

File tree

3 files changed

+34
-27
lines changed

3 files changed

+34
-27
lines changed

doc-tool/bootstrap-theme/theme.scss

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,39 @@
33
@import "node_modules/bootstrap/scss/variables";
44
@import "node_modules/bootstrap/scss/mixins";
55

6+
// Web fonts
7+
@import url('https://fonts.googleapis.com/css?family=Roboto+Slab:300|Source+Code+Pro:400,600|Source+Sans+Pro:400,600&display=swap');
8+
69
// Custom values that override the default variables of Bootstrap
710
$colors: (
811
"red": #ca445e,
912
"orange": #f26527
1013
);
1114
$theme-colors: (
12-
"primary": #002b36,
13-
"contrast": #ca445e, // contrasts with primary (used on dark backgrounds)
14-
"secondary": #ca445e, // used on light backgrounds
15+
"primary": #002b36, // primary toolbar+sidebar dark color
16+
"secondary": #ca445e, // secondary color used on light backgrounds
17+
"accent": #ca445e, // secondary-like for dark backgrounds
18+
"contrast": #f26527, // used on dark backgrounds
1519
);
16-
@import "node_modules/bootstrap/scss/bootstrap";
20+
21+
$code-color: theme-color("secondary");
22+
$font-family-monospace: "Source Code Pro", monospace;
23+
$font-family-sans-serif: "Source Sans Pro", sans-serif;
24+
$font-family-serif: "Roboto Slab", serif;
25+
$font-family-base: $font-family-serif;
26+
$headings-font-family: $font-family-sans-serif;
27+
28+
// Features imports - follow the order of bootstrap.scss (bootstrap's module)
29+
@import "node_modules/bootstrap/scss/root";
30+
@import "node_modules/bootstrap/scss/reboot";
31+
@import "node_modules/bootstrap/scss/type";
32+
@import "node_modules/bootstrap/scss/images";
33+
@import "node_modules/bootstrap/scss/code";
34+
@import "node_modules/bootstrap/scss/grid";
35+
@import "node_modules/bootstrap/scss/tables";
36+
@import "node_modules/bootstrap/scss/buttons";
37+
@import "node_modules/bootstrap/scss/navbar";
38+
@import "node_modules/bootstrap/scss/breadcrumb";
39+
@import "node_modules/bootstrap/scss/badge";
40+
@import "node_modules/bootstrap/scss/spinners";
41+
@import "node_modules/bootstrap/scss/utilities";

doc-tool/resources/css/bootstrap.min.css

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc-tool/resources/css/dottydoc.css

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,11 @@
1-
@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700);
2-
@import url(https://fonts.googleapis.com/css?family=Titillium+Web:200,300,400,600);
3-
@import url(https://fonts.googleapis.com/css?family=Roboto+Slab:100,300,400,700);
4-
51
html, body {
6-
overflow-x: hidden;
7-
font-family: "Roboto Slab", serif;
8-
font-weight: 300;
9-
}
10-
11-
html {
12-
height: 100%;
13-
}
14-
15-
body {
16-
min-height: 100%;
2+
font-weight: 300;
3+
height: 100%;
174
}
185

196
div#content-wrapper {
20-
min-height: 100vh;
21-
padding-left: 0;
7+
min-height: 100vh;
8+
padding-left: 0;
229
}
2310

2411
div#content-wrapper div#content-body {

0 commit comments

Comments
 (0)