jekyll-bootstrap 4.0.0.pre.beta.2.2 → 4.0.0

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.
Files changed (44) hide show
  1. checksums.yaml +5 -5
  2. data/_includes/head.html +0 -2
  3. data/_sass/_alert.scss +3 -1
  4. data/_sass/_button-group.scss +31 -72
  5. data/_sass/_buttons.scss +26 -19
  6. data/_sass/_card.scss +23 -12
  7. data/_sass/_carousel.scss +2 -2
  8. data/_sass/_close.scss +6 -1
  9. data/_sass/_code.scss +4 -12
  10. data/_sass/_custom-forms.scss +124 -84
  11. data/_sass/_dropdown.scss +30 -2
  12. data/_sass/_forms.scss +46 -71
  13. data/_sass/_functions.scss +4 -4
  14. data/_sass/_images.scss +0 -1
  15. data/_sass/_input-group.scss +99 -126
  16. data/_sass/_list-group.scss +2 -1
  17. data/_sass/_modal.scss +24 -9
  18. data/_sass/_nav.scss +2 -2
  19. data/_sass/_navbar.scss +8 -3
  20. data/_sass/_pagination.scss +32 -19
  21. data/_sass/_popover.scss +106 -117
  22. data/_sass/_print.scss +17 -3
  23. data/_sass/_progress.scss +4 -1
  24. data/_sass/_reboot.scss +3 -25
  25. data/_sass/_tables.scss +1 -1
  26. data/_sass/_tooltip.scss +65 -57
  27. data/_sass/_type.scss +2 -2
  28. data/_sass/_variables.scss +174 -108
  29. data/_sass/bootstrap-grid.scss +4 -7
  30. data/_sass/bootstrap-reboot.scss +3 -3
  31. data/_sass/bootstrap.scss +4 -4
  32. data/_sass/mixins/_background-variant.scss +2 -1
  33. data/_sass/mixins/_breakpoints.scss +11 -7
  34. data/_sass/mixins/_buttons.scss +37 -22
  35. data/_sass/mixins/_caret.scss +30 -0
  36. data/_sass/mixins/_forms.scss +48 -19
  37. data/_sass/mixins/_grid-framework.scss +5 -7
  38. data/_sass/mixins/_hover.scss +24 -46
  39. data/_sass/mixins/_list-group.scss +10 -13
  40. data/_sass/mixins/_screen-reader.scss +1 -1
  41. data/_sass/mixins/_text-hide.scss +1 -0
  42. data/_sass/utilities/_borders.scss +6 -1
  43. data/_sass/utilities/_display.scss +10 -28
  44. metadata +5 -19
@@ -56,14 +56,14 @@
56
56
 
57
57
  $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
58
58
 
59
- @if ($yiq >= 150) {
60
- @return #111;
59
+ @if ($yiq >= $yiq-contrasted-threshold) {
60
+ @return $yiq-text-dark;
61
61
  } @else {
62
- @return #fff;
62
+ @return $yiq-text-light;
63
63
  }
64
64
  }
65
65
 
66
- // Retreive color Sass maps
66
+ // Retrieve color Sass maps
67
67
  @function color($key: "blue") {
68
68
  @return map-get($colors, $key);
69
69
  }
@@ -16,7 +16,6 @@
16
16
  background-color: $thumbnail-bg;
17
17
  border: $thumbnail-border-width solid $thumbnail-border-color;
18
18
  @include border-radius($thumbnail-border-radius);
19
- @include transition($thumbnail-transition);
20
19
  @include box-shadow($thumbnail-box-shadow);
21
20
 
22
21
  // Keep them at most 100% wide
@@ -7,89 +7,102 @@
7
7
  .input-group {
8
8
  position: relative;
9
9
  display: flex;
10
+ flex-wrap: wrap; // For form validation feedback
10
11
  align-items: stretch;
11
12
  width: 100%;
12
13
 
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;
14
+ > .form-control,
15
+ > .custom-select,
16
+ > .custom-file {
17
+ position: relative; // For focus state's z-index
18
18
  flex: 1 1 auto;
19
19
  // Add width 1% and flex-basis auto to ensure that button will not wrap out
20
20
  // the column. Applies to IE Edge+ and Firefox. Chrome does not require this.
21
21
  width: 1%;
22
22
  margin-bottom: 0;
23
23
 
24
- // Bring the "active" form control to the front
25
- @include hover-focus-active {
24
+ // Bring the "active" form control to the top of surrounding elements
25
+ &:focus {
26
26
  z-index: 3;
27
27
  }
28
+
29
+ + .form-control,
30
+ + .custom-select,
31
+ + .custom-file {
32
+ margin-left: -$input-border-width;
33
+ }
28
34
  }
29
- }
30
35
 
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);
36
+ > .form-control,
37
+ > .custom-select {
38
+ &:not(:last-child) { @include border-right-radius(0); }
39
+ &:not(:first-child) { @include border-left-radius(0); }
38
40
  }
