bootstrap 4.0.0.alpha1 → 4.0.0.alpha2

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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/javascripts/bootstrap.js +15 -15
  4. data/assets/javascripts/bootstrap.min.js +2 -215
  5. data/assets/javascripts/bootstrap/alert.js +0 -1
  6. data/assets/javascripts/bootstrap/button.js +0 -1
  7. data/assets/javascripts/bootstrap/carousel.js +0 -1
  8. data/assets/javascripts/bootstrap/collapse.js +0 -1
  9. data/assets/javascripts/bootstrap/dropdown.js +0 -1
  10. data/assets/javascripts/bootstrap/modal.js +1 -2
  11. data/assets/javascripts/bootstrap/popover.js +0 -1
  12. data/assets/javascripts/bootstrap/scrollspy.js +0 -1
  13. data/assets/javascripts/bootstrap/tab.js +0 -1
  14. data/assets/javascripts/bootstrap/tooltip.js +12 -13
  15. data/assets/javascripts/bootstrap/util.js +0 -1
  16. data/assets/stylesheets/_bootstrap.scss +1 -0
  17. data/assets/stylesheets/bootstrap/_alert.scss +1 -1
  18. data/assets/stylesheets/bootstrap/_buttons.scss +0 -1
  19. data/assets/stylesheets/bootstrap/_card.scss +8 -3
  20. data/assets/stylesheets/bootstrap/_carousel.scss +3 -3
  21. data/assets/stylesheets/bootstrap/_dropdown.scss +3 -1
  22. data/assets/stylesheets/bootstrap/_forms.scss +5 -5
  23. data/assets/stylesheets/bootstrap/_images.scss +25 -0
  24. data/assets/stylesheets/bootstrap/_labels.scss +3 -1
  25. data/assets/stylesheets/bootstrap/_nav.scss +2 -0
  26. data/assets/stylesheets/bootstrap/_reboot.scss +29 -0
  27. data/assets/stylesheets/bootstrap/_responsive-embed.scss +0 -3
  28. data/assets/stylesheets/bootstrap/_type.scss +1 -29
  29. data/assets/stylesheets/bootstrap/_utilities-background.scss +24 -0
  30. data/assets/stylesheets/bootstrap/_utilities-responsive.scss +1 -1
  31. data/assets/stylesheets/bootstrap/_utilities.scss +4 -35
  32. data/assets/stylesheets/bootstrap/_variables.scss +8 -6
  33. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +2 -2
  34. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +10 -0
  35. data/assets/stylesheets/bootstrap/mixins/_forms.scss +1 -1
  36. data/assets/stylesheets/bootstrap/mixins/_image.scss +6 -5
  37. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +1 -1
  38. data/lib/bootstrap.rb +10 -0
  39. data/lib/bootstrap/version.rb +2 -2
  40. data/tasks/updater/js.rb +4 -1
  41. data/templates/project/_bootstrap-variables.scss +8 -6
  42. data/test/dummy_rails/app/assets/stylesheets/application.sass +3 -0
  43. data/test/dummy_rails/config/application.rb +4 -1
  44. data/test/gemfiles/rails_head.gemfile +2 -1
  45. data/test/rails_test.rb +5 -0
  46. data/test/support/dummy_rails_integration.rb +8 -1
  47. metadata +3 -2
@@ -2,8 +2,8 @@
2
2
 
3
3
  @mixin bg-variant($parent, $color) {
4
4
  #{$parent} {
5
- color: #fff;
6
- background-color: $color;
5
+ color: #fff !important;
6
+ background-color: $color !important;
7
7
  }
8
8
  a#{$parent} {
9
9
  @include hover-focus {
@@ -74,3 +74,13 @@
74
74
  }
75
75
  }
76
76
  }
77
+
78
+ // Media that spans multiple breakpoint widths.
79
+ // Makes the @content apply between the min and max breakpoints
80
+ @mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {
81
+ @include media-breakpoint-up($lower, $breakpoints) {
82
+ @include media-breakpoint-down($upper, $breakpoints) {
83
+ @content;
84
+ }
85
+ }
86
+ }
@@ -5,7 +5,7 @@
5
5
 
