bootstrap 4.0.0.alpha3 → 4.0.0.alpha3.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bootstrap might be problematic. Click here for more details.

Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -2
  3. data/CHANGELOG.md +5 -0
  4. data/LICENSE +1 -1
  5. data/README.md +3 -3
  6. data/Rakefile +11 -8
  7. data/assets/javascripts/bootstrap.js +61 -48
  8. data/assets/javascripts/bootstrap.min.js +4 -4
  9. data/assets/javascripts/bootstrap/alert.js +2 -2
  10. data/assets/javascripts/bootstrap/button.js +4 -2
  11. data/assets/javascripts/bootstrap/carousel.js +10 -6
  12. data/assets/javascripts/bootstrap/collapse.js +2 -2
  13. data/assets/javascripts/bootstrap/dropdown.js +12 -8
  14. data/assets/javascripts/bootstrap/modal.js +9 -12
  15. data/assets/javascripts/bootstrap/popover.js +2 -2
  16. data/assets/javascripts/bootstrap/scrollspy.js +4 -3
  17. data/assets/javascripts/bootstrap/tab.js +2 -2
  18. data/assets/javascripts/bootstrap/tooltip.js +2 -2
  19. data/assets/javascripts/bootstrap/util.js +8 -3
  20. data/assets/stylesheets/_bootstrap-grid.scss +2 -41
  21. data/assets/stylesheets/_bootstrap-reboot.scss +1 -0
  22. data/assets/stylesheets/_bootstrap.scss +5 -7
  23. data/assets/stylesheets/bootstrap/_alert.scss +1 -10
  24. data/assets/stylesheets/bootstrap/_breadcrumb.scss +25 -10
  25. data/assets/stylesheets/bootstrap/_button-group.scss +22 -12
  26. data/assets/stylesheets/bootstrap/_buttons.scss +14 -11
  27. data/assets/stylesheets/bootstrap/_card.scss +59 -30
  28. data/assets/stylesheets/bootstrap/_carousel.scss +25 -24
  29. data/assets/stylesheets/bootstrap/_close.scss +3 -0
  30. data/assets/stylesheets/bootstrap/_code.scss +6 -7
  31. data/assets/stylesheets/bootstrap/_custom-forms.scss +144 -105
  32. data/assets/stylesheets/bootstrap/_custom.scss +4 -0
  33. data/assets/stylesheets/bootstrap/_dropdown.scss +10 -24
  34. data/assets/stylesheets/bootstrap/_forms.scss +97 -185
  35. data/assets/stylesheets/bootstrap/_grid.scss +9 -46
  36. data/assets/stylesheets/bootstrap/_images.scss +3 -4
  37. data/assets/stylesheets/bootstrap/_input-group.scss +25 -26
  38. data/assets/stylesheets/bootstrap/_list-group.scss +33 -50
  39. data/assets/stylesheets/bootstrap/_media.scss +4 -5
  40. data/assets/stylesheets/bootstrap/_mixins.scss +1 -2
  41. data/assets/stylesheets/bootstrap/_modal.scss +13 -27
  42. data/assets/stylesheets/bootstrap/_nav.scss +18 -23
  43. data/assets/stylesheets/bootstrap/_navbar.scss +54 -26
  44. data/assets/stylesheets/bootstrap/_normalize.scss +164 -168
  45. data/assets/stylesheets/bootstrap/_pagination.scss +1 -1
  46. data/assets/stylesheets/bootstrap/_popover.scss +12 -5
  47. data/assets/stylesheets/bootstrap/_print.scss +93 -65
  48. data/assets/stylesheets/bootstrap/_progress.scss +43 -54
  49. data/assets/stylesheets/bootstrap/_reboot.scss +59 -13
  50. data/assets/stylesheets/bootstrap/_tables.scss +32 -27
  51. data/assets/stylesheets/bootstrap/_tags.scss +77 -0
  52. data/assets/stylesheets/bootstrap/_tooltip.scss +7 -5
  53. data/assets/stylesheets/bootstrap/_type.scss +22 -29
  54. data/assets/stylesheets/bootstrap/_utilities.scss +9 -95
  55. data/assets/stylesheets/bootstrap/_variables.scss +302 -139
  56. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +1 -1
  57. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +22 -9
  58. data/assets/stylesheets/bootstrap/mixins/_cards.scss +8 -2
  59. data/assets/stylesheets/bootstrap/mixins/_forms.scss +7 -4
  60. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +4 -4
  61. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +37 -11
  62. data/assets/stylesheets/bootstrap/mixins/_grid.scss +18 -9
  63. data/assets/stylesheets/bootstrap/mixins/_hover.scss +10 -9
  64. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +2 -3
  65. data/assets/stylesheets/bootstrap/mixins/_progress.scss +5 -0
  66. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -3
  67. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +1 -1
  68. data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +3 -3
  69. data/assets/stylesheets/bootstrap/mixins/{_label.scss → _tag.scss} +2 -2
  70. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +1 -1
  71. data/assets/stylesheets/bootstrap/{_utilities-background.scss → utilities/_background.scss} +1 -4
  72. data/assets/stylesheets/bootstrap/utilities/_clearfix.scss +3 -0
  73. data/assets/stylesheets/bootstrap/utilities/_display.scss +13 -0
  74. data/assets/stylesheets/bootstrap/utilities/_flex.scss +37 -0
  75. data/assets/stylesheets/bootstrap/utilities/_pulls.scss +13 -0
  76. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +11 -0
  77. data/assets/stylesheets/bootstrap/{_utilities-spacing.scss → utilities/_spacing.scss} +4 -0
  78. data/assets/stylesheets/bootstrap/utilities/_text.scss +51 -0
  79. data/assets/stylesheets/bootstrap/{_utilities-responsive.scss → utilities/_visibility.scss} +9 -1
  80. data/bootstrap.gemspec +1 -1
  81. data/lib/bootstrap.rb +6 -6
  82. data/lib/bootstrap/engine.rb +2 -0
  83. data/lib/bootstrap/version.rb +2 -2
  84. data/tasks/updater/network.rb +3 -1
  85. data/templates/project/_bootstrap-variables.scss +303 -140
  86. data/test/dummy_rails/config/boot.rb +1 -1
  87. data/test/gemfiles/rails_4_2.gemfile +4 -4
  88. data/test/gemfiles/rails_5_0.gemfile +12 -0
  89. data/test/rails_test.rb +1 -1
  90. data/test/support/dummy_rails_integration.rb +2 -2
  91. metadata +19 -14
  92. data/assets/stylesheets/bootstrap/_labels.scss +0 -77
  93. data/assets/stylesheets/bootstrap/_pager.scss +0 -57
  94. data/assets/stylesheets/bootstrap/mixins/_center-block.scss +0 -7
  95. data/test/gemfiles/rails_head.gemfile +0 -20
