Skip to content

Commit

Permalink
update to v3.0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
glebm committed Nov 8, 2013
1 parent 3d7e161 commit 34d538d
Show file tree
Hide file tree
Showing 18 changed files with 84 additions and 82 deletions.
4 changes: 2 additions & 2 deletions lib/bootstrap-sass/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Bootstrap
VERSION = '3.0.1.0'
BOOTSTRAP_SHA = 'ea3c89189a6b922c08729857006713de209b66d8'
VERSION = '3.0.2.0'
BOOTSTRAP_SHA = '463343af63344dbbc3db04f40b0b804baa919b7e'
end
23 changes: 9 additions & 14 deletions tasks/converter/less_conversion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ def process_stylesheet_assets
when 'close.less'
# extract .close { button& {...} } rule
file = extract_nested_rule file, 'button&'
when 'modals.less'
# pre 3.0.1:
if file =~ /body&,/
file = replace_all file, /body&,(.*?)(\{.*?\})/m, "\\1\\2\nbody& \\2"
file = extract_nested_rule file, 'body&'
end
when 'dropdowns.less'
file = replace_all file, /(\s*)@extend \.pull-right-dropdown-menu;/, "\\1right: 0;\\1left: auto;"
when 'forms.less'
Expand All @@ -86,7 +80,7 @@ def process_stylesheet_assets
file = replace_all file, /(\s*)\.navbar-(right|left)\s*\{\s*@extend\s*\.pull-(right|left);\s*/, "\\1.navbar-\\2 {\\1 float: \\2 !important;\\1"
when 'tables.less'
file = replace_all file, /(@include\s*table-row-variant\()(\w+)/, "\\1'\\2'"
when 'list-group.less'
when 'thumbnails.less'
file = extract_nested_rule file, 'a&'
when 'glyphicons.less'
file = replace_rules(file, '@font-face') { |rule|
Expand Down Expand Up @@ -137,19 +131,19 @@ def convert_grid_mixins(file)
// [converter] Grid converted to use SASS cycles (LESS uses recursive nested mixin defs not supported by SASS)
#{mxn_def.strip}
$list: '';
@for $i from 1 to $grid-columns {
$i: 1;
$list: "#{classes}";
@for $i from 2 through $grid-columns {
$list: "#{classes}, \#{$list}";
}
$i: $grid-columns;
$list: "\#{$list}, #{classes}";
\#{$list} {
#{unindent body}
}
}
SASS
end
file = replace_rules file, /@mixin calc-grid/ do |css|
css = indent css.gsub(/.*when \((.*?)\) {/, '@if \1 {').gsub(/(?<=\$type) = (\w+)/, ' == \1').gsub(/(?<=-)(\$[a-z]+)/, '#{\1}')
css = indent css.gsub(/.*when (.*?) {/, '@if \1 {').gsub(/(?<=\$type) = (\w+)/, ' == \1').gsub(/(?<=-)(\$[a-z]+)/, '#{\1}')
if css =~ /== width/
css = "@mixin calc-grid($index, $class, $type) {\n#{css}"
elsif css =~ /== offset/
Expand All @@ -161,7 +155,7 @@ def convert_grid_mixins(file)
unindent <<-SASS, 8
// [converter] This is defined recursively in LESS, but SASS supports real loops
@mixin make-grid($columns, $class, $type) {
@for $i from 1 through $columns {
@for $i from 0 through $columns {
@include calc-grid($i, $class, $type);
}
}
Expand Down Expand Up @@ -283,9 +277,10 @@ def extract_nested_rule(file, selector, new_selector = nil)
# first find the rules, and remove them
file = replace_rules(file, "\s*#{selector}", comments: true) { |rule, pos, css|
matches << [rule, pos]
new_selector ||= "#{get_selector(rule).sub(/&$/, '')}#{selector_for_pos(css, pos.begin)}"
indent "// [converter] extracted #{get_selector(rule)} to #{new_selector}", indent_width(rule)
new_selector ||= "#{get_selector(rule).gsub(/&/, selector_for_pos(css, pos.begin))}"
indent "// [converter] extracted #{get_selector(rule)} to #{new_selector}".tr("\n", ' ').squeeze(' '), indent_width(rule)
}
raise "extract_nested_rule: no such selector: #{selector}" if matches.empty?
log_transform selector, new_selector
# replace rule selector with new_selector
matches.each do |m|
Expand Down
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/bootstrap/affix.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: affix.js v3.0.1
* Bootstrap: affix.js v3.0.2
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2013 Twitter, Inc.
Expand Down Expand Up @@ -123,4 +123,4 @@
})
})

}(window.jQuery);
}(jQuery);
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/bootstrap/alert.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: alert.js v3.0.1
* Bootstrap: alert.js v3.0.2
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2013 Twitter, Inc.
Expand Down Expand Up @@ -95,4 +95,4 @@

