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
@@ -102,12 +102,12 @@
102
102
 
103
103
  // Set gradients for backgrounds
104
104
  &.left {
105
- @include gradient-horizontal($start-color: rgba(0,0,0,.5), $end-color: rgba(0,0,0,.0001));
105
+ @include gradient-x($start-color: rgba(0,0,0,.5), $end-color: rgba(0,0,0,.0001));
106
106
  }
107
107
  &.right {
108
108
  right: 0;
109
109
  left: auto;
110
- @include gradient-horizontal($start-color: rgba(0,0,0,.0001), $end-color: rgba(0,0,0,.5));
110
+ @include gradient-x($start-color: rgba(0,0,0,.0001), $end-color: rgba(0,0,0,.5));
111
111
  }
112
112
 
113
113
  // Hover/focus state
@@ -125,19 +125,19 @@
125
125
  top: 50%;
126
126
  z-index: 5;
127
127
  display: inline-block;
128
- width: 20px;
129
- height: 20px;
130
- margin-top: -10px;
128
+ width: $carousel-icon-width;
129
+ height: $carousel-icon-width;
130
+ margin-top: -($carousel-icon-width / 2);
131
131
  font-family: serif;
132
132
  line-height: 1;
133
133
  }
134
134
  .icon-prev {
135
135
  left: 50%;
136
- margin-left: -10px;
136
+ margin-left: -($carousel-icon-width / 2);
137
137
  }
138
138
  .icon-next {
139
139
  right: 50%;
140
- margin-right: -10px;
140
+ margin-right: -($carousel-icon-width / 2);
141
141
  }
142
142
 