@@ -2,23 +2,24 @@
2
2
  //
3
3
  // Set the container width, and override it for fixed navbars in media queries.
4
4
 
5
- .container {
6
- @include make-container();
7
- @include make-container-max-widths();
8
-
5
+ @if $enable-grid-classes {
6
+ .container {
7
+ @include make-container();
8
+ @include make-container-max-widths();
9
+ }
9
10
  }
10
11
 
11
-
12
12
  // Fluid container
13
13
  //
14
14
  // Utilizes the mixin meant for fixed width containers, but without any defined
15
15
  // width for fluid, full width layouts.
16
16
 
17
- .container-fluid {
18
- @include make-container();
17
+ @if $enable-grid-classes {
18
+ .container-fluid {
19
+ @include make-container();
20
+ }
19
21
  }
20
22
 
21
-
22
23
  // Row
23
24
  //
24
25
  // Rows contain and clear the floats of your columns.
@@ -29,7 +30,6 @@
29
30
  }
30
31
  }
31
32
 
32
-
33
33
  // Columns
34
34
  //
35
35
  // Common styles for small and large grid columns
@@ -37,40 +37,3 @@
37
37
  @if $enable-grid-classes {
38
38
  @include make-grid-columns();
39
39
  }
40
-
41
-
42
- // Flex variation
43
- //
44
- // Custom styles for additional flex alignment options.
45
-
46
- @if $enable-flex and $enable-grid-classes {
47
-
48
- // Flex column reordering
49
-
50
- @each $breakpoint in map-keys($grid-breakpoints) {
51
- @include media-breakpoint-up($breakpoint) {
52
- .col-#{$breakpoint}-first { order: -1; }
53
- .col-#{$breakpoint}-last { order: 1; }
54
- }
55
- }
56
-
57
- // Alignment for every column in row
58
-
59
- @each $breakpoint in map-keys($grid-breakpoints) {
60
- @include media-breakpoint-up($breakpoint) {
61
- .row-#{$breakpoint}-top { align-items: flex-start; }
62
- .row-#{$breakpoint}-center { align-items: center; }
63
- .row-#{$breakpoint}-bottom { align-items: flex-end; }
64
- }
65
- }
66
-
67
- // Alignment per column
68
-
69
- @each $breakpoint in map-keys($grid-breakpoints) {
70
- @include media-breakpoint-up($breakpoint) {
71
- .col-#{$breakpoint}-top { align-self: flex-start; }
72
- .col-#{$breakpoint}-center { align-self: center; }
73
- .col-#{$breakpoint}-bottom { align-self: flex-end; }
74
- }
75
- }
76
- }
@@ -17,12 +17,11 @@
17
17
  // Image thumbnails
