bootstrap-sass 3.1.0.1 → 3.1.0.2

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

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db8d2f22db9726b88db9d2afdda3622f8e74b71b
4
- data.tar.gz: 50aa39b039af948b2818c1225de73d59fcef8f73
3
+ metadata.gz: e822b0abf948cd05e02b45a362544b12b71f3fda
4
+ data.tar.gz: dc44d5683657e993d88af64b71340c8a81f744b0
5
5
  SHA512:
6
- metadata.gz: 0184eee22fe19490d9791704521806a75c5bab053171a34e4c9a35f57199c7bf6be26d504fef7639eb7dcecff92631650a394585433b77fe908b5f44a4cc7489
7
- data.tar.gz: 19a57f9892b9bf6544c69d6730025a761f5498bed546d5aceba73e6432e5c313f0ccd0982ee3bfd9ab8a85310fe1a70a691f8c3be9fec355c2bd362f79179024
6
+ metadata.gz: 8f2925d17495ffca305cda697f8e794b998ea1a9c60787940b3d61845cd2e2c0f1f854b140d407f4a34326e3f4bd6bdece6ab2bb647a3811d180ae0ef02f6d7c
7
+ data.tar.gz: 9d5ab63fc2d0d77eb155c822615770eaee61ed1b5a58bcc3ed7b8025275cec350294ee77e3b3783689602e1b1901c25f6702c6dce299b1655d922f221fbe087f
@@ -3,7 +3,7 @@ rvm:
3
3
  - 2.0.0
4
4
  - 1.9.3
5
5
  - jruby
6
- - rbx
6
+ - rbx-2.2.4
7
7
  gemfile:
8
8
  - test/gemfiles/sass_3_2.gemfile
9
9
  - test/gemfiles/sass_head.gemfile
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.1.0.2
4
+
5
+ Compatibility with Rails 3.2.x. Bugfixes from upstream up to 7eb532262fbd1112215b5a547b9285794b5360ab.
6
+
7
+ ## 3.1.0.1
8
+
9
+ * bugfixes
10
+
3
11
  ## 3.1.0.0
4
12
 
5
13
  * compiles with libsass master
data/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  Please see the appropriate guide for your environment of choice:
10
10
 
11
- ### a. Rails
11
+ ### a. Ruby on Rails
12
12
 
13
13
  `bootstrap-sass` is easy to drop into Rails with the asset pipeline.
14
14
 
@@ -21,7 +21,13 @@ gem 'bootstrap-sass', '~> 3.1.0'
21
21
 
22
22
  `bundle install` and restart your server to make the files available through the pipeline.
23
23
 
24
- ### b. Compass (no Rails)
24
+
25
+ #### Rails 3.2.x
26
+
27
+ For Rails 3.2.x, make sure that all the gems are moved out of the `:assets` group, and `config.assets.initialize_on_precompile` is set to `true`.
28
+
29
+
30
+ ### b. Compass without Rails
25
31
 
26
32
  Install the gem
27
33
  ```sh
@@ -53,7 +59,7 @@ This will create a new Compass project with the following files in it:
53
59
  Some bootstrap-sass mixins may conflict with the Compass ones.
54
60
  If this happens, change the import order so that Compass mixins are loaded later.
55
61
 
56
- ### c. Sass-only (no Compass, nor Rails)
62
+ ### c. Ruby without Compass / Rails
57
63
 
58
64
  Require the gem, and load paths and Sass helpers will be configured automatically:
59
65
 
@@ -61,13 +67,17 @@ Require the gem, and load paths and Sass helpers will be configured automaticall
61
67
  require 'bootstrap-sass'
62
68
  ```
63
69
 
64
- Using bootstrap-sass as a Bower package is still being tested. You can install it with:
70
+ ### d. Bower
71
+
72
+ Using bootstrap-sass as a Bower package is still being tested and requires libsass master. You can install it with:
65
73
 
66
74
  ```bash
67
- bower install 'git://github.com/twbs/bootstrap-sass.git#v3.1.0'
75
+ bower install git://github.com/twbs/bootstrap-sass.git
68
76
  ```
69
77
 
70
- The files are located at [vendor/assets](/vendor/assets).
78
+ `bootstrap-sass` is taken so make sure you use the Git URL above.
79
+
80
+ Sass, JS, and all other assets are located at [vendor/assets](/vendor/assets).
71
81
 