39
- }
40
41
 
41
- .input-group-addon,
42
- .input-group-btn {
43
- white-space: nowrap;
42
+ // Custom file inputs have more complex markup, thus requiring different
43
+ // border-radius overrides.
44
+ > .custom-file {
45
+ display: flex;
46
+ align-items: center;
47
+
48
+ &:not(:last-child) .custom-file-label,
49
+ &:not(:last-child) .custom-file-label::before { @include border-right-radius(0); }
50
+ &:not(:first-child) .custom-file-label,
51
+ &:not(:first-child) .custom-file-label::before { @include border-left-radius(0); }
52
+ }
44
53
  }
45
54
 
46
55
 
47
- // Sizing options
56
+ // Prepend and append
48
57
  //
49
- // Remix the default form control sizing classes into new ones for easier
50
- // manipulation.
58
+ // While it requires one extra layer of HTML for each, dedicated prepend and
59
+ // append elements allow us to 1) be less clever, 2) simplify our selectors, and
60
+ // 3) support HTML5 form validation.
51
61
 
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;
62
+ .input-group-prepend,
63
+ .input-group-append {
64
+ display: flex;
65
+
66
+ // Ensure buttons are always above inputs for more visually pleasing borders.
67
+ // This isn't needed for `.input-group-text` since it shares the same border-color
68
+ // as our inputs.
69
+ .btn {
70
+ position: relative;
71
+ z-index: 2;
72
+ }
73
+
74
+ .btn + .btn,
75
+ .btn + .input-group-text,
76
+ .input-group-text + .input-group-text,
77
+ .input-group-text + .btn {
78
+ margin-left: -$input-border-width;
79
+ }
61
80
  }
62
81
 
82
+ .input-group-prepend { margin-right: -$input-border-width; }
83
+ .input-group-append { margin-left: -$input-border-width; }
63
84
 
85
+
86
+ // Textual addons
64
87
  //
65
- // Text input groups
66
- //
88
+ // Serves as a catch-all element for any text or radio/checkbox input you wish
89
+ // to prepend or append to an input.
67
90
 
68
- .input-group-addon {
69
- padding: $input-btn-padding-y $input-btn-padding-x;
91
+ .input-group-text {
92
+ display: flex;
93
+ align-items: center;
94
+ padding: $input-padding-y $input-padding-x;
70
95
  margin-bottom: 0; // Allow use of <label> elements by overriding our default margin-bottom
71
96
  font-size: $font-size-base; // Match inputs
72
97
  font-weight: $font-weight-normal;
73
- line-height: $input-btn-line-height;
98
+ line-height: $input-line-height;
74
99
  color: $input-group-addon-color;
75
100
  text-align: center;
101
+ white-space: nowrap;
76
102
  background-color: $input-group-addon-bg;
77
- border: $input-btn-border-width solid $input-group-addon-border-color;
103
+ border: $input-border-width solid $input-group-addon-border-color;
78
104
  @include border-radius($input-border-radius);
79
105
 
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
106
  // Nuke default margins from checkboxes and radios to vertically center within.
94
107
  input[type="radio"],
95
108
  input[type="checkbox"] {
@@ -98,89 +111,49 @@
98
111
  }
99
112
 
100
113
 
114
+ // Sizing
101
115
  //
102
- // Reset rounded corners
103
- //
116
+ // Remix the default form control sizing classes into new ones for easier
117
+ // manipulation.
104
118
 
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;
119
+ .input-group-lg > .form-control,
120
+ .input-group-lg > .input-group-prepend > .input-group-text,
121
+ .input-group-lg > .input-group-append > .input-group-text,
122
+ .input-group-lg > .input-group-prepend > .btn,
123
+ .input-group-lg > .input-group-append > .btn {
124
+ @extend .form-control-lg;
128
125
  }
129
126
 
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;
127
+ .input-group-sm > .form-control,
128
+ .input-group-sm > .input-group-prepend > .input-group-text,
129
+ .input-group-sm > .input-group-append > .input-group-text,
130
+ .input-group-sm > .input-group-prepend > .btn,
131
+ .input-group-sm > .input-group-append > .btn {
132
+ @extend .form-control-sm;
133
+ }
141
134
 
142
- // Negative margin for spacing, position for bringing hovered/focused/actived
143
- // element above the siblings.
144
- > .btn {
145
- position: relative;
146
135
 
147
- + .btn {
148
- margin-left: (-$input-btn-border-width);
149
- }
136
+ // Prepend and append rounded corners
137
+ //
138
+ // These rulesets must come after the sizing ones to properly override sm and lg
139
+ // border-radius values when extending. They're more specific than we'd like
140
+ // with the `.input-group >` part, but without it, we cannot override the sizing.
150
141
 
151
- // Bring the "active" button to the front
152
- @include hover-focus-active {
153
- z-index: 3;
154
- }
155
- }
156
142
 
157
- &:first-child > .btn + .btn {
158
- margin-left: 0;
159
- }
143
+ .input-group > .input-group-prepend > .btn,
144
+ .input-group > .input-group-prepend > .input-group-text,
145
+ .input-group > .input-group-append:not(:last-child) > .btn,
146
+ .input-group > .input-group-append:not(:last-child) > .input-group-text,
147
+ .input-group > .input-group-append:last-child > .btn:not(:last-child):not(.dropdown-toggle),
148
+ .input-group > .input-group-append:last-child > .input-group-text:not(:last-child) {
149
+ @include border-right-radius(0);
150
+ }
160
151
 
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
- }
152
+ .input-group > .input-group-append > .btn,
153
+ .input-group > .input-group-append > .input-group-text,
154
+ .input-group > .input-group-prepend:not(:first-child) > .btn,
155
+ .input-group > .input-group-prepend:not(:first-child) > .input-group-text,
156
+ .input-group > .input-group-prepend:first-child > .btn:not(:first-child),
157
+ .input-group > .input-group-prepend:first-child > .input-group-text:not(:first-child) {
158
+ @include border-left-radius(0);
186
159
  }
@@ -59,6 +59,7 @@
59
59
  }
