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 +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +8 -0
- data/README.md +19 -9
- data/lib/bootstrap-sass/version.rb +2 -2
- data/tasks/converter/less_conversion.rb +22 -28
- data/vendor/assets/stylesheets/bootstrap.scss +49 -1
- data/vendor/assets/stylesheets/bootstrap/_mixins.scss +20 -12
- data/vendor/assets/stylesheets/bootstrap/_modals.scss +3 -2
- data/vendor/assets/stylesheets/bootstrap/_popovers.scss +7 -7
- data/vendor/assets/stylesheets/bootstrap/_responsive-utilities.scss +1 -7
- data/vendor/assets/stylesheets/bootstrap/_variables.scss +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e822b0abf948cd05e02b45a362544b12b71f3fda
|
4
|
+
data.tar.gz: dc44d5683657e993d88af64b71340c8a81f744b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f2925d17495ffca305cda697f8e794b998ea1a9c60787940b3d61845cd2e2c0f1f854b140d407f4a34326e3f4bd6bdece6ab2bb647a3811d180ae0ef02f6d7c
|
7
|
+
data.tar.gz: 9d5ab63fc2d0d77eb155c822615770eaee61ed1b5a58bcc3ed7b8025275cec350294ee77e3b3783689602e1b1901c25f6702c6dce299b1655d922f221fbe087f
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
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
|
-
|
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.
|
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
|
-
|
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
|
75
|
+
bower install git://github.com/twbs/bootstrap-sass.git
|
68
76
|
```
|
69
77
|
|
70
|
-
|
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
|
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/
|
215
|
-
[version]: https://github.com/twbs/bootstrap-sass/blob/
|
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,11 +1,9 @@
|
|
1
1
|
require_relative 'char_string_scanner'
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
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
|
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|
|
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}]+?)
|
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
|
-
|
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
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
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
|
-
|
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} {
|
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} {
|
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} {
|
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
|
-
|
644
|
-
|
645
|
-
|
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} {
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
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
|
-
|
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:
|
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.
|
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-
|
11
|
+
date: 2014-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: compass
|