143
143
  .icon-prev {
@@ -163,16 +163,16 @@
163
163
  bottom: 10px;
164
164
  left: 50%;
165
165
  z-index: 15;
166
- width: 60%;
166
+ width: $carousel-indicators-width;
167
167
  padding-left: 0;
168
- margin-left: -30%;
168
+ margin-left: -($carousel-indicators-width / 2);
169
169
  text-align: center;
170
170
  list-style: none;
171
171
 
172
172
  li {
173
173
  display: inline-block;
174
- width: 10px;
175
- height: 10px;
174
+ width: $carousel-indicator-size;
175
+ height: $carousel-indicator-size;
176
176
  margin: 1px;
177
177
  text-indent: -999px;
178
178
  cursor: pointer;
@@ -183,11 +183,12 @@
183
183
  // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer
184
184
  background-color: rgba(0,0,0,0); // IE9
185
185
  border: 1px solid $carousel-indicator-border-color;
186
- border-radius: 10px;
186
+ border-radius: $carousel-indicator-size;
187
187
  }
188
+
188
189
  .active {
189
- width: 12px;
190
- height: 12px;
190
+ width: $carousel-indicator-active-size;
191
+ height: $carousel-indicator-active-size;
191
192
  margin: 0;
192
193
  background-color: $carousel-indicator-active-bg;
193
194
  }
@@ -200,9 +201,9 @@
200
201
 
201
202
  .carousel-caption {
202
203
  position: absolute;
203
- right: 15%;
204
+ right: ((100% - $carousel-caption-width) / 2);
204
205
  bottom: 20px;
205
- left: 15%;
206
+ left: ((100% - $carousel-caption-width) / 2);
206
207
  z-index: 10;
207
208
  padding-top: 20px;
208
209
  padding-bottom: 20px;
@@ -225,23 +226,23 @@
225
226
  .carousel-control {
226
227
  .icon-prev,
227
228
  .icon-next {
228
- width: 30px;
229
- height: 30px;
230
- margin-top: -15px;
231
- font-size: 30px;
229
+ width: $carousel-control-sm-up-size;
230
+ height: $carousel-control-sm-up-size;
231
+ margin-top: -($carousel-control-sm-up-size / 2);
232
+ font-size: $carousel-control-sm-up-size;
232
233
  }
233
234
  .icon-prev {
234
- margin-left: -15px;
235
+ margin-left: -($carousel-control-sm-up-size / 2);
235
236
  }
236
237
  .icon-next {
237
- margin-right: -15px;
238
+ margin-right: -($carousel-control-sm-up-size / 2);
238
239
  }
239
240
  }
240
241
 
241
242
  // Show and left align the captions
242
243
  .carousel-caption {
243
- right: 20%;
244
- left: 20%;
244
+ right: ((100% - $carousel-caption-sm-up-width) / 2);
245
+ left: ((100% - $carousel-caption-sm-up-width) / 2);
245
246
  padding-bottom: 30px;
246
247
  }
247
248
 
@@ -19,6 +19,8 @@
19
19
  // iOS requires the button element instead of an anchor tag.
20
20
  // If you want the anchor version, it requires `href="#"`.
21
21
  // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
22
+
23
+ // scss-lint:disable QualifyingElement
22
24
  button.close {
23
25
  padding: 0;
24
26
  cursor: pointer;
@@ -26,3 +28,4 @@ button.close {
26
28
  border: 0;
27
29
  -webkit-appearance: none;
28
30
  }
31
+ // scss-lint:enable QualifyingElement
@@ -8,8 +8,8 @@ samp {
8
8
 
9
9
  // Inline code
10
10
  code {
11
- padding: .2rem .4rem;
12
- font-size: 90%;
11
+ padding: $code-padding-y $code-padding-x;
12
+ font-size: $code-font-size;
13
13
  color: $code-color;
14
14
  background-color: $code-bg;
15
15
  @include border-radius($border-radius);
@@ -17,12 +17,12 @@ code {
17
17
 
18
18
  // User input typically entered via keyboard
19
19
  kbd {
20
- padding: .2rem .4rem;
21
- font-size: 90%;
20
+ padding: $code-padding-y $code-padding-x;
21
+ font-size: $code-font-size;
22
22
  color: $kbd-color;
23
23
  background-color: $kbd-bg;
24
24
  @include border-radius($border-radius-sm);
25
- @include box-shadow(inset 0 -.1rem 0 rgba(0,0,0,.25));
25
+ @include box-shadow($kbd-box-shadow);
26
26
 
27
27
  kbd {
28
28
  padding: 0;
@@ -37,8 +37,7 @@ pre {
37
37
  display: block;
38
38
  margin-top: 0;
39
39
  margin-bottom: 1rem;
40
- font-size: 90%;
41
- line-height: $line-height;
40
+ font-size: $code-font-size;
42
41
  color: $pre-color;
43
42
 
44
43
  // Account for some code outputs that place code tags in pre tags
@@ -1,3 +1,5 @@
1
+ // scss-lint:disable PropertyCount
2
+
1
3
  // Embedded icons from Open Iconic.
2
4
  // Released under MIT and copyright 2014 Waybury.
3
5
  // http://useiconic.com/open
@@ -7,38 +9,49 @@
7
9
  //
8
10
  // Base class takes care of all the key behavioral aspects.
9
11
 
10
- .c-input {
12
+ .custom-control {
11
13
  position: relative;
12
14
  display: inline;
13
- padding-left: 1.5rem;
14
- color: #555;
15
+ padding-left: $custom-control-gutter;
15
16
  cursor: pointer;
16
17
 
17
- > input {
18
- position: absolute;
19
- z-index: -1; // Put the input behind the label so it doesn't overlay text
20
- opacity: 0;
18
+ + .custom-control {
19
+ margin-left: $custom-control-spacer-x;
20
+ }
21
+ }
21
22
 
22
- &:checked ~ .c-indicator {
23
- color: #fff;
24
- background-color: #0074d9;
25
- @include box-shadow(none);
26
- }
23
+ .custom-control-input {
24
+ position: absolute;
25
+ z-index: -1; // Put the input behind the label so it doesn't overlay text
26
+ opacity: 0;
27
27
 
28
- &:focus ~ .c-indicator {
29
- // the mixin is not used here to make sure there is feedback
30
- box-shadow: 0 0 0 .075rem #fff, 0 0 0 .2rem #0074d9;
31
- }
28
+ &:checked ~ .custom-control-indicator {
29
+ color: $custom-control-checked-indicator-color;
30
+ background-color: $custom-control-checked-indicator-bg;
31
+ @include box-shadow($custom-control-checked-indicator-box-shadow);
32
+ }
32
33
 
33
- &:active ~ .c-indicator {
34
- color: #fff;
35
- background-color: #84c6ff;
36
- @include box-shadow(none);
37
- }
34
+ &:focus ~ .custom-control-indicator {
35
+ // the mixin is not used here to make sure there is feedback
36
+ box-shadow: $custom-control-focus-indicator-box-shadow;
37
+ }
38
+
39
+ &:active ~ .custom-control-indicator {
40
+ color: $custom-control-active-indicator-color;
41
+ background-color: $custom-control-active-indicator-bg;
42
+ @include box-shadow($custom-control-active-indicator-box-shadow);
38
43
  }
39
44
 
40
- + .c-input {
41
- margin-left: 1rem;
45
+ &:disabled {
46
+ ~ .custom-control-indicator {
47
+ cursor: $custom-control-disabled-cursor;
48
+ background-color: $custom-control-disabled-indicator-bg;
49
+ }
50
+
51
+ ~ .custom-control-description {
52
+ color: $custom-control-disabled-description-color;
53
+ cursor: $custom-control-disabled-cursor;
54
+ }
42
55
  }
43
56
  }
44
57
 
@@ -46,42 +59,39 @@
46
59
  //
47
60
  // Generates a shadow element to create our makeshift checkbox/radio background.
48
61
 
49
- .c-indicator {
62
+ .custom-control-indicator {
50
63
  position: absolute;
51
- top: 0;
64
+ top: .0625rem;
52
65
  left: 0;
53
66
  display: block;
54
- width: 1rem;
55
- height: 1rem;
56
- font-size: 65%;
57
- line-height: 1rem;
58
- color: #eee;
59
- text-align: center;
67
+ width: $custom-control-indicator-size;
68
+ height: $custom-control-indicator-size;
69
+ pointer-events: none;
60
70
  user-select: none;
61
- background-color: #eee;
71
+ background-color: $custom-control-indicator-bg;
62
72
  background-repeat: no-repeat;
63
73
  background-position: center center;
64
- background-size: 50% 50%;
65
- @include box-shadow(inset 0 .125rem .125rem rgba(0,0,0,.1));
74
+ background-size: $custom-control-indicator-bg-size;
75
+ @include box-shadow($custom-control-indicator-box-shadow);
66
76
  }
67
77
 
68
78
  // Checkboxes
69
79
  //
70
80
  // Tweak just a few things for checkboxes.
71
81
 
72
- .c-checkbox {
73
- .c-indicator {
74
- border-radius: .25rem;
82
+ .custom-checkbox {
83
+ .custom-control-indicator {
84
+ @include border-radius($custom-checkbox-radius);
75
85
  }
76
86
 
77
- input:checked ~ .c-indicator {
78
- background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgOCA4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA4IDgiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTYuNCwxTDUuNywxLjdMMi45LDQuNUwyLjEsMy43TDEuNCwzTDAsNC40bDAuNywwLjdsMS41LDEuNWwwLjcsMC43bDAuNy0wLjdsMy41LTMuNWwwLjctMC43TDYuNCwxTDYuNCwxeiINCgkvPg0KPC9zdmc+DQo=);
87
+ .custom-control-input:checked ~ .custom-control-indicator {
88
+ background-image: $custom-checkbox-checked-icon;
79
89
  }
80
90
 
81
- input:indeterminate ~ .c-indicator {
82
- background-color: #0074d9;
83
- background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iOHB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDggOCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgOCA4IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik0wLDN2Mmg4VjNIMHoiLz4NCjwvc3ZnPg0K);
84
- @include box-shadow(none);
91
+ .custom-control-input:indeterminate ~ .custom-control-indicator {
92
+ background-color: $custom-checkbox-indeterminate-bg;
93
+ background-image: $custom-checkbox-indeterminate-icon;
94
+ @include box-shadow($custom-checkbox-indeterminate-box-shadow);
85
95
  }
86
96
  }
87
97
 
@@ -89,13 +99,13 @@
89
99
  //
90
100
  // Tweak just a few things for radios.
91
101
 
92
- .c-radio {
93
- .c-indicator {
94
- border-radius: 50%;
102
+ .custom-radio {
103
+ .custom-control-indicator {
104
+ border-radius: $custom-radio-radius;
95
105
  }
96
106
 
97
- input:checked ~ .c-indicator {
98
- background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgOCA4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA4IDgiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTQsMUMyLjMsMSwxLDIuMywxLDRzMS4zLDMsMywzczMtMS4zLDMtM1M1LjcsMSw0LDF6Ii8+DQo8L3N2Zz4NCg==);
107
+ .custom-control-input:checked ~ .custom-control-indicator {
108
+ background-image: $custom-radio-checked-icon;
99
109
  }
100
110
  }
101
111
 
@@ -105,17 +115,17 @@
105
115
  // By default radios and checkboxes are `inline-block` with no additional spacing
106
116
  // set. Use these optional classes to tweak the layout.
107
117
 
108
- .c-inputs-stacked {
109
- .c-input {
118
+ .custom-controls-stacked {
119
+ .custom-control {
110
120
  display: inline;
111
121
 
112
122
  &::after {
113
123
  display: block;
114
- margin-bottom: .25rem;
124
+ margin-bottom: $custom-control-spacer-y;
115
125
  content: "";
116
126
  }
117
127
 
118
- + .c-input {
128
+ + .custom-control {
119
129
  margin-left: 0;
120
130
  }
121
131
  }
@@ -129,25 +139,42 @@
129
139
  //
130
140
  // Includes IE9-specific hacks (noted by ` \9`).
131
141
 
132
- .c-select {
142
+ .custom-select {
133
143
  display: inline-block;
134
144
  max-width: 100%;
135
- padding: .375rem 1.75rem .375rem .75rem;
136
- padding-right: .75rem \9;
137
- color: $input-color;
145
+ padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
146
+ padding-right: $custom-select-padding-x \9;
147
+ color: $custom-select-color;
138
148
  vertical-align: middle;
139
- background: #fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAUCAMAAACzvE1FAAAADFBMVEUzMzMzMzMzMzMzMzMKAG/3AAAAA3RSTlMAf4C/aSLHAAAAPElEQVR42q3NMQ4AIAgEQTn//2cLdRKppSGzBYwzVXvznNWs8C58CiussPJj8h6NwgorrKRdTvuV9v16Afn0AYFOB7aYAAAAAElFTkSuQmCC) no-repeat right .75rem center;
149
+ background: $custom-select-bg $custom-select-indicator no-repeat right $custom-select-padding-x center;
140
150
  background-image: none \9;
141
- background-size: 8px 10px;
142
- border: $input-btn-border-width solid $input-border-color;
151
+ background-size: $custom-select-bg-size;
152
+ border: $custom-select-border-width solid $custom-select-border-color;
153
+ @include border-radius($custom-select-border-radius);
143
154
  // Use vendor prefixes as `appearance` isn't part of the CSS spec.
144
155
  -moz-appearance: none;
145
156
  -webkit-appearance: none;
146
157
 
147
158
  &:focus {
148
- border-color: #51a7e8;
159
+ border-color: $custom-select-focus-border-color;
149
160
  outline: none;
150
- @include box-shadow(inset 0 1px 2px rgba(0, 0, 0, 0.075), 0 0 5px rgba(81, 167, 232, 0.5));
161
+ @include box-shadow($custom-select-focus-box-shadow);
162
+
163
+ &::-ms-value {
164
+ // For visual consistency with other platforms/browsers,
165
+ // supress the default white text on blue background highlight given to
166
+ // the selected option text when the (still closed) <select> receives focus
167
+ // in IE and (under certain conditions) Edge.
168
+ // See https://github.com/twbs/bootstrap/issues/19398.
169
+ color: $input-color;
170
+ background-color: $input-bg;
171
+ }
172
+ }
173
+
174
+ &:disabled {
175
+ color: $custom-select-disabled-color;
176
+ cursor: $cursor-disabled;
177
+ background-color: $custom-select-disabled-bg;
151
178
  }
152
179
 
153
180
  // Hides the default caret in IE11
@@ -156,15 +183,15 @@
156
183
  }
157
184
  }
158
185
 
159
- .c-select-sm {
160
- padding-top: 3px;
161
- padding-bottom: 3px;
162
- font-size: 12px;
186
+ .custom-select-sm {
187
+ padding-top: $custom-select-padding-y;
188
+ padding-bottom: $custom-select-padding-y;
189
+ font-size: $custom-select-sm-font-size;
163
190
 
164
- &:not([multiple]) {
165
- height: 26px;
166
- min-height: 26px;
167
- }
191
+ // &:not([multiple]) {
192
+ // height: 26px;
193
+ // min-height: 26px;
194
+ // }
168
195
  }
169
196
 
170
197
 
@@ -172,55 +199,67 @@
172
199
  //
173
200
  // Custom file input.
174
201
 
175
- .file {
202
+ .custom-file {
176
203
  position: relative;
177
204
  display: inline-block;
178
- height: 2.5rem;
205
+ max-width: 100%;
206
+ height: $custom-file-height;
179
207
  cursor: pointer;
180
208
  }
181
- .file input {
182
- min-width: 14rem;
209
+
210
+ .custom-file-input {
211
+ min-width: $custom-file-width;
212
+ max-width: 100%;
183
213
  margin: 0;
184
214
  filter: alpha(opacity = 0);
185
215
  opacity: 0;
216
+
217
+ &:focus ~ .custom-file-control {
218
+ @include box-shadow($custom-file-focus-box-shadow);
219
+ }
186
220
  }
187
- .file-custom {
221
+
222
+ .custom-file-control {
188
223
  position: absolute;
189
224
  top: 0;
190
225
  right: 0;
191
226
  left: 0;
192
227
  z-index: 5;
193
- height: 2.5rem;
194
- padding: .5rem 1rem;
195
- line-height: 1.5;
196
- color: #555;
228
+ height: $custom-file-height;
229
+ padding: $custom-file-padding-x $custom-file-padding-y;
230
+ line-height: $custom-file-line-height;
231
+ color: $custom-file-color;
197
232
  user-select: none;
198
- background-color: #fff;
199
- border: $input-btn-border-width solid #ddd;
200
- border-radius: .25rem;
201
- @include box-shadow(inset 0 .2rem .4rem rgba(0,0,0,.05));
202
- }
203
- .file-custom::after {
204
- content: "Choose file...";
205
- }
206
- .file-custom::before {
207
- position: absolute;
208
- top: -.075rem;
209
- right: -.075rem;
210
- bottom: -.075rem;
211
- z-index: 6;
212
- display: block;
213
- height: 2.5rem;
214
- padding: .5rem 1rem;
215
- line-height: 1.5;
216
- color: #555;
217
- content: "Browse";
218
- background-color: #eee;
219
- border: $input-btn-border-width solid #ddd;
220
- border-radius: 0 .25rem .25rem 0;
221
- }
233
+ background-color: $custom-file-bg;
234
+ border: $custom-file-border-width solid $custom-file-border-color;
235
+ @include border-radius($custom-file-border-radius);
236
+ @include box-shadow($custom-file-box-shadow);
237
+
238
+ @each $lang, $text in map-get($custom-file-text, placeholder) {
239
+ &:lang(#{$lang})::after {
240
+ content: $text;
241
+ }
242
+ }
222
243
 
223
- // Focus state
224
- .file input:focus ~ .file-custom {
225
- @include box-shadow(0 0 0 .075rem #fff, 0 0 0 .2rem #0074d9);
244
+ &::before {
245
+ position: absolute;
246
+ top: -$custom-file-border-width;
247
+ right: -$custom-file-border-width;
248
+ bottom: -$custom-file-border-width;
249
+ z-index: 6;
250
+ display: block;
251
+ height: $custom-file-height;
252
+ padding: $custom-file-padding-x $custom-file-padding-y;
253
+ line-height: $custom-file-line-height;
254
+ color: $custom-file-button-color;
255
+ background-color: $custom-file-button-bg;
256
+ border: $custom-file-border-width solid $custom-file-border-color;
257
+ @include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
258
+ }
259
+
260
+ @each $lang, $text in map-get($custom-file-text, button-label) {
261
+ &:lang(#{$lang})::before {
262
+ content: $text;
263
+ }
264
+ }
226
265
  }