60
60
 
61
61
  @include hover-focus {
62
+ z-index: 1; // Place hover/active items above their siblings for proper border styling
62
63
  text-decoration: none;
63
64
  }
64
65
 
@@ -87,7 +88,7 @@
87
88
  .list-group-item {
88
89
  border-right: 0;
89
90
  border-left: 0;
90
- border-radius: 0;
91
+ @include border-radius(0);
91
92
  }
92
93
 
93
94
  &:first-child {
@@ -26,16 +26,10 @@
26
26
  // gnarly iOS Safari bug: https://bugs.webkit.org/show_bug.cgi?id=158342
27
27
  // See also https://github.com/twbs/bootstrap/issues/17695
28
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%);
29
+ .modal-open & {
30
+ overflow-x: hidden;
31
+ overflow-y: auto;
33
32
  }
34
- &.show .modal-dialog { transform: translate(0, 0); }
35
- }
36
- .modal-open .modal {
37
- overflow-x: hidden;
38
- overflow-y: auto;
39
33
  }
40
34
 
41
35
  // Shell div to position the modal with bottom padding
@@ -45,6 +39,21 @@
45
39
  margin: $modal-dialog-margin;
46
40
  // allow clicks to pass through for custom click handling to close modal
47
41
  pointer-events: none;