72
82
  #### JS and fonts
73
83
 
@@ -130,7 +140,7 @@ You can also import components explicitly. To start with a full list of modules
130
140
  ```bash
131
141
  # copy and prepend "bootstrap/" to the @import paths:
132
142
  sed 's/@import "/@import "bootstrap\//' \
133
- $(bundle show bootstrap-sass)/vendor/assets/stylesheets/bootstrap/bootstrap.scss > \
143
+ $(bundle show bootstrap-sass)/vendor/assets/stylesheets/bootstrap.scss > \
134
144
  app/assets/stylesheets/bootstrap-custom.scss
135
145
  ```
136
146
  Comment out components you do not want from `bootstrap-custom`.
@@ -211,8 +221,8 @@ bootstrap-sass is used to build some awesome projects all over the web, includin
211
221
  Michael Hartl's [Rails Tutorial](http://railstutorial.org/), [gitlabhq](http://gitlabhq.com/) and
212
222
  [kandan](http://kandanapp.com/).
213
223
 
214
- [converter]: https://github.com/twbs/bootstrap-sass/blob/3/tasks/converter.rb
215
- [version]: https://github.com/twbs/bootstrap-sass/blob/3/lib/bootstrap-sass/version.rb
224
+ [converter]: https://github.com/twbs/bootstrap-sass/blob/master/tasks/converter/less_conversion.rb
225
+ [version]: https://github.com/twbs/bootstrap-sass/blob/master/lib/bootstrap-sass/version.rb
216
226
  [contrib]: https://github.com/twbs/bootstrap-sass/graphs/contributors
217
227
  [antirequire]: https://github.com/twbs/bootstrap-sass/issues/79#issuecomment-4428595
218
228
  [jsdocs]: http://getbootstrap.com/javascript/#transitions
@@ -1,4 +1,4 @@
1
1
  module Bootstrap
2
- VERSION = '3.1.0.1'
3
- BOOTSTRAP_SHA = '9c054fd4c0db89cbbb1df3c868bafc4f2c17c3e3'
2
+ VERSION = '3.1.0.2'
3
+ BOOTSTRAP_SHA = '7eb532262fbd1112215b5a547b9285794b5360ab'
4
4
  end
@@ -1,11 +1,9 @@
1
1
  require_relative 'char_string_scanner'
2
2
 
3
- # This module transforms LESS into SCSS.
4
- # It is implemented via lots of string manipulation: scanning back and forwards for regexps and doing substitions.
5
- # Since it does not parse the LESS into an AST, bits of it may assume LESS to be formatted a certain way, and only limited,
6
- # static analysis can be performed. This approach has so far been mostly enough to automatically convert most all of twbs/bootstrap.
7
- # There is some bootstrap-specific to make up for lack of certain features in Sass 3.2 (recursion, mixin namespacing)
8
- # and vice versa in LESS (vararg mixins).
3
+ # This is the script used to automatically convert all of twbs/bootstrap LESS to Sass.
4
+ #
5
+ # Most differences are fixed by regexps and other forms of string substitution.
6
+ # There are Bootstrap-specific workarounds for the lack of parent selectors, recursion, mixin namespaces, extend within @media, etc in Sass 3.2.
9
7
  class Converter
10
8
  module LessConversion
11
9
  # Some regexps for matching bits of SCSS:
@@ -54,6 +52,7 @@ class Converter
54
52
  def process_stylesheet_assets
55
53
  log_status 'Processing stylesheets...'
56
54
  files = read_files('less', bootstrap_less_files)
55
+ save_to = @save_to[:scss]
57
56
 
58
57
  log_status ' Converting LESS files to Scss:'
59
58
  files.each do |name, file|
@@ -82,9 +81,7 @@ class Converter
82
81
 
83
82
  file = convert_grid_mixins file
84
83
  when 'responsive-utilities.less'
85
- file = apply_mixin_parent_selector(file, '&\.(visible|hidden)')
86
- file = apply_mixin_parent_selector(file, '(?<!&)\.(visible|hidden)')
87
- file = replace_rules(file, ' @media') { |r| unindent(r, 2) }
84
+ file = apply_mixin_parent_selector file, '\.(?:visible|hidden)'
88
85
  when 'variables.less'
89
86
  file = insert_default_vars(file)
90
87
  file = unindent <<-SCSS + file, 14
@@ -122,11 +119,14 @@ class Converter
122
119
  end
123
120
 
124
121
  name = name.sub(/\.less$/, '.scss')
125
- save_to = @save_to[:scss]
126
122
  path = "#{save_to}/#{'_' unless name == 'bootstrap.scss'}#{name}"
127
123
  save_file(path, file)
128
124
  log_processed File.basename(path)
129
125
  end
126
+
127
+ # generate imports valid relative to both load path and file directory
128
+ save_file File.expand_path("#{save_to}/../bootstrap.scss"),
129
+ File.read("#{save_to}/bootstrap.scss").gsub(/ "/, ' "bootstrap/')
130
130
  end
131
131
 
132
132
  def bootstrap_less_files
@@ -298,7 +298,11 @@ class Converter
298
298
  # insert param into mixin def
299
299
  mxn_css.sub!(/(@mixin [\w-]+)\(([\$\w\-,\s]*)\)/) { "#{$1}(#{param}#{', ' if $2 && !$2.empty?}#{$2})" }
300
300
  # wrap properties in #{$parent} { ... }
301
- replace_properties(mxn_css) { |props| props.strip.empty? ? props : " \#{#{param}} { #{props.strip} }\n " }
301
+ replace_properties(mxn_css) { |props|
302
+ next props if props.strip.empty?
303
+ spacer = ' ' * indent_width(props)
304
+ "#{spacer}\#{#{param}} {\n#{indent(props.sub(/\s+\z/, ''), 2)}\n#{spacer}}"
305
+ }
302
306
  # change nested& rules to nested#{$parent}
303
307
  replace_rules(mxn_css, /.*&[ ,:]/) { |rule| replace_in_selector rule, /&/, "\#{#{param}}" }
304
308
  end
@@ -336,7 +340,7 @@ class Converter
336
340
  replace_rules file, '\s*' + rule_sel, comments: false do |rule, rule_pos, css|
337
341
  body = unwrap_rule_block(rule.dup).strip
338
342
  next rule unless body =~ /^@include \w+/m || body =~ /^@media/ && body =~ /\{\s*@include/
339
- rule =~ /(#{COMMENT_RE}*)([#{SELECTOR_CHAR}]+?)\s*#{RULE_OPEN_BRACE_RE}/
343
+ rule =~ /(#{COMMENT_RE}*)([#{SELECTOR_CHAR}\s*]+?)#{RULE_OPEN_BRACE_RE}/
340
344
  cmt, sel = $1, $2.strip
341
345
  # take one up selector chain if this is an &. selector
342
346
  if sel.start_with?('&')
@@ -345,7 +349,8 @@ class Converter
345
349
  end
346
350
  # unwrap, and replace @include
347
351
  unindent unwrap_rule_block(rule).gsub(/(@include [\w-]+)\(([\$\w\-,\s]*)\)/) {
348
- "#{cmt}#{$1}('#{sel}'#{', ' if $2 && !$2.empty?}#{$2})"
352
+ args = $2
353
+ "#{cmt}#{$1}('#{sel.gsub(/\s+/, ' ')}'#{', ' if args && !args.empty?}#{args})"
349
354
  }
350
355
  end
351
356
  end
@@ -570,21 +575,10 @@ class Converter
570
575
  def replace_properties(css, &block)
571
576
  s = CharStringScanner.new(css)
572
577
  s.skip_until /#{RULE_OPEN_BRACE_RE}\n?/
573
- prev_pos = s.pos
574
- depth = 0
575
- pos = []
576
- while (b = s.scan_next(/#{SELECTOR_RE}#{RULE_OPEN_BRACE_RE}|#{RULE_CLOSE_BRACE_RE}/m))
577
- s_pos = s.pos
578
- depth += (b == '}' ? -1 : +1)
579
- if depth == 1
580
- if b == '}'
581
- prev_pos = s_pos
582
- else
583
- pos << (prev_pos .. s_pos - b.length - 1)
584
- end
585
- end
586
- end
587
- replace_substrings_at css, pos, &block
578
+ from = s.pos
579
+ m = s.scan_next(/\s*#{SELECTOR_RE}#{RULE_OPEN_BRACE_RE}/) || s.scan_next(/\s*#{RULE_CLOSE_BRACE_RE}/)
580
+ to = s.pos - m.length - 1
581
+ replace_substrings_at css, [(from .. to)], &block
588
582
  end
589
583
 
590
584
 
@@ -1 +1,49 @@
1
- @import "bootstrap/bootstrap";
1
+ // Core variables and mixins
2
+ @import "bootstrap/variables";
3
+ @import "bootstrap/mixins";
4
+
5
+ // Reset
6
+ @import "bootstrap/normalize";
7
+ @import "bootstrap/print";
8
+
9
+ // Core CSS
10
+ @import "bootstrap/scaffolding";
11
+ @import "bootstrap/type";
12
+ @import "bootstrap/code";
13
+ @import "bootstrap/grid";
14
+ @import "bootstrap/tables";
15
+ @import "bootstrap/forms";
16
+ @import "bootstrap/buttons";
17
+
18
+ // Components
19
+ @import "bootstrap/component-animations";
20
+ @import "bootstrap/glyphicons";
21
+ @import "bootstrap/dropdowns";
22
+ @import "bootstrap/button-groups";
23
+ @import "bootstrap/input-groups";
24
+ @import "bootstrap/navs";
25
+ @import "bootstrap/navbar";
26
+ @import "bootstrap/breadcrumbs";
27
+ @import "bootstrap/pagination";
28
+ @import "bootstrap/pager";
29
+ @import "bootstrap/labels";
30
+ @import "bootstrap/badges";
31
+ @import "bootstrap/jumbotron";
32
+ @import "bootstrap/thumbnails";
33
+ @import "bootstrap/alerts";
34
+ @import "bootstrap/progress-bars";
35
+ @import "bootstrap/media";
36
+ @import "bootstrap/list-group";
37
+ @import "bootstrap/panels";
38
+ @import "bootstrap/wells";
39
+ @import "bootstrap/close";
40
+
41
+ // Components w/ JavaScript
42
+ @import "bootstrap/modals";
43
+ @import "bootstrap/tooltip";
44
+ @import "bootstrap/popovers";
45
+ @import "bootstrap/carousel";
46
+
47
+ // Utility classes
48
+ @import "bootstrap/utilities";
49
+ @import "bootstrap/responsive-utilities";
@@ -592,7 +592,9 @@
592
592
  // -------------------------
593
593
  // [converter] $parent hack
594
594
  @mixin bg-variant($parent, $color) {
595
- #{$parent} { background-color: $color; }
595
+ #{$parent} {
596
+ background-color: $color;
597
+ }
596
598
  a#{$parent}:hover {
597
599
  background-color: darken($color, 10%);
598
600
  }
@@ -602,7 +604,9 @@
602
604
  // -------------------------
603
605
  // [converter] $parent hack
604
606
  @mixin text-emphasis-variant($parent, $color) {
605
- #{$parent} { color: $color; }
607
+ #{$parent} {
608
+ color: $color;
609
+ }
606
610
  a#{$parent}:hover {
607
611
  color: darken($color, 10%);
608
612
  }
@@ -631,7 +635,9 @@
631
635
  // More easily include all the states for responsive-utilities.less.
632
636
  // [converter] $parent hack
633
637
  @mixin responsive-visibility($parent) {
634
- #{$parent} { display: block !important; }
638
+ #{$parent} {
639
+ display: block !important;
640
+ }
635
641
  table#{$parent} { display: table; }
636
642
  tr#{$parent} { display: table-row !important; }
637
643
  th#{$parent},
@@ -640,10 +646,9 @@
640
646
 
641
647
  // [converter] $parent hack
642
648
  @mixin responsive-invisibility($parent) {
643
- #{$parent},
644
- tr#{$parent},
645
- th#{$parent},
646
- td#{$parent} { display: none !important; }
649
+ #{$parent} {
650
+ display: none !important;
651
+ }
647
652
  }
648
653
 
649
654
 
@@ -916,11 +921,14 @@
916
921
 
917
922
  // [converter] $parent hack
918
923
  @mixin input-size($parent, $input-height, $padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
919
- #{$parent} { height: $input-height;
920
- padding: $padding-vertical $padding-horizontal;
921
- font-size: $font-size;
922
- line-height: $line-height;
923
- border-radius: $border-radius; }
924
+ #{$parent} {
925
+ height: $input-height;
926
+ padding: $padding-vertical $padding-horizontal;
927
+ font-size: $font-size;
928
+ line-height: $line-height;
929
+ border-radius: $border-radius;
930
+ }
931
+
924
932
  select#{$parent} {
925
933
  height: $input-height;
926
934
  line-height: $input-height;
@@ -121,7 +121,6 @@
121
121
 
122
122
  // Scale up the modal
123
123
  @media (min-width: $screen-sm-min) {
124
-
125
124
  // Automatically set modal's width for larger viewports
126
125
  .modal-dialog {
127
126
  width: $modal-md;
@@ -133,6 +132,8 @@
133
132
 
134
133
  // Modal sizes
135
134
  .modal-sm { width: $modal-sm; }
136
- .modal-lg { width: $modal-lg; }
135
+ }
137
136
 
137
+ @media (min-width: $screen-md-min) {
138
+ .modal-lg { width: $modal-lg; }
138
139
  }
@@ -48,7 +48,7 @@
48
48
  //
49
49
  // .arrow is outer, .arrow:after is inner
50
50
 
51
- .popover .arrow {
51
+ .popover > .arrow {
52
52
  &,
53
53
  &:after {
54
54
  position: absolute;
@@ -59,16 +59,16 @@
59
59
  border-style: solid;
60
60
  }
61
61
  }
62
- .popover .arrow {
62
+ .popover > .arrow {
63
63
  border-width: $popover-arrow-outer-width;
64
64
  }
65
- .popover .arrow:after {
65
+ .popover > .arrow:after {
66
66
  border-width: $popover-arrow-width;
67
67
  content: "";
68
68
  }
69
69
 
70
70
  .popover {
71
- &.top .arrow {
71
+ &.top > .arrow {
72
72
  left: 50%;
73
73
  margin-left: -$popover-arrow-outer-width;
74
74
  border-bottom-width: 0;
@@ -83,7 +83,7 @@
83
83
  border-top-color: $popover-arrow-color;
84
84
  }
85
85
  }
86
- &.right .arrow {
86
+ &.right > .arrow {
87
87
  top: 50%;
88
88
  left: -$popover-arrow-outer-width;
89
89
  margin-top: -$popover-arrow-outer-width;
@@ -98,7 +98,7 @@
98
98
  border-right-color: $popover-arrow-color;
99
99
  }
100
100
  }
101
- &.bottom .arrow {
101
+ &.bottom > .arrow {
102
102
  left: 50%;
103
103
  margin-left: -$popover-arrow-outer-width;
104
104
  border-top-width: 0;
@@ -114,7 +114,7 @@
114
114
  }
115
115
  }
116
116
 
117
- &.left .arrow {
117
+ &.left > .arrow {
118
118
  top: 50%;
119
119
  right: -$popover-arrow-outer-width;
120
120
  margin-top: -$popover-arrow-outer-width;
@@ -24,26 +24,20 @@
24
24
 
25
25
  // Visibility utilities
26
26
 
27
- @include responsive-invisibility('.visible-xs');
27
+ @include responsive-invisibility('.visible-xs, .visible-sm, .visible-md, .visible-lg');
28
28
 
29
29
  @media (max-width: $screen-xs-max) {
30
30
  @include responsive-visibility('.visible-xs');
31
31
  }
32
32
 
33
- @include responsive-invisibility('.visible-sm');
34
-
35
33
  @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
36
34
  @include responsive-visibility('.visible-sm');
37
35
  }
38
36
 
39
- @include responsive-invisibility('.visible-md');
40
-
41
37
  @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
42
38
  @include responsive-visibility('.visible-md');
43
39
  }
44
40
 
45
- @include responsive-invisibility('.visible-lg');
46
-
47
41
  @media (min-width: $screen-lg-min) {
48
42
  @include responsive-visibility('.visible-lg');
49
43
  }
@@ -78,7 +78,7 @@ $headings-color: inherit !default;
78
78
 
79
79
  $icon-font-path: "bootstrap/" !default;
80
80
  $icon-font-name: "glyphicons-halflings-regular" !default;
81
- $icon-font-svg-id: "glyphicons_halflingsregular" !default;
81
+ $icon-font-svg-id: "glyphicons_halflingsregular" !default;
82
82
 
83
83
  //== Components
84
84
  //
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap-sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.1
4
+ version: 3.1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas McDonald
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-03 00:00:00.000000000 Z
11
+ date: 2014-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: compass