6
6
  @mixin form-control-validation($color) {
7
7
  // Color the label and help text
8
- .help-block,
8
+ .text-help,
9
9
  .form-control-label,
10
10
  .radio,
11
11
  .checkbox,
@@ -21,12 +21,13 @@
21
21
  @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
22
22
  background-image: url($file-1x);
23
23
 
24
+ // Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio,
25
+ // but doesn't convert dppx=>dpi.
26
+ // There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard.
27
+ // Compatibility info: http://caniuse.com/#feat=css-media-resolution
24
28
  @media
25
- only screen and (-webkit-min-device-pixel-ratio: 2),
26
- only screen and ( -o-min-device-pixel-ratio: 2/1),
27
- only screen and ( min-device-pixel-ratio: 2),
28
- only screen and ( min-resolution: 192dpi),
29
- only screen and ( min-resolution: 2dppx) {
29
+ only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx
30
+ only screen and (min-resolution: 2dppx) { // Standardized
30
31
  background-image: url($file-2x);
31
32
  background-size: $width-1x $height-1x;
32
33
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  @mixin text-emphasis-variant($parent, $color) {
4
4
  #{$parent} {
5
- color: $color;
5
+ color: $color !important;
6
6
  }
7
7
  a#{$parent} {
8
8
  @include hover-focus {
@@ -7,6 +7,8 @@ module Bootstrap
7
7
 
8
8
  if rails?
9
9
  register_rails_engine
10
+ elsif lotus?
11
+ register_lotus
10
12
  elsif sprockets?
11
13
  register_sprockets
12
14
  end
@@ -44,6 +46,10 @@ module Bootstrap
44
46
  defined?(::Rails)
45
47
  end
46
48
 
49
+ def lotus?
50
+ defined?(::Lotus)
51
+ end
52
+
47
53
  private
48
54
 
49
55
  def configure_sass
@@ -70,6 +76,10 @@ module Bootstrap
70
76
  Sprockets.append_path(stylesheets_path)
71
77
  Sprockets.append_path(javascripts_path)
72
78
  end
79
+
80
+ def register_lotus
81
+ Lotus::Assets.sources << assets_path
82
+ end
73
83
  end
74
84
  end
75
85
 
@@ -1,4 +1,4 @@
1
1
  module Bootstrap
2
- VERSION = '4.0.0.alpha1'
3
- BOOTSTRAP_SHA = '43b130022b333c25d9fa810ab2666059ed699f7a'
2
+ VERSION = '4.0.0.alpha2'
3
+ BOOTSTRAP_SHA = '4d92e2c7ec600d07d4dceb2e9c83d9bcf0ba9268'
4
4
  end
@@ -5,7 +5,10 @@ class Updater
5
5
  save_to = @save_to[:js]
6
6
  contents = {}
7
7
  read_files('js/dist', bootstrap_js_files).each do |name, file|
8
- contents[name] = file
8
+ contents[name] = file.
9
+ # Remove the source mapping URL comment as this gem does not bundle source maps.
10
+ sub!(%r(^//# sourceMappingURL=#{name}.map\n\z), '') or
11
+ fail "Cannot find source mapping URL to remove in #{name}. Last line: #{file.lines.last.inspect}"
9
12
  save_file("#{save_to}/#{name}", file)
10
13
  end
11
14
  log_processed "#{bootstrap_js_files * ' '}"
@@ -135,7 +135,7 @@
135
135
 
136
136
  // $font-size-base: 1rem;
137
137
  // $font-size-lg: 1.25rem;
138
- // $font-size-sm: .85rem;
138
+ // $font-size-sm: .875rem;
139
139
  // $font-size-xs: .75rem;
140
140
 
141
141
  // $font-size-h1: 2.5rem;
@@ -296,9 +296,9 @@
296
296
  // $cursor-disabled: not-allowed;
297
297
 
298
298
  // Form validation icons
299
- // $form-icon-success: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkNoZWNrIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDYxMiA3OTIiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDYxMiA3OTIiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGZpbGw9IiM1Q0I4NUMiIGQ9Ik0yMzMuOCw2MTAuMWMtMTMuMywwLTI1LjktNi4yLTM0LTE2LjlMOTAuNSw0NDguOEM3Ni4zLDQzMCw4MCw0MDMuMyw5OC44LDM4OS4xYzE4LjgtMTQuMyw0NS41LTEwLjUsNTkuOCw4LjNsNzEuOSw5NWwyMjAuOS0yNTAuNW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CA1MnoiLz48L3N2Zz4=";
302
302
 
303
303
 
304
304
  // Dropdowns
@@ -457,6 +457,9 @@
457
457
  // $card-cap-bg: #f5f5f5;
458
458
  // $card-bg: #fff;
459
459
 
460
+ // $card-link-hover-color: #fff;
461
+
462
+
460
463
  // Tooltips
461
464
 
462
465
  // $tooltip-max-width: 200px;
@@ -473,7 +476,6 @@
473
476
  // $popover-bg: #fff;
474
477
  // $popover-max-width: 276px;
475
478
  // $popover-border-color: rgba(0,0,0,.2);
476
- // $popover-fallback-border-color: #ccc;
477
479
 
478
480
  // $popover-title-bg: darken($popover-bg, 3%);
479
481
 
@@ -482,7 +484,6 @@
482
484
 
483
485
  // $popover-arrow-outer-width: ($popover-arrow-width + 1);
484
486
  // $popover-arrow-outer-color: fade-in($popover-border-color, 0.05);
485
- // $popover-arrow-outer-fallback-color: darken($popover-fallback-border-color, 20%);
486
487
 
487
488
 
488
489
  // Labels
@@ -526,6 +527,7 @@
526
527
  // $alert-padding: 15px;
527
528
  // $alert-border-radius: $border-radius;
528
529
  // $alert-link-font-weight: bold;
530
+ // $alert-border-width: $border-width;
529
531
 
530
532
  // $alert-success-bg: $state-success-bg;
531
533
  // $alert-success-text: $state-success-text;
@@ -1 +1,4 @@
1
1
  @import 'bootstrap'
2
+
3
+ .test-mixin
4
+ +make-container
@@ -22,7 +22,10 @@ require 'rails-assets-tether'
22
22
  module Dummy
23
23
  class Application < Rails::Application
24
24
  config.assets.enabled = true if config.assets.respond_to?(:enabled)
25
- config.assets.precompile += %w( application.css application.js )
25
+ if Rails::VERSION::MAJOR > 4
26
+ # Rails 4 precompiles application.css|js by default, but future version of Rails do not.
27
+ config.assets.precompile += %w( application.css application.js )
28
+ end
26
29
  config.to_prepare do
27
30
  if ENV['VERBOSE']
28
31
  STDERR.puts "Loaded Rails #{Rails::VERSION::STRING}, Sprockets #{Sprockets::VERSION}",
@@ -9,7 +9,8 @@ gem 'sprockets', github: 'rails/sprockets'
9
9
  gem 'sprockets-rails', github: 'rails/sprockets-rails'
10
10
  gem 'sass-rails', github: 'rails/sass-rails', branch: 'master'
11
11
 
12
- gem 'autoprefixer-rails', github: 'ai/autoprefixer-rails'
12
+ # Need https://github.com/ai/autoprefixer-rails/pull/73 fixed to unlock
13
+ gem 'autoprefixer-rails', '= 6.1.0'
13
14
 
14
15
  source 'https://rails-assets.org' do
15
16
  gem 'rails-assets-tether', '>= 1.1.0'
@@ -16,4 +16,9 @@ class RailsTest < ActionDispatch::IntegrationTest
16
16
  get ActionController::Base.helpers.stylesheet_path('application.css')
17
17
  assert_match /-webkit-(?:transition|transform)/, response.body
18
18
  end
19
+
20
+ def test_precompile
21
+ Dummy::Application.load_tasks
22
+ Rake::Task['assets:precompile'].invoke
23
+ end
19
24
  end
@@ -5,11 +5,12 @@ module DummyRailsIntegration
5
5
 
6
6
  def setup
7
7
  super
8
- FileUtils.rm_rf('test/dummy_rails/tmp/cache', secure: true)
8
+ cleanup_dummy_rails_files
9
9
  end
10
10
 
11
11
  def teardown
12
12
  super
13
+ cleanup_dummy_rails_files
13
14
  Capybara.reset_sessions!
14
15
  Capybara.use_default_driver
15
16
  end
@@ -19,4 +20,10 @@ module DummyRailsIntegration
19
20
  page.driver.render(File.join(GEM_PATH, path), full: true)
20
21
  STDERR.puts "Screenshot saved to #{path}"
21
22
  end
23
+
24
+ private
25
+ def cleanup_dummy_rails_files
26
+ FileUtils.rm_rf('test/dummy_rails/tmp/cache', secure: true)
27
+ FileUtils.rm Dir.glob('test/dummy_rails/public/assets/*')
28
+ end
22
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.alpha1
4
+ version: 4.0.0.alpha2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Twitter, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-02 00:00:00.000000000 Z
11
+ date: 2015-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
@@ -286,6 +286,7 @@ files:
286
286
  - assets/stylesheets/bootstrap/_tables.scss
287
287
  - assets/stylesheets/bootstrap/_tooltip.scss
288
288
  - assets/stylesheets/bootstrap/_type.scss
289
+ - assets/stylesheets/bootstrap/_utilities-background.scss
289
290
  - assets/stylesheets/bootstrap/_utilities-responsive.scss
290
291
  - assets/stylesheets/bootstrap/_utilities-spacing.scss
291
292
  - assets/stylesheets/bootstrap/_utilities.scss