jekyll-bootstrap 4.0.0.pre.beta.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +46 -0
- data/_includes/footer.html +16 -0
- data/_includes/head.html +16 -0
- data/_includes/header.html +24 -0
- data/_layouts/default.html +9 -0
- data/_layouts/home.html +71 -0
- data/_layouts/page.html +11 -0
- data/_layouts/post.html +24 -0
- data/_sass/_alert.scss +49 -0
- data/_sass/_badge.scss +47 -0
- data/_sass/_breadcrumb.scss +38 -0
- data/_sass/_button-group.scss +207 -0
- data/_sass/_buttons.scss +136 -0
- data/_sass/_card.scss +259 -0
- data/_sass/_carousel.scss +191 -0
- data/_sass/_close.scss +29 -0
- data/_sass/_code.scss +64 -0
- data/_sass/_custom-forms.scss +257 -0
- data/_sass/_dropdown.scss +103 -0
- data/_sass/_forms.scss +358 -0
- data/_sass/_functions.scss +86 -0
- data/_sass/_grid.scss +52 -0
- data/_sass/_images.scss +43 -0
- data/_sass/_input-group.scss +186 -0
- data/_sass/_jumbotron.scss +16 -0
- data/_sass/_list-group.scss +114 -0
- data/_sass/_media.scss +8 -0
- data/_sass/_mixins.scss +42 -0
- data/_sass/_modal.scss +153 -0
- data/_sass/_nav.scss +118 -0
- data/_sass/_navbar.scss +306 -0
- data/_sass/_pagination.scss +64 -0
- data/_sass/_popover.scss +194 -0
- data/_sass/_print.scss +110 -0
- data/_sass/_progress.scss +30 -0
- data/_sass/_reboot.scss +504 -0
- data/_sass/_root.scss +19 -0
- data/_sass/_tables.scss +180 -0
- data/_sass/_tooltip.scss +107 -0
- data/_sass/_transitions.scss +36 -0
- data/_sass/_type.scss +125 -0
- data/_sass/_utilities.scss +14 -0
- data/_sass/_variables.scss +828 -0
- data/_sass/bootstrap-grid.scss +35 -0
- data/_sass/bootstrap-reboot.scss +12 -0
- data/_sass/bootstrap.scss +42 -0
- data/_sass/mixins/_alert.scss +13 -0
- data/_sass/mixins/_background-variant.scss +20 -0
- data/_sass/mixins/_badge.scss +12 -0
- data/_sass/mixins/_border-radius.scss +35 -0
- data/_sass/mixins/_box-shadow.scss +5 -0
- data/_sass/mixins/_breakpoints.scss +119 -0
- data/_sass/mixins/_buttons.scss +94 -0
- data/_sass/mixins/_caret.scss +35 -0
- data/_sass/mixins/_clearfix.scss +7 -0
- data/_sass/mixins/_float.scss +11 -0
- data/_sass/mixins/_forms.scss +108 -0
- data/_sass/mixins/_gradients.scss +45 -0
- data/_sass/mixins/_grid-framework.scss +69 -0
- data/_sass/mixins/_grid.scss +52 -0
- data/_sass/mixins/_hover.scss +61 -0
- data/_sass/mixins/_image.scss +36 -0
- data/_sass/mixins/_list-group.scss +24 -0
- data/_sass/mixins/_lists.scss +7 -0
- data/_sass/mixins/_nav-divider.scss +10 -0
- data/_sass/mixins/_navbar-align.scss +10 -0
- data/_sass/mixins/_pagination.scss +22 -0
- data/_sass/mixins/_reset-text.scss +17 -0
- data/_sass/mixins/_resize.scss +6 -0
- data/_sass/mixins/_screen-reader.scss +35 -0
- data/_sass/mixins/_size.scss +6 -0
- data/_sass/mixins/_table-row.scss +30 -0
- data/_sass/mixins/_text-emphasis.scss +14 -0
- data/_sass/mixins/_text-hide.scss +8 -0
- data/_sass/mixins/_text-truncate.scss +8 -0
- data/_sass/mixins/_transition.scss +9 -0
- data/_sass/mixins/_visibility.scss +7 -0
- data/_sass/syntax_highlight.scss +70 -0
- data/_sass/utilities/_align.scss +8 -0
- data/_sass/utilities/_background.scss +19 -0
- data/_sass/utilities/_borders.scss +54 -0
- data/_sass/utilities/_clearfix.scss +3 -0
- data/_sass/utilities/_display.scss +56 -0
- data/_sass/utilities/_embed.scss +52 -0
- data/_sass/utilities/_flex.scss +46 -0
- data/_sass/utilities/_float.scss +9 -0
- data/_sass/utilities/_position.scss +36 -0
- data/_sass/utilities/_screenreaders.scss +11 -0
- data/_sass/utilities/_sizing.scss +12 -0
- data/_sass/utilities/_spacing.scss +51 -0
- data/_sass/utilities/_text.scss +52 -0
- data/_sass/utilities/_visibility.scss +11 -0
- data/assets/css/main.scss +15 -0
- metadata +195 -0
data/_sass/_images.scss
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
// Responsive images (ensure images don't scale beyond their parents)
|
2
|
+
//
|
3
|
+
// This is purposefully opt-in via an explicit class rather than being the default for all `<img>`s.
|
4
|
+
// We previously tried the "images are responsive by default" approach in Bootstrap v2,
|
5
|
+
// and abandoned it in Bootstrap v3 because it breaks lots of third-party widgets (including Google Maps)
|
6
|
+
// which weren't expecting the images within themselves to be involuntarily resized.
|
7
|
+
// See also https://github.com/twbs/bootstrap/issues/18178
|
8
|
+
.img-fluid {
|
9
|
+
@include img-fluid;
|
10
|
+
}
|
11
|
+
|
12
|
+
|
13
|
+
// Image thumbnails
|
14
|
+
.img-thumbnail {
|
15
|
+
padding: $thumbnail-padding;
|
16
|
+
background-color: $thumbnail-bg;
|
17
|
+
border: $thumbnail-border-width solid $thumbnail-border-color;
|
18
|
+
@include border-radius($thumbnail-border-radius);
|
19
|
+
@include transition($thumbnail-transition);
|
20
|
+
@include box-shadow($thumbnail-box-shadow);
|
21
|
+
|
22
|
+
// Keep them at most 100% wide
|
23
|
+
@include img-fluid;
|
24
|
+
}
|
25
|
+
|
26
|
+
//
|
27
|
+
// Figures
|
28
|
+
//
|
29
|
+
|
30
|
+
.figure {
|
31
|
+
// Ensures the caption's text aligns with the image.
|
32
|
+
display: inline-block;
|
33
|
+
}
|
34
|
+
|
35
|
+
.figure-img {
|
36
|
+
margin-bottom: ($spacer / 2);
|
37
|
+
line-height: 1;
|
38
|
+
}
|
39
|
+
|
40
|
+
.figure-caption {
|
41
|
+
font-size: $figure-caption-font-size;
|
42
|
+
color: $figure-caption-color;
|
43
|
+
}
|
@@ -0,0 +1,186 @@
|
|
1
|
+
// stylelint-disable selector-no-qualifying-type
|
2
|
+
|
3
|
+
//
|
4
|
+
// Base styles
|
5
|
+
//
|
6
|
+
|
7
|
+
.input-group {
|
8
|
+
position: relative;
|
9
|
+
display: flex;
|
10
|
+
align-items: stretch;
|
11
|
+
width: 100%;
|
12
|
+
|
13
|
+
.form-control {
|
14
|
+
// Ensure that the input is always above the *appended* addon button for
|
15
|
+
// proper border colors.
|
16
|
+
position: relative;
|
17
|
+
z-index: 2;
|
18
|
+
flex: 1 1 auto;
|
19
|
+
// Add width 1% and flex-basis auto to ensure that button will not wrap out
|
20
|
+
// the column. Applies to IE Edge+ and Firefox. Chrome does not require this.
|
21
|
+
width: 1%;
|
22
|
+
margin-bottom: 0;
|
23
|
+
|
24
|
+
// Bring the "active" form control to the front
|
25
|
+
@include hover-focus-active {
|
26
|
+
z-index: 3;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
.input-group-addon,
|
32
|
+
.input-group-btn,
|
33
|
+
.input-group .form-control {
|
34
|
+
display: flex;
|
35
|
+
align-items: center;
|
36
|
+
&:not(:first-child):not(:last-child) {
|
37
|
+
@include border-radius(0);
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
.input-group-addon,
|
42
|
+
.input-group-btn {
|
43
|
+
white-space: nowrap;
|
44
|
+
}
|
45
|
+
|
46
|
+
|
47
|
+
// Sizing options
|
48
|
+
//
|
49
|
+
// Remix the default form control sizing classes into new ones for easier
|
50
|
+
// manipulation.
|
51
|
+
|
52
|
+
.input-group-lg > .form-control,
|
53
|
+
.input-group-lg > .input-group-addon,
|
54
|
+
.input-group-lg > .input-group-btn > .btn {
|
55
|
+
@extend .form-control-lg;
|
56
|
+
}
|
57
|
+
.input-group-sm > .form-control,
|
58
|
+
.input-group-sm > .input-group-addon,
|
59
|
+
.input-group-sm > .input-group-btn > .btn {
|
60
|
+
@extend .form-control-sm;
|
61
|
+
}
|
62
|
+
|
63
|
+
|
64
|
+
//
|
65
|
+
// Text input groups
|
66
|
+
//
|
67
|
+
|
68
|
+
.input-group-addon {
|
69
|
+
padding: $input-btn-padding-y $input-btn-padding-x;
|
70
|
+
margin-bottom: 0; // Allow use of <label> elements by overriding our default margin-bottom
|
71
|
+
font-size: $font-size-base; // Match inputs
|
72
|
+
font-weight: $font-weight-normal;
|
73
|
+
line-height: $input-btn-line-height;
|
74
|
+
color: $input-group-addon-color;
|
75
|
+
text-align: center;
|
76
|
+
background-color: $input-group-addon-bg;
|
77
|
+
border: $input-btn-border-width solid $input-group-addon-border-color;
|
78
|
+
@include border-radius($input-border-radius);
|
79
|
+
|
80
|
+
// Sizing
|
81
|
+
&.form-control-sm {
|
82
|
+
padding: $input-btn-padding-y-sm $input-btn-padding-x-sm;
|
83
|
+
font-size: $font-size-sm;
|
84
|
+
@include border-radius($input-border-radius-sm);
|
85
|
+
}
|
86
|
+
|
87
|
+
&.form-control-lg {
|
88
|
+
padding: $input-btn-padding-y-lg $input-btn-padding-x-lg;
|
89
|
+
font-size: $font-size-lg;
|
90
|
+
@include border-radius($input-border-radius-lg);
|
91
|
+
}
|
92
|
+
|
93
|
+
// Nuke default margins from checkboxes and radios to vertically center within.
|
94
|
+
input[type="radio"],
|
95
|
+
input[type="checkbox"] {
|
96
|
+
margin-top: 0;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
|
101
|
+
//
|
102
|
+
// Reset rounded corners
|
103
|
+
//
|
104
|
+
|
105
|
+
.input-group .form-control:not(:last-child),
|
106
|
+
.input-group-addon:not(:last-child),
|
107
|
+
.input-group-btn:not(:last-child) > .btn,
|
108
|
+
.input-group-btn:not(:last-child) > .btn-group > .btn,
|
109
|
+
.input-group-btn:not(:last-child) > .dropdown-toggle,
|
110
|
+
.input-group-btn:not(:first-child) > .btn:not(:last-child):not(.dropdown-toggle),
|
111
|
+
.input-group-btn:not(:first-child) > .btn-group:not(:last-child) > .btn {
|
112
|
+
@include border-right-radius(0);
|
113
|
+
}
|
114
|
+
.input-group-addon:not(:last-child) {
|
115
|
+
border-right: 0;
|
116
|
+
}
|
117
|
+
.input-group .form-control:not(:first-child),
|
118
|
+
.input-group-addon:not(:first-child),
|
119
|
+
.input-group-btn:not(:first-child) > .btn,
|
120
|
+
.input-group-btn:not(:first-child) > .btn-group > .btn,
|
121
|
+
.input-group-btn:not(:first-child) > .dropdown-toggle,
|
122
|
+
.input-group-btn:not(:last-child) > .btn:not(:first-child),
|
123
|
+
.input-group-btn:not(:last-child) > .btn-group:not(:first-child) > .btn {
|
124
|
+
@include border-left-radius(0);
|
125
|
+
}
|
126
|
+
.form-control + .input-group-addon:not(:first-child) {
|
127
|
+
border-left: 0;
|
128
|
+
}
|
129
|
+
|
130
|
+
//
|
131
|
+
// Button input groups
|
132
|
+
//
|
133
|
+
|
134
|
+
.input-group-btn {
|
135
|
+
position: relative;
|
136
|
+
align-items: stretch;
|
137
|
+
// Jankily prevent input button groups from wrapping with `white-space` and
|
138
|
+
// `font-size` in combination with `inline-block` on buttons.
|
139
|
+
font-size: 0;
|
140
|
+
white-space: nowrap;
|
141
|
+
|
142
|
+
// Negative margin for spacing, position for bringing hovered/focused/actived
|
143
|
+
// element above the siblings.
|
144
|
+
> .btn {
|
145
|
+
position: relative;
|
146
|
+
|
147
|
+
+ .btn {
|
148
|
+
margin-left: (-$input-btn-border-width);
|
149
|
+
}
|
150
|
+
|
151
|
+
// Bring the "active" button to the front
|
152
|
+
@include hover-focus-active {
|
153
|
+
z-index: 3;
|
154
|
+
}
|
155
|
+
}
|
156
|
+
|
157
|
+
&:first-child > .btn + .btn {
|
158
|
+
margin-left: 0;
|
159
|
+
}
|
160
|
+
|
161
|
+
// Negative margin to only have a single, shared border between the two
|
162
|
+
&:not(:last-child) {
|
163
|
+
> .btn,
|
164
|
+
> .btn-group {
|
165
|
+
margin-right: (-$input-btn-border-width);
|
166
|
+
}
|
167
|
+
}
|
168
|
+
&:not(:first-child) {
|
169
|
+
> .btn,
|
170
|
+
> .btn-group {
|
171
|
+
z-index: 2;
|
172
|
+
// remove nagative margin ($input-btn-border-width) to solve overlapping issue with button.
|
173
|
+
margin-left: 0;
|
174
|
+
|
175
|
+
// When input is first, overlap the right side of it with the button(-group)
|
176
|
+
&:first-child {
|
177
|
+
margin-left: (-$input-btn-border-width);
|
178
|
+
}
|
179
|
+
|
180
|
+
// Because specificity
|
181
|
+
@include hover-focus-active {
|
182
|
+
z-index: 3;
|
183
|
+
}
|
184
|
+
}
|
185
|
+
}
|
186
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
.jumbotron {
|
2
|
+
padding: $jumbotron-padding ($jumbotron-padding / 2);
|
3
|
+
margin-bottom: $jumbotron-padding;
|
4
|
+
background-color: $jumbotron-bg;
|
5
|
+
@include border-radius($border-radius-lg);
|
6
|
+
|
7
|
+
@include media-breakpoint-up(sm) {
|
8
|
+
padding: ($jumbotron-padding * 2) $jumbotron-padding;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
.jumbotron-fluid {
|
13
|
+
padding-right: 0;
|
14
|
+
padding-left: 0;
|
15
|
+
@include border-radius(0);
|
16
|
+
}
|
@@ -0,0 +1,114 @@
|
|
1
|
+
// Base class
|
2
|
+
//
|
3
|
+
// Easily usable on <ul>, <ol>, or <div>.
|
4
|
+
|
5
|
+
.list-group {
|
6
|
+
display: flex;
|
7
|
+
flex-direction: column;
|
8
|
+
|
9
|
+
// No need to set list-style: none; since .list-group-item is block level
|
10
|
+
padding-left: 0; // reset padding because ul and ol
|
11
|
+
margin-bottom: 0;
|
12
|
+
}
|
13
|
+
|
14
|
+
|
15
|
+
// Interactive list items
|
16
|
+
//
|
17
|
+
// Use anchor or button elements instead of `li`s or `div`s to create interactive
|
18
|
+
// list items. Includes an extra `.active` modifier class for selected items.
|
19
|
+
|
20
|
+
.list-group-item-action {
|
21
|
+
width: 100%; // For `<button>`s (anchors become 100% by default though)
|
22
|
+
color: $list-group-action-color;
|
23
|
+
text-align: inherit; // For `<button>`s (anchors inherit)
|
24
|
+
|
25
|
+
// Hover state
|
26
|
+
@include hover-focus {
|
27
|
+
color: $list-group-action-hover-color;
|
28
|
+
text-decoration: none;
|
29
|
+
background-color: $list-group-hover-bg;
|
30
|
+
}
|
31
|
+
|
32
|
+
&:active {
|
33
|
+
color: $list-group-action-active-color;
|
34
|
+
background-color: $list-group-action-active-bg;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
|
39
|
+
// Individual list items
|
40
|
+
//
|
41
|
+
// Use on `li`s or `div`s within the `.list-group` parent.
|
42
|
+
|
43
|
+
.list-group-item {
|
44
|
+
position: relative;
|
45
|
+
display: block;
|
46
|
+
padding: $list-group-item-padding-y $list-group-item-padding-x;
|
47
|
+
// Place the border on the list items and negative margin up for better styling
|
48
|
+
margin-bottom: -$list-group-border-width;
|
49
|
+
background-color: $list-group-bg;
|
50
|
+
border: $list-group-border-width solid $list-group-border-color;
|
51
|
+
|
52
|
+
&:first-child {
|
53
|
+
@include border-top-radius($list-group-border-radius);
|
54
|
+
}
|
55
|
+
|
56
|
+
&:last-child {
|
57
|
+
margin-bottom: 0;
|
58
|
+
@include border-bottom-radius($list-group-border-radius);
|
59
|
+
}
|
60
|
+
|
61
|
+
@include hover-focus {
|
62
|
+
text-decoration: none;
|
63
|
+
}
|
64
|
+
|
65
|
+
&.disabled,
|
66
|
+
&:disabled {
|
67
|
+
color: $list-group-disabled-color;
|
68
|
+
background-color: $list-group-disabled-bg;
|
69
|
+
}
|
70
|
+
|
71
|
+
// Include both here for `<a>`s and `<button>`s
|
72
|
+
&.active {
|
73
|
+
z-index: 2; // Place active items above their siblings for proper border styling
|
74
|
+
color: $list-group-active-color;
|
75
|
+
background-color: $list-group-active-bg;
|
76
|
+
border-color: $list-group-active-border-color;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
|
81
|
+
// Flush list items
|
82
|
+
//
|
83
|
+
// Remove borders and border-radius to keep list group items edge-to-edge. Most
|
84
|
+
// useful within other components (e.g., cards).
|
85
|
+
|
86
|
+
.list-group-flush {
|
87
|
+
.list-group-item {
|
88
|
+
border-right: 0;
|
89
|
+
border-left: 0;
|
90
|
+
border-radius: 0;
|
91
|
+
}
|
92
|
+
|
93
|
+
&:first-child {
|
94
|
+
.list-group-item:first-child {
|
95
|
+
border-top: 0;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
|
99
|
+
&:last-child {
|
100
|
+
.list-group-item:last-child {
|
101
|
+
border-bottom: 0;
|
102
|
+
}
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
|
107
|
+
// Contextual variants
|
108
|
+
//
|
109
|
+
// Add modifier classes to change text and background color on individual items.
|
110
|
+
// Organizationally, this must come after the `:hover` states.
|
111
|
+
|
112
|
+
@each $color, $value in $theme-colors {
|
113
|
+
@include list-group-item-variant($color, theme-color-level($color, -9), theme-color-level($color, 6));
|
114
|
+
}
|
data/_sass/_media.scss
ADDED
data/_sass/_mixins.scss
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
// Toggles
|
2
|
+
//
|
3
|
+
// Used in conjunction with global variables to enable certain theme features.
|
4
|
+
|
5
|
+
// Utilities
|
6
|
+
@import "mixins/breakpoints";
|
7
|
+
@import "mixins/hover";
|
8
|
+
@import "mixins/image";
|
9
|
+
@import "mixins/badge";
|
10
|
+
@import "mixins/resize";
|
11
|
+
@import "mixins/screen-reader";
|
12
|
+
@import "mixins/size";
|
13
|
+
@import "mixins/reset-text";
|
14
|
+
@import "mixins/text-emphasis";
|
15
|
+
@import "mixins/text-hide";
|
16
|
+
@import "mixins/text-truncate";
|
17
|
+
@import "mixins/visibility";
|
18
|
+
|
19
|
+
// // Components
|
20
|
+
@import "mixins/alert";
|
21
|
+
@import "mixins/buttons";
|
22
|
+
@import "mixins/caret";
|
23
|
+
@import "mixins/pagination";
|
24
|
+
@import "mixins/lists";
|
25
|
+
@import "mixins/list-group";
|
26
|
+
@import "mixins/nav-divider";
|
27
|
+
@import "mixins/forms";
|
28
|
+
@import "mixins/table-row";
|
29
|
+
|
30
|
+
// // Skins
|
31
|
+
@import "mixins/background-variant";
|
32
|
+
@import "mixins/border-radius";
|
33
|
+
@import "mixins/box-shadow";
|
34
|
+
@import "mixins/gradients";
|
35
|
+
@import "mixins/transition";
|
36
|
+
|
37
|
+
// // Layout
|
38
|
+
@import "mixins/clearfix";
|
39
|
+
// @import "mixins/navbar-align";
|
40
|
+
@import "mixins/grid-framework";
|
41
|
+
@import "mixins/grid";
|
42
|
+
@import "mixins/float";
|
data/_sass/_modal.scss
ADDED
@@ -0,0 +1,153 @@
|
|
1
|
+
// .modal-open - body class for killing the scroll
|
2
|
+
// .modal - container to scroll within
|
3
|
+
// .modal-dialog - positioning shell for the actual modal
|
4
|
+
// .modal-content - actual modal w/ bg and corners and stuff
|
5
|
+
|
6
|
+
|
7
|
+
// Kill the scroll on the body
|
8
|
+
.modal-open {
|
9
|
+
overflow: hidden;
|
10
|
+
}
|
11
|
+
|
12
|
+
// Container that the modal scrolls within
|
13
|
+
.modal {
|
14
|
+
position: fixed;
|
15
|
+
top: 0;
|
16
|
+
right: 0;
|
17
|
+
bottom: 0;
|
18
|
+
left: 0;
|
19
|
+
z-index: $zindex-modal;
|
20
|
+
display: none;
|
21
|
+
overflow: hidden;
|
22
|
+
// Prevent Chrome on Windows from adding a focus outline. For details, see
|
23
|
+
// https://github.com/twbs/bootstrap/pull/10951.
|
24
|
+
outline: 0;
|
25
|
+
// We deliberately don't use `-webkit-overflow-scrolling: touch;` due to a
|
26
|
+
// gnarly iOS Safari bug: https://bugs.webkit.org/show_bug.cgi?id=158342
|
27
|
+
// See also https://github.com/twbs/bootstrap/issues/17695
|
28
|
+
|
29
|
+
// When fading in the modal, animate it to slide down
|
30
|
+
&.fade .modal-dialog {
|
31
|
+
@include transition($modal-transition);
|
32
|
+
transform: translate(0, -25%);
|
33
|
+
}
|
34
|
+
&.show .modal-dialog { transform: translate(0, 0); }
|
35
|
+
}
|
36
|
+
.modal-open .modal {
|
37
|
+
overflow-x: hidden;
|
38
|
+
overflow-y: auto;
|
39
|
+
}
|
40
|
+
|
41
|
+
// Shell div to position the modal with bottom padding
|
42
|
+
.modal-dialog {
|
43
|
+
position: relative;
|
44
|
+
width: auto;
|
45
|
+
margin: $modal-dialog-margin;
|
46
|
+
// allow clicks to pass through for custom click handling to close modal
|
47
|
+
pointer-events: none;
|
48
|
+
}
|
49
|
+
|
50
|
+
// Actual modal
|
51
|
+
.modal-content {
|
52
|
+
position: relative;
|
53
|
+
display: flex;
|
54
|
+
flex-direction: column;
|
55
|
+
// counteract the pointer-events: none; in the .modal-dialog
|
56
|
+
pointer-events: auto;
|
57
|
+
background-color: $modal-content-bg;
|
58
|
+
background-clip: padding-box;
|
59
|
+
border: $modal-content-border-width solid $modal-content-border-color;
|
60
|
+
@include border-radius($border-radius-lg);
|
61
|
+
@include box-shadow($modal-content-box-shadow-xs);
|
62
|
+
// Remove focus outline from opened modal
|
63
|
+
outline: 0;
|
64
|
+
}
|
65
|
+
|
66
|
+
// Modal background
|
67
|
+
.modal-backdrop {
|
68
|
+
position: fixed;
|
69
|
+
top: 0;
|
70
|
+
right: 0;
|
71
|
+
bottom: 0;
|
72
|
+
left: 0;
|
73
|
+
z-index: $zindex-modal-backdrop;
|
74
|
+
background-color: $modal-backdrop-bg;
|
75
|
+
|
76
|
+
// Fade for backdrop
|
77
|
+
&.fade { opacity: 0; }
|
78
|
+
&.show { opacity: $modal-backdrop-opacity; }
|
79
|
+
}
|
80
|
+
|
81
|
+
// Modal header
|
82
|
+
// Top section of the modal w/ title and dismiss
|
83
|
+
.modal-header {
|
84
|
+
display: flex;
|
85
|
+
align-items: flex-start; // so the close btn always stays on the upper right corner
|
86
|
+
justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
|
87
|
+
padding: $modal-header-padding;
|
88
|
+
border-bottom: $modal-header-border-width solid $modal-header-border-color;
|
89
|
+
@include border-top-radius($border-radius-lg);
|
90
|
+
|
91
|
+
.close {
|
92
|
+
padding: $modal-header-padding;
|
93
|
+
// auto on the left force icon to the right even when there is no .modal-title
|
94
|
+
margin: (-$modal-header-padding) (-$modal-header-padding) (-$modal-header-padding) auto;
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
// Title text within header
|
99
|
+
.modal-title {
|
100
|
+
margin-bottom: 0;
|
101
|
+
line-height: $modal-title-line-height;
|
102
|
+
}
|
103
|
+
|
104
|
+
// Modal body
|
105
|
+
// Where all modal content resides (sibling of .modal-header and .modal-footer)
|
106
|
+
.modal-body {
|
107
|
+
position: relative;
|
108
|
+
// Enable `flex-grow: 1` so that the body take up as much space as possible
|
109
|
+
// when should there be a fixed height on `.modal-dialog`.
|
110
|
+
flex: 1 1 auto;
|
111
|
+
padding: $modal-inner-padding;
|
112
|
+
}
|
113
|
+
|
114
|
+
// Footer (for actions)
|
115
|
+
.modal-footer {
|
116
|
+
display: flex;
|
117
|
+
align-items: center; // vertically center
|
118
|
+
justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
|
119
|
+
padding: $modal-inner-padding;
|
120
|
+
border-top: $modal-footer-border-width solid $modal-footer-border-color;
|
121
|
+
|
122
|
+
// Easily place margin between footer elements
|
123
|
+
> :not(:first-child) { margin-left: .25rem; }
|
124
|
+
> :not(:last-child) { margin-right: .25rem; }
|
125
|
+
}
|
126
|
+
|
127
|
+
// Measure scrollbar width for padding body during modal show/hide
|
128
|
+
.modal-scrollbar-measure {
|
129
|
+
position: absolute;
|
130
|
+
top: -9999px;
|
131
|
+
width: 50px;
|
132
|
+
height: 50px;
|
133
|
+
overflow: scroll;
|
134
|
+
}
|
135
|
+
|
136
|
+
// Scale up the modal
|
137
|
+
@include media-breakpoint-up(sm) {
|
138
|
+
// Automatically set modal's width for larger viewports
|
139
|
+
.modal-dialog {
|
140
|
+
max-width: $modal-md;
|
141
|
+
margin: $modal-dialog-margin-y-sm-up auto;
|
142
|
+
}
|
143
|
+
|
144
|
+
.modal-content {
|
145
|
+
@include box-shadow($modal-content-box-shadow-sm-up);
|
146
|
+
}
|
147
|
+
|
148
|
+
.modal-sm { max-width: $modal-sm; }
|
149
|
+
}
|
150
|
+
|
151
|
+
@include media-breakpoint-up(lg) {
|
152
|
+
.modal-lg { max-width: $modal-lg; }
|
153
|
+
}
|