$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)

}(window.jQuery);
}(jQuery);
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/bootstrap/button.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: button.js v3.0.1
* Bootstrap: button.js v3.0.2
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2013 Twitter, Inc.
Expand Down Expand Up @@ -106,4 +106,4 @@
e.preventDefault()
})

}(window.jQuery);
}(jQuery);
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/bootstrap/carousel.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: carousel.js v3.0.1
* Bootstrap: carousel.js v3.0.2
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* Copyright 2013 Twitter, Inc.
Expand Down Expand Up @@ -214,4 +214,4 @@
})
})

}(window.jQuery);
}(jQuery);
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/bootstrap/collapse.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: collapse.js v3.0.1
* Bootstrap: collapse.js v3.0.2
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* Copyright 2013 Twitter, Inc.
Expand Down Expand Up @@ -176,4 +176,4 @@
$target.collapse(option)
})

}(window.jQuery);
}(jQuery);
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/bootstrap/dropdown.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: dropdown.js v3.0.1
* Bootstrap: dropdown.js v3.0.2
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2013 Twitter, Inc.
Expand Down Expand Up @@ -151,4 +151,4 @@
.on('click.bs.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)

}(window.jQuery);
}(jQuery);
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/bootstrap/modal.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: modal.js v3.0.1
* Bootstrap: modal.js v3.0.2
* http://getbootstrap.com/javascript/#modals
* ========================================================================
* Copyright 2013 Twitter, Inc.
Expand Down Expand Up @@ -243,4 +243,4 @@
.on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
.on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })

}(window.jQuery);
}(jQuery);
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/bootstrap/popover.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: popover.js v3.0.1
* Bootstrap: popover.js v3.0.2
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
* Copyright 2013 Twitter, Inc.
Expand Down Expand Up @@ -114,4 +114,4 @@
return this
}

}(window.jQuery);
}(jQuery);
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/bootstrap/scrollspy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: scrollspy.js v3.0.1
* Bootstrap: scrollspy.js v3.0.2
* http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
* Copyright 2013 Twitter, Inc.
Expand Down Expand Up @@ -155,4 +155,4 @@
})
})

}(window.jQuery);
}(jQuery);
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/bootstrap/tab.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: tab.js v3.0.1
* Bootstrap: tab.js v3.0.2
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
* Copyright 2013 Twitter, Inc.
Expand Down Expand Up @@ -132,4 +132,4 @@
$(this).tab('show')
})

}(window.jQuery);
}(jQuery);
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/bootstrap/tooltip.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: tooltip.js v3.0.1
* Bootstrap: tooltip.js v3.0.2
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
Expand Down Expand Up @@ -383,4 +383,4 @@
return this
}

}(window.jQuery);
}(jQuery);
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/bootstrap/transition.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: transition.js v3.0.1
* Bootstrap: transition.js v3.0.2
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2013 Twitter, Inc.
Expand Down Expand Up @@ -53,4 +53,4 @@
$.support.transition = transitionEnd()
})

}(window.jQuery);
}(jQuery);
14 changes: 6 additions & 8 deletions vendor/assets/stylesheets/bootstrap/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,6 @@ output {
vertical-align: middle;
}

// Placeholder
//
// Placeholder text gets special styles because when browsers invalidate entire
// lines if it doesn't understand a selector/
.form-control {
@include placeholder();
}