42
+
43
+ // When fading in the modal, animate it to slide down
44
+ .modal.fade & {
45
+ @include transition($modal-transition);
46
+ transform: translate(0, -25%);
47
+ }
48
+ .modal.show & {
49
+ transform: translate(0, 0);
50
+ }
51
+ }
52
+
53
+ .modal-dialog-centered {
54
+ display: flex;
55
+ align-items: center;
56
+ min-height: calc(100% - (#{$modal-dialog-margin} * 2));
48
57
  }
49
58
 
50
59
  // Actual modal
@@ -52,6 +61,7 @@
52
61
  position: relative;
53
62
  display: flex;
54
63
  flex-direction: column;
64
+ width: 100%; // Ensure `.modal-content` extends the full width of the parent `.modal-dialog`
55
65
  // counteract the pointer-events: none; in the .modal-dialog
56
66
  pointer-events: auto;
57
67
  background-color: $modal-content-bg;
@@ -141,11 +151,16 @@
141
151
  margin: $modal-dialog-margin-y-sm-up auto;
142
152
  }
143
153
 
154
+ .modal-dialog-centered {
155
+ min-height: calc(100% - (#{$modal-dialog-margin-y-sm-up} * 2));
156
+ }
157
+
144
158
  .modal-content {
145
159
  @include box-shadow($modal-content-box-shadow-sm-up);
146
160
  }
147
161
 
148
162
  .modal-sm { max-width: $modal-sm; }
163
+
149
164
  }
150
165
 
151
166
  @include media-breakpoint-up(lg) {
@@ -41,7 +41,7 @@
41
41
  @include border-top-radius($nav-tabs-border-radius);
42
42
 
43
43
  @include hover-focus {
44
- border-color: $nav-tabs-link-hover-border-color $nav-tabs-link-hover-border-color $nav-tabs-border-color;
44
+ border-color: $nav-tabs-link-hover-border-color;
45
45
  }
46
46
 
47
47
  &.disabled {
@@ -55,7 +55,7 @@
55
55
  .nav-item.show .nav-link {
56
56
  color: $nav-tabs-link-active-color;
57
57
  background-color: $nav-tabs-link-active-bg;
58
- border-color: $nav-tabs-link-active-border-color $nav-tabs-link-active-border-color $nav-tabs-link-active-bg;
58
+ border-color: $nav-tabs-link-active-border-color;
59
59
  }
60
60
 
61
61
  .dropdown-menu {
@@ -109,13 +109,18 @@
109
109
  padding: $navbar-toggler-padding-y $navbar-toggler-padding-x;
110
110
  font-size: $navbar-toggler-font-size;
111
111
  line-height: 1;
112
- background: transparent; // remove default button style
112
+ background-color: transparent; // remove default button style
113
113
  border: $border-width solid transparent; // remove default button style
114
114
  @include border-radius($navbar-toggler-border-radius);
115
115
 
116
116
  @include hover-focus {
117
117
  text-decoration: none;
118
118
  }
119
+
120
+ // Opinionated: add "hand" cursor to non-disabled .navbar-toggler elements
121
+ &:not(:disabled):not(.disabled) {
122
+ cursor: pointer;
123
+ }
119
124
  }
120
125
 
121
126
  // Keep as a separate element so folks can easily override it with another icon
@@ -163,8 +168,8 @@
163
168
  }
164
169
 
165
170
  .nav-link {
166
- padding-right: .5rem;
167
- padding-left: .5rem;
171
+ padding-right: $navbar-nav-link-padding-x;
172
+ padding-left: $navbar-nav-link-padding-x;
168
173
  }
169
174
  }
170
175
 
@@ -4,6 +4,35 @@
4
4
  @include border-radius();
5
5
  }
6
6
 
7
+ .page-link {
8
+ position: relative;
9
+ display: block;
10
+ padding: $pagination-padding-y $pagination-padding-x;
11
+ margin-left: -$pagination-border-width;
12
+ line-height: $pagination-line-height;
13
+ color: $pagination-color;
14
+ background-color: $pagination-bg;
15
+ border: $pagination-border-width solid $pagination-border-color;
16
+
17
+ &:hover {
18
+ color: $pagination-hover-color;
19
+ text-decoration: none;
20
+ background-color: $pagination-hover-bg;
21
+ border-color: $pagination-hover-border-color;
22
+ }
23
+
24
+ &:focus {
25
+ z-index: 2;
26
+ outline: 0;
27
+ box-shadow: $pagination-focus-box-shadow;
28
+ }
29
+
30
+ // Opinionated: add "hand" cursor to non-disabled .page-link elements
31
+ &:not(:disabled):not(.disabled) {
32
+ cursor: pointer;
33
+ }
34
+ }
35
+
7
36
  .page-item {
8
37
  &:first-child {
9
38
  .page-link {
@@ -18,7 +47,7 @@
18
47
  }
19
48
 
20
49
  &.active .page-link {
21
- z-index: 2;
50
+ z-index: 1;
22
51
  color: $pagination-active-color;
23
52
  background-color: $pagination-active-bg;
24
53
  border-color: $pagination-active-border-color;
@@ -27,29 +56,13 @@
27
56
  &.disabled .page-link {
28
57
  color: $pagination-disabled-color;
29
58
  pointer-events: none;
59
+ // Opinionated: remove the "hand" cursor set previously for .page-link
60
+ cursor: auto;
30
61
  background-color: $pagination-disabled-bg;
31
62
  border-color: $pagination-disabled-border-color;
32
63
  }
33
64
  }
34
65
 
35
- .page-link {
36
- position: relative;
37
- display: block;
38
- padding: $pagination-padding-y $pagination-padding-x;
39
- margin-left: -$pagination-border-width;
40
- line-height: $pagination-line-height;
41
- color: $pagination-color;
42
- background-color: $pagination-bg;
43
- border: $pagination-border-width solid $pagination-border-color;
44
-
45
- @include hover-focus {
46
- color: $pagination-hover-color;
47
- text-decoration: none;
48
- background-color: $pagination-hover-bg;
49
- border-color: $pagination-hover-border-color;
50
- }
51
- }
52
-
53
66
 
54
67
  //
55
68
  // Sizing