18
18
  .img-thumbnail {
19
19
  padding: $thumbnail-padding;
20
- line-height: $line-height;
21
20
  background-color: $thumbnail-bg;
22
21
  border: $thumbnail-border-width solid $thumbnail-border-color;
23
- border-radius: $thumbnail-border-radius;
22
+ @include border-radius($thumbnail-border-radius);
24
23
  transition: all .2s ease-in-out;
25
- @include box-shadow(0 1px 2px rgba(0,0,0,.075));
24
+ @include box-shadow($thumbnail-box-shadow);
26
25
 
27
26
  // Keep them at most 100% wide
28
27
  @include img-fluid(inline-block);
@@ -48,6 +47,6 @@
48
47
  }
49
48
 
50
49
  .figure-caption {
51
- font-size: 90%;
50
+ font-size: $figure-caption-font-size;
52
51
  color: $gray-light;
53
52
  }
@@ -4,6 +4,7 @@
4
4
 
5
5
  .input-group {
6
6
  position: relative;
7
+ width: 100%;
7
8
 
8
9
  @if $enable-flex {
9
10
  display: flex;
@@ -39,9 +40,7 @@
39
40
  .input-group-addon,
40
41
  .input-group-btn,
41
42
  .input-group .form-control {
42
- @if $enable-flex {
43
- // do nothing
44
- } @else {
43
+ @if not $enable-flex {
45
44
  display: table-cell;
46
45
  }
47
46
 
@@ -52,9 +51,7 @@
52
51
 
53
52
  .input-group-addon,
54
53
  .input-group-btn {
55
- @if $enable-flex {
56
- // do nothing
57
- } @else {
54
+ @if not $enable-flex {
58
55
  width: 1%;
59
56
  }
60
57
  white-space: nowrap;
@@ -85,9 +82,10 @@
85
82
 
86
83
  .input-group-addon {
87
84
  padding: $input-padding-y $input-padding-x;
85
+ margin-bottom: 0; // Allow use of <label> elements by overriding our default margin-bottom
88
86
  font-size: $font-size-base;
89
87
  font-weight: normal;
90
- line-height: 1;
88
+ line-height: $input-line-height;
91
89
  color: $input-color;
92
90
  text-align: center;
93
91
  background-color: $input-group-addon-bg;
@@ -106,11 +104,13 @@
106
104
  @include border-radius($border-radius-lg);
107
105
  }
108
106
 
107
+ // scss-lint:disable QualifyingElement
109
108
  // Nuke default margins from checkboxes and radios to vertically center within.
110
109
  input[type="radio"],
111
110
  input[type="checkbox"] {
112
111
  margin-top: 0;
113
112
  }
113
+ // scss-lint:enable QualifyingElement
114
114
  }
115
115
 
116
116
 
@@ -118,32 +118,31 @@
118
118
  // Reset rounded corners
119
119
  //
120
120
 
121
- .input-group .form-control:first-child,
122
- .input-group-addon:first-child,
123
- .input-group-btn:first-child > .btn,
124
- .input-group-btn:first-child > .btn-group > .btn,
125
- .input-group-btn:first-child > .dropdown-toggle,
126
- .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
127
- .input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
121
+ .input-group .form-control:not(:last-child),
122
+ .input-group-addon:not(:last-child),
123
+ .input-group-btn:not(:last-child) > .btn,
124
+ .input-group-btn:not(:last-child) > .btn-group > .btn,
125
+ .input-group-btn:not(:last-child) > .dropdown-toggle,
126
+ .input-group-btn:not(:first-child) > .btn:not(:last-child):not(.dropdown-toggle),
127
+ .input-group-btn:not(:first-child) > .btn-group:not(:last-child) > .btn {
128
128
  @include border-right-radius(0);
129
129
  }
130
- .input-group-addon:first-child {
130
+ .input-group-addon:not(:last-child) {
131
131
  border-right: 0;
132
132
  }
133
- .input-group .form-control:last-child,
134
- .input-group-addon:last-child,
135
- .input-group-btn:last-child > .btn,
136
- .input-group-btn:last-child > .btn-group > .btn,
137
- .input-group-btn:last-child > .dropdown-toggle,
138
- .input-group-btn:first-child > .btn:not(:first-child),
139
- .input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
133
+ .input-group .form-control:not(:first-child),
134
+ .input-group-addon:not(:first-child),
135
+ .input-group-btn:not(:first-child) > .btn,
136
+ .input-group-btn:not(:first-child) > .btn-group > .btn,
137
+ .input-group-btn:not(:first-child) > .dropdown-toggle,
138
+ .input-group-btn:not(:last-child) > .btn:not(:first-child),
139
+ .input-group-btn:not(:last-child) > .btn-group:not(:first-child) > .btn {
140
140
  @include border-left-radius(0);
141
141
  }
142
- .input-group-addon:last-child {
142
+ .form-control + .input-group-addon:not(:first-child) {
143
143
  border-left: 0;
144
144
  }
145
145
 
146
-
147
146
  //
148
147
  // Button input groups
149
148
  //
@@ -169,13 +168,13 @@
169
168
  }
170
169
 
171
170
  // Negative margin to only have a single, shared border between the two
172
- &:first-child {
171
+ &:not(:last-child) {
173
172
  > .btn,
174
173
  > .btn-group {
175
174
  margin-right: (-$input-btn-border-width);
176
175
  }
177
176
  }
178
- &:last-child {
177
+ &:not(:first-child) {
179
178
  > .btn,
180
179
  > .btn-group {
181
180
  z-index: 2;
@@ -16,67 +16,21 @@
16
16
  .list-group-item {
17
17
  position: relative;
18
18
  display: block;
19
- padding: .75rem 1.25rem;
19
+ padding: $list-group-item-padding-y $list-group-item-padding-x;
20
20
  // Place the border on the list items and negative margin up for better styling
21
21
  margin-bottom: -$list-group-border-width;
22
22
  background-color: $list-group-bg;
23
23
  border: $list-group-border-width solid $list-group-border-color;
24
24
 
25
- // Round the first and last items
26
25
  &:first-child {
27
26
  @include border-top-radius($list-group-border-radius);
28
27
  }
28
+
29
29
  &:last-child {
30
30
  margin-bottom: 0;
31
31
  @include border-bottom-radius($list-group-border-radius);
32
32
  }
33
- }
34
-
35
- .list-group-flush {
36
- .list-group-item {
37
- border-width: $list-group-border-width 0;
38
- border-radius: 0;
39
- }
40
-
41
- &:first-child {
42
- .list-group-item:first-child {
43
- border-top: 0;
44
- }
45
- }
46
-
47
- &:last-child {
48
- .list-group-item:last-child {
49
- border-bottom: 0;
50
- }
51
- }
52
- }
53
-
54
-
55
- // Interactive list items
56
- //
57
- // Use anchor or button elements instead of `li`s or `div`s to create interactive
58
- // list items. Includes an extra `.active` modifier class for selected items.
59
-
60
- a.list-group-item,
61
- button.list-group-item {
62
- width: 100%;
63
- color: $list-group-link-color;
64
- text-align: inherit;
65
-
66
- .list-group-item-heading {
67
- color: $list-group-link-heading-color;
68
- }
69
33
 
70
- // Hover state
71
- @include hover-focus {
72
- color: $list-group-link-hover-color;
73
- text-decoration: none;
74
- background-color: $list-group-hover-bg;
75
- }
76
- }
77
-
78
- .list-group-item {
79
- // Disabled state
80
34
  &.disabled {
81
35
  @include plain-hover-focus {
82
36
  color: $list-group-disabled-color;
@@ -93,11 +47,11 @@ button.list-group-item {
93
47
  }
94
48
  }
95
49
 
96
- // Active class on item itself, not parent
97
50
  &.active {
98
51
  @include plain-hover-focus {
99
52
  z-index: 2; // Place active items above their siblings for proper border styling
100
53
  color: $list-group-active-color;
54
+ text-decoration: none; // Repeat here because it inherits global a:hover otherwise
101
55
  background-color: $list-group-active-bg;
102
56
  border-color: $list-group-active-border;
103
57
 
@@ -114,6 +68,35 @@ button.list-group-item {
114
68
  }
115
69
  }
116
70
 
71
+ .list-group-flush {
72
+ .list-group-item {
73
+ border-radius: 0;
74
+ }
75
+ }
76
+
77
+
78
+ // Interactive list items
79
+ //
80
+ // Use anchor or button elements instead of `li`s or `div`s to create interactive
81
+ // list items. Includes an extra `.active` modifier class for selected items.
82
+
83
+ .list-group-item-action {
84
+ width: 100%; // For `<button>`s (anchors become 100% by default though)
85
+ color: $list-group-link-color;
86
+ text-align: inherit; // For `<button>`s (anchors inherit)
87
+
88
+ .list-group-item-heading {
89
+ color: $list-group-link-heading-color;
90
+ }
91
+
92
+ // Hover state
93
+ @include hover-focus {
94
+ color: $list-group-link-hover-color;
95
+ text-decoration: none;
96
+ background-color: $list-group-hover-bg;
97
+ }
98
+ }
99
+
117
100
 
118
101
  // Contextual variants
119
102
  //
@@ -132,7 +115,7 @@ button.list-group-item {
132
115
 
133
116
  .list-group-item-heading {
134
117
  margin-top: 0;
135
- margin-bottom: 5px;
118
+ margin-bottom: $list-group-item-heading-margin-bottom;
136
119
  }
137
120
  .list-group-item-text {
138
121
  margin-bottom: 0;
@@ -14,7 +14,7 @@
14
14
  }
15
15
  } @else {
16
16
  .media {
17
- margin-top: 15px;
17
+ margin-top: $media-margin-top;
18
18
 
19
19
  &:first-child {
20
20
  margin-top: 0;
@@ -23,7 +23,6 @@
23
23
  .media,
24
24
  .media-body {
25
25
  overflow: hidden;
26
- zoom: 1;
27
26
  }
28
27
  .media-body {
29
28
  width: 10000px;
@@ -62,11 +61,11 @@
62
61
  //
63
62
 
64
63
  .media-right {
65
- padding-left: 10px;
64
+ padding-left: $media-alignment-padding-x;
66
65
  }
67
66
 
68
67
  .media-left {
69
- padding-right: 10px;
68
+ padding-right: $media-alignment-padding-x;
70
69
  }
71
70
 
72
71
 
@@ -76,7 +75,7 @@
76
75
 
77
76
  .media-heading {
78
77
  margin-top: 0;
79
- margin-bottom: 5px;
78
+ margin-bottom: $media-heading-margin-bottom;
80
79
  }
81
80
 
82
81
 
@@ -18,7 +18,7 @@
18
18
  @import "mixins/breakpoints";
19
19
  @import "mixins/hover";
20
20
  @import "mixins/image";
21
- @import "mixins/label";
21
+ @import "mixins/tag";
22
22
  @import "mixins/reset-filter";
23
23
  @import "mixins/resize";
24
24
  @import "mixins/screen-reader";
@@ -48,7 +48,6 @@
48
48
 
49
49
  // // Layout
50
50
  @import "mixins/clearfix";
51
- @import "mixins/center-block";
52
51
  // @import "mixins/navbar-align";
53
52
  @import "mixins/grid-framework";
54
53
  @import "mixins/grid";
@@ -40,7 +40,7 @@
40
40
  .modal-dialog {
41
41
  position: relative;
42
42
  width: auto;
43
- margin: 10px;
43
+ margin: $modal-dialog-margin;
44
44
  }
45
45
 
46
46
  // Actual modal
@@ -48,9 +48,9 @@
48
48
  position: relative;
49
49
  background-color: $modal-content-bg;
50
50
  background-clip: padding-box;
51
- border: 1px solid $modal-content-border-color;
52
- border-radius: $border-radius-lg;
53
- @include box-shadow(0 3px 9px rgba(0,0,0,.5));
51
+ border: $modal-content-border-width solid $modal-content-border-color;
52
+ @include border-radius($border-radius-lg);
53
+ @include box-shadow($modal-content-xs-box-shadow);
54
54
  // Remove focus outline from opened modal
55
55
  outline: 0;
56
56
  }
@@ -74,7 +74,7 @@
74
74
  // Top section of the modal w/ title and dismiss
75
75
  .modal-header {
76
76
  padding: $modal-title-padding;
77
- border-bottom: 1px solid $modal-header-border-color;
77
+ border-bottom: $modal-header-border-width solid $modal-header-border-color;
78
78
  @include clearfix;
79
79
  }
80
80
  // Close icon
@@ -99,22 +99,8 @@
99
99
  .modal-footer {
100
100
  padding: $modal-inner-padding;
101
101
  text-align: right; // right align buttons
102
- border-top: 1px solid $modal-footer-border-color;
102
+ border-top: $modal-footer-border-width solid $modal-footer-border-color;
103
103
  @include clearfix(); // clear it in case folks use .pull-* classes on buttons
104
-
105
- // Properly space out buttons
106
- .btn + .btn {
107
- margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
108
- margin-left: 5px;
109
- }
110
- // but override that for button groups
111
- .btn-group .btn + .btn {
112
- margin-left: -1px;
113
- }
114
- // and override it for block buttons as well
115
- .btn-block + .btn-block {
116
- margin-left: 0;
117
- }
118
104
  }
119
105
 
120
106
  // Measure scrollbar width for padding body during modal show/hide
@@ -130,17 +116,17 @@
130
116
  @include media-breakpoint-up(sm) {
131
117
  // Automatically set modal's width for larger viewports
132
118
  .modal-dialog {
133
- width: $modal-md;
134
- margin: 30px auto;
119
+ max-width: $modal-md;
120
+ margin: $modal-dialog-sm-up-margin-y auto;
135
121
  }
122
+
136
123
  .modal-content {
137
- @include box-shadow(0 5px 15px rgba(0,0,0,.5));
124
+ @include box-shadow($modal-content-sm-up-box-shadow);
138
125
  }
139
126
 
140
- // Modal sizes
141
- .modal-sm { width: $modal-sm; }
127
+ .modal-sm { max-width: $modal-sm; }
142
128
  }
143
129
 
144
- @include media-breakpoint-up(md) {
145
- .modal-lg { width: $modal-lg; }
130
+ @include media-breakpoint-up(lg) {
131
+ .modal-lg { max-width: $modal-lg; }
146
132
  }