// Common form controls
//
Expand Down Expand Up @@ -142,6 +134,12 @@ output {
// Customize the `:focus` state to imitate native WebKit styles.
@include form-control-focus();

// Placeholder
//
// Placeholder text gets special styles because when browsers invalidate entire
// lines if it doesn't understand a selector/
@include placeholder();

// Disabled and read-only inputs
// Note: HTML5 says that controls under a fieldset > legend:first-child won't
// be disabled if the fieldset is disabled. Due to implementation difficulty,
Expand Down
22 changes: 11 additions & 11 deletions vendor/assets/stylesheets/bootstrap/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -720,11 +720,11 @@
// [converter] Grid converted to use SASS cycles (LESS uses recursive nested mixin defs not supported by SASS)
@mixin make-grid-columns() {
$list: '';
@for $i from 1 to $grid-columns {
$i: 1;
$list: ".col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
@for $i from 2 through $grid-columns {
$list: ".col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}, #{$list}";
}
$i: $grid-columns;
$list: "#{$list}, .col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
#{$list} {
position: relative;
// Prevent columns from collapsing when empty
Expand All @@ -739,34 +739,34 @@
// [converter] Grid converted to use SASS cycles (LESS uses recursive nested mixin defs not supported by SASS)
@mixin make-grid-columns-float($class) {
$list: '';
@for $i from 1 to $grid-columns {
$i: 1;
$list: ".col-#{$class}-#{$i}";
@for $i from 2 through $grid-columns {
$list: ".col-#{$class}-#{$i}, #{$list}";
}
$i: $grid-columns;
$list: "#{$list}, .col-#{$class}-#{$i}";
#{$list} {
float: left;
}
}


@mixin calc-grid($index, $class, $type) {
@if $type == width {
@if ($type == width) and ($index > 0) {
.col-#{$class}-#{$index} {
width: percentage(($index / $grid-columns));
}
}
@if $type == push {
@if ($type == push) {
.col-#{$class}-push-#{$index} {
left: percentage(($index / $grid-columns));
}
}
@if $type == pull {
@if ($type == pull) {
.col-#{$class}-pull-#{$index} {
right: percentage(($index / $grid-columns));
}
}
@if $type == offset {
@if ($type == offset) {
.col-#{$class}-offset-#{$index} {
margin-left: percentage(($index / $grid-columns));
}
Expand All @@ -775,7 +775,7 @@

// [converter] This is defined recursively in LESS, but SASS supports real loops
@mixin make-grid($columns, $class, $type) {
@for $i from 1 through $columns {
@for $i from 0 through $columns {
@include calc-grid($i, $class, $type);
}
}
Expand Down
40 changes: 24 additions & 16 deletions vendor/assets/stylesheets/bootstrap/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,12 @@ th {
//
// Default zebra-stripe styles (alternating gray and transparent backgrounds)

.table-striped > tbody > tr:nth-child(odd) {
> td,
> th {
background-color: $table-bg-accent;
.table-striped {
> tbody > tr:nth-child(odd) {
> td,
> th {
background-color: $table-bg-accent;
}
}
}

Expand All @@ -116,10 +118,12 @@ th {
//
// Placed here since it has to come after the potential zebra striping

.table-hover > tbody > tr:hover {
> td,
> th {
background-color: $table-bg-hover;
.table-hover {
> tbody > tr:hover {
> td,
> th {
background-color: $table-bg-hover;
}
}
}

Expand Down Expand Up @@ -148,14 +152,18 @@ table {
// Exact selectors below required to override `.table-striped` and prevent
// inheritance to nested tables.

.table > thead > tr,
.table > tbody > tr,
.table > tfoot > tr {
> td.active,
> th.active,
&.active > td,
&.active > th {
background-color: $table-bg-active;
.table {
> thead,
> tbody,
> tfoot {
> tr {
> td.active,
> th.active,
&.active > td,
&.active > th {
background-color: $table-bg-active;
}
}
}
}

Expand Down

0 comments on commit 34d538d

Please sign in to comment.