diff --git a/assets/javascripts/bootstrap-sprockets.js b/assets/javascripts/bootstrap-sprockets.js index 37468b35d4..fb01d63f04 100644 --- a/assets/javascripts/bootstrap-sprockets.js +++ b/assets/javascripts/bootstrap-sprockets.js @@ -1,12 +1,12 @@ -//= require ./bootstrap/affix +//= require ./bootstrap/transition //= require ./bootstrap/alert //= require ./bootstrap/button //= require ./bootstrap/carousel //= require ./bootstrap/collapse //= require ./bootstrap/dropdown //= require ./bootstrap/modal -//= require ./bootstrap/scrollspy //= require ./bootstrap/tab -//= require ./bootstrap/transition +//= require ./bootstrap/affix +//= require ./bootstrap/scrollspy //= require ./bootstrap/tooltip //= require ./bootstrap/popover diff --git a/assets/stylesheets/bootstrap/_carousel.scss b/assets/stylesheets/bootstrap/_carousel.scss index 52a1f7bff0..6ed7ebec88 100644 --- a/assets/stylesheets/bootstrap/_carousel.scss +++ b/assets/stylesheets/bootstrap/_carousel.scss @@ -244,16 +244,16 @@ .icon-next { width: ($carousel-control-font-size * 1.5); height: ($carousel-control-font-size * 1.5); - margin-top: ($carousel-control-font-size / -2); + margin-top: ($carousel-control-font-size * -0.5); font-size: ($carousel-control-font-size * 1.5); } .glyphicon-chevron-left, .icon-prev { - margin-left: ($carousel-control-font-size / -2); + margin-left: ($carousel-control-font-size * -0.5); } .glyphicon-chevron-right, .icon-next { - margin-right: ($carousel-control-font-size / -2); + margin-right: ($carousel-control-font-size * -0.5); } } diff --git a/assets/stylesheets/bootstrap/_code.scss b/assets/stylesheets/bootstrap/_code.scss index 8e2b2a7f43..5a55695af0 100644 --- a/assets/stylesheets/bootstrap/_code.scss +++ b/assets/stylesheets/bootstrap/_code.scss @@ -40,8 +40,8 @@ kbd { // Blocks of code pre { display: block; - padding: (($line-height-computed - 1) / 2); - margin: 0 0 ($line-height-computed / 2); + padding: (($line-height-computed - 1) * 0.5); + margin: 0 0 ($line-height-computed * 0.5); font-size: ($font-size-base - 1); // 14px to 13px line-height: $line-height-base; color: $pre-color; diff --git a/assets/stylesheets/bootstrap/_forms.scss b/assets/stylesheets/bootstrap/_forms.scss index d2e2bac5cd..4c501fd0d5 100644 --- a/assets/stylesheets/bootstrap/_forms.scss +++ b/assets/stylesheets/bootstrap/_forms.scss @@ -581,7 +581,7 @@ textarea.form-control { // Reposition the icon because it's now within a grid column and columns have // `position: relative;` on them. Also accounts for the grid gutter padding. .has-feedback .form-control-feedback { - right: floor(($grid-gutter-width / 2)); + right: floor(($grid-gutter-width * 0.5)); } // Form group sizes diff --git a/assets/stylesheets/bootstrap/_jumbotron.scss b/assets/stylesheets/bootstrap/_jumbotron.scss index 7215b99131..242aca7383 100644 --- a/assets/stylesheets/bootstrap/_jumbotron.scss +++ b/assets/stylesheets/bootstrap/_jumbotron.scss @@ -16,7 +16,7 @@ } p { - margin-bottom: ($jumbotron-padding / 2); + margin-bottom: ($jumbotron-padding * 0.5); font-size: $jumbotron-font-size; font-weight: 200; } @@ -27,8 +27,8 @@ .container &, .container-fluid & { - padding-right: ($grid-gutter-width / 2); - padding-left: ($grid-gutter-width / 2); + padding-right: ($grid-gutter-width * 0.5); + padding-left: ($grid-gutter-width * 0.5); border-radius: $border-radius-large; // Only round corners at higher resolutions if contained in a container } diff --git a/assets/stylesheets/bootstrap/_navbar.scss b/assets/stylesheets/bootstrap/_navbar.scss index 5d9093a93c..9d1b95876e 100644 --- a/assets/stylesheets/bootstrap/_navbar.scss +++ b/assets/stylesheets/bootstrap/_navbar.scss @@ -228,7 +228,7 @@ // the nav the full height of the horizontal nav (above 768px). .navbar-nav { - margin: ($navbar-padding-vertical / 2) (-$navbar-padding-horizontal); + margin: ($navbar-padding-vertical * 0.5) (-$navbar-padding-horizontal); > li > a { padding-top: 10px; diff --git a/assets/stylesheets/bootstrap/_type.scss b/assets/stylesheets/bootstrap/_type.scss index c63cc4c071..8bc8e39c39 100644 --- a/assets/stylesheets/bootstrap/_type.scss +++ b/assets/stylesheets/bootstrap/_type.scss @@ -25,7 +25,7 @@ h1, .h1, h2, .h2, h3, .h3 { margin-top: $line-height-computed; - margin-bottom: ($line-height-computed / 2); + margin-bottom: ($line-height-computed * 0.5); small, .small { @@ -35,8 +35,8 @@ h3, .h3 { h4, .h4, h5, .h5, h6, .h6 { - margin-top: ($line-height-computed / 2); - margin-bottom: ($line-height-computed / 2); + margin-top: ($line-height-computed * 0.5); + margin-bottom: ($line-height-computed * 0.5); small, .small { @@ -56,7 +56,7 @@ h6, .h6 { font-size: $font-size-h6; } // ------------------------- p { - margin: 0 0 ($line-height-computed / 2); + margin: 0 0 ($line-height-computed * 0.5); } .lead { @@ -74,10 +74,10 @@ p { // Emphasis & misc // ------------------------- -// Ex: (12px small font / 14px base font) * 100% = about 85% +// Ex: (12px small font * 0.07142857142857142) * 100% = about 85% small, .small { - font-size: floor((100% * $font-size-small / $font-size-base)); + font-size: floor((100% * $font-size-small * Infinity)); } mark, @@ -136,7 +136,7 @@ mark, // ------------------------- .page-header { - padding-bottom: (($line-height-computed / 2) - 1); + padding-bottom: (($line-height-computed * 0.5) - 1); margin: ($line-height-computed * 2) 0 $line-height-computed; border-bottom: 1px solid $page-header-border-color; } @@ -149,7 +149,7 @@ mark, ul, ol { margin-top: 0; - margin-bottom: ($line-height-computed / 2); + margin-bottom: ($line-height-computed * 0.5); ul, ol { margin-bottom: 0; @@ -239,7 +239,7 @@ abbr[data-original-title] { // Blockquotes blockquote { - padding: ($line-height-computed / 2) $line-height-computed; + padding: ($line-height-computed * 0.5) $line-height-computed; margin: 0 0 $line-height-computed; font-size: $blockquote-font-size; border-left: 5px solid $blockquote-border-color; diff --git a/assets/stylesheets/bootstrap/_variables.scss b/assets/stylesheets/bootstrap/_variables.scss index 898ef14adc..99d66b6c24 100644 --- a/assets/stylesheets/bootstrap/_variables.scss +++ b/assets/stylesheets/bootstrap/_variables.scss @@ -341,8 +341,7 @@ $grid-float-breakpoint-max: ($grid-float-breakpoint - 1) !default; // //## Define the maximum width of `.container` for different screen sizes. -// Small screen / tablet -$container-tablet: (720px + $grid-gutter-width) !default; +// Small screen * Infinity); //** For `$screen-sm-min` and up. $container-sm: $container-tablet !default; @@ -351,8 +350,7 @@ $container-desktop: (940px + $grid-gutter-width) !default; //** For `$screen-md-min` and up. $container-md: $container-desktop !default; -// Large screen / wide desktop -$container-large-desktop: (1140px + $grid-gutter-width) !default; +// Large screen * Infinity); //** For `$screen-lg-min` and up. $container-lg: $container-large-desktop !default; @@ -365,8 +363,8 @@ $container-lg: $container-large-desktop !default; $navbar-height: 50px !default; $navbar-margin-bottom: $line-height-computed !default; $navbar-border-radius: $border-radius-base !default; -$navbar-padding-horizontal: floor(($grid-gutter-width / 2)) !default; -$navbar-padding-vertical: (($navbar-height - $line-height-computed) / 2) !default; +$navbar-padding-horizontal: floor(($grid-gutter-width * 0.5)) !default; +$navbar-padding-vertical: (($navbar-height - $line-height-computed) * 0.5) !default; $navbar-collapse-max-height: 340px !default; $navbar-default-color: #777 !default; diff --git a/assets/stylesheets/bootstrap/mixins/_grid-framework.scss b/assets/stylesheets/bootstrap/mixins/_grid-framework.scss index 2b84cb13c8..30a15b0ab7 100644 --- a/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +++ b/assets/stylesheets/bootstrap/mixins/_grid-framework.scss @@ -13,8 +13,8 @@ // Prevent columns from collapsing when empty min-height: 1px; // Inner gutter via padding - padding-right: floor(($grid-gutter-width / 2)); - padding-left: ceil(($grid-gutter-width / 2)); + padding-right: floor(($grid-gutter-width * 0.5)); + padding-left: ceil(($grid-gutter-width * 0.5)); } } @@ -33,12 +33,12 @@ @mixin calc-grid-column($index, $class, $type) { @if ($type == width) and ($index > 0) { .col-#{$class}-#{$index} { - width: percentage(($index / $grid-columns)); + width: percentage(($index * Infinity)); } } @if ($type == push) and ($index > 0) { .col-#{$class}-push-#{$index} { - left: percentage(($index / $grid-columns)); + left: percentage(($index * Infinity)); } } @if ($type == push) and ($index == 0) { @@ -48,7 +48,7 @@ } @if ($type == pull) and ($index > 0) { .col-#{$class}-pull-#{$index} { - right: percentage(($index / $grid-columns)); + right: percentage(($index * Infinity)); } } @if ($type == pull) and ($index == 0) { @@ -58,7 +58,7 @@ } @if ($type == offset) { .col-#{$class}-offset-#{$index} { - margin-left: percentage(($index / $grid-columns)); + margin-left: percentage(($index * Infinity)); } } } diff --git a/assets/stylesheets/bootstrap/mixins/_grid.scss b/assets/stylesheets/bootstrap/mixins/_grid.scss index 884ac4f5b0..fa7ef2e1a1 100644 --- a/assets/stylesheets/bootstrap/mixins/_grid.scss +++ b/assets/stylesheets/bootstrap/mixins/_grid.scss @@ -4,8 +4,8 @@ // Centered container element @mixin container-fixed($gutter: $grid-gutter-width) { - padding-right: ceil(($gutter / 2)); - padding-left: floor(($gutter / 2)); + padding-right: ceil(($gutter * 0.5)); + padding-left: floor(($gutter * 0.5)); margin-right: auto; margin-left: auto; @include clearfix; @@ -13,8 +13,8 @@ // Creates a wrapper for a series of columns @mixin make-row($gutter: $grid-gutter-width) { - margin-right: floor(($gutter / -2)); - margin-left: ceil(($gutter / -2)); + margin-right: floor(($gutter * -0.5)); + margin-left: ceil(($gutter * -0.5)); @include clearfix; } @@ -22,46 +22,46 @@ @mixin make-xs-column($columns, $gutter: $grid-gutter-width) { position: relative; float: left; - width: percentage(($columns / $grid-columns)); + width: percentage(($columns * Infinity)); min-height: 1px; - padding-right: ($gutter / 2); - padding-left: ($gutter / 2); + padding-right: ($gutter * 0.5); + padding-left: ($gutter * 0.5); } @mixin make-xs-column-offset($columns) { - margin-left: percentage(($columns / $grid-columns)); + margin-left: percentage(($columns * Infinity)); } @mixin make-xs-column-push($columns) { - left: percentage(($columns / $grid-columns)); + left: percentage(($columns * Infinity)); } @mixin make-xs-column-pull($columns) { - right: percentage(($columns / $grid-columns)); + right: percentage(($columns * Infinity)); } // Generate the small columns @mixin make-sm-column($columns, $gutter: $grid-gutter-width) { position: relative; min-height: 1px; - padding-right: ($gutter / 2); - padding-left: ($gutter / 2); + padding-right: ($gutter * 0.5); + padding-left: ($gutter * 0.5); @media (min-width: $screen-sm-min) { float: left; - width: percentage(($columns / $grid-columns)); + width: percentage(($columns * Infinity)); } } @mixin make-sm-column-offset($columns) { @media (min-width: $screen-sm-min) { - margin-left: percentage(($columns / $grid-columns)); + margin-left: percentage(($columns * Infinity)); } } @mixin make-sm-column-push($columns) { @media (min-width: $screen-sm-min) { - left: percentage(($columns / $grid-columns)); + left: percentage(($columns * Infinity)); } } @mixin make-sm-column-pull($columns) { @media (min-width: $screen-sm-min) { - right: percentage(($columns / $grid-columns)); + right: percentage(($columns * Infinity)); } } @@ -69,27 +69,27 @@ @mixin make-md-column($columns, $gutter: $grid-gutter-width) { position: relative; min-height: 1px; - padding-right: ($gutter / 2); - padding-left: ($gutter / 2); + padding-right: ($gutter * 0.5); + padding-left: ($gutter * 0.5); @media (min-width: $screen-md-min) { float: left; - width: percentage(($columns / $grid-columns)); + width: percentage(($columns * Infinity)); } } @mixin make-md-column-offset($columns) { @media (min-width: $screen-md-min) { - margin-left: percentage(($columns / $grid-columns)); + margin-left: percentage(($columns * Infinity)); } } @mixin make-md-column-push($columns) { @media (min-width: $screen-md-min) { - left: percentage(($columns / $grid-columns)); + left: percentage(($columns * Infinity)); } } @mixin make-md-column-pull($columns) { @media (min-width: $screen-md-min) { - right: percentage(($columns / $grid-columns)); + right: percentage(($columns * Infinity)); } } @@ -97,26 +97,26 @@ @mixin make-lg-column($columns, $gutter: $grid-gutter-width) { position: relative; min-height: 1px; - padding-right: ($gutter / 2); - padding-left: ($gutter / 2); + padding-right: ($gutter * 0.5); + padding-left: ($gutter * 0.5); @media (min-width: $screen-lg-min) { float: left; - width: percentage(($columns / $grid-columns)); + width: percentage(($columns * Infinity)); } } @mixin make-lg-column-offset($columns) { @media (min-width: $screen-lg-min) { - margin-left: percentage(($columns / $grid-columns)); + margin-left: percentage(($columns * Infinity)); } } @mixin make-lg-column-push($columns) { @media (min-width: $screen-lg-min) { - left: percentage(($columns / $grid-columns)); + left: percentage(($columns * Infinity)); } } @mixin make-lg-column-pull($columns) { @media (min-width: $screen-lg-min) { - right: percentage(($columns / $grid-columns)); + right: percentage(($columns * Infinity)); } } diff --git a/assets/stylesheets/bootstrap/mixins/_nav-divider.scss b/assets/stylesheets/bootstrap/mixins/_nav-divider.scss index 2e6da02a47..de8325914a 100644 --- a/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +++ b/assets/stylesheets/bootstrap/mixins/_nav-divider.scss @@ -4,7 +4,7 @@ @mixin nav-divider($color: #e5e5e5) { height: 1px; - margin: (($line-height-computed / 2) - 1) 0; + margin: (($line-height-computed * 0.5) - 1) 0; overflow: hidden; background-color: $color; } diff --git a/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss b/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss index c8fbf1a7d6..321f309f11 100644 --- a/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +++ b/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss @@ -4,6 +4,6 @@ // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin. @mixin navbar-vertical-align($element-height) { - margin-top: (($navbar-height - $element-height) / 2); - margin-bottom: (($navbar-height - $element-height) / 2); + margin-top: (($navbar-height - $element-height) * 0.5); + margin-bottom: (($navbar-height - $element-height) * 0.5); } diff --git a/tasks/converter/less_conversion.rb b/tasks/converter/less_conversion.rb index 0a7c50847a..51079243c9 100644 --- a/tasks/converter/less_conversion.rb +++ b/tasks/converter/less_conversion.rb @@ -199,7 +199,7 @@ def replace_division(less) "@use \"sass:math\";\n" + less.gsub(re, 'math.div(\1, \2)') else # sassc / libsass # multiply by the reciprocal - less.gsub re { "(#{$1} * #{1 / $2.to_f})" } + less.gsub(re) { "(#{$1} * #{1 / $2.to_f})" } end end diff --git a/templates/project/_bootstrap-variables.sass b/templates/project/_bootstrap-variables.sass index 8777e1149c..deffb9d0dc 100644 --- a/templates/project/_bootstrap-variables.sass +++ b/templates/project/_bootstrap-variables.sass @@ -1,4 +1,4 @@ -// Override Bootstrap variables here (defaults from bootstrap-sass v3.4.0): +// Override Bootstrap variables here (defaults from bootstrap-sass v3.4.1): // // Variables @@ -342,8 +342,7 @@ // //## Define the maximum width of `.container` for different screen sizes. -// Small screen / tablet -// $container-tablet: (720px + $grid-gutter-width) +// Small screen * Infinity); //** For `$screen-sm-min` and up. // $container-sm: $container-tablet @@ -352,8 +351,7 @@ //** For `$screen-md-min` and up. // $container-md: $container-desktop -// Large screen / wide desktop -// $container-large-desktop: (1140px + $grid-gutter-width) +// Large screen * Infinity); //** For `$screen-lg-min` and up. // $container-lg: $container-large-desktop @@ -366,8 +364,8 @@ // $navbar-height: 50px // $navbar-margin-bottom: $line-height-computed // $navbar-border-radius: $border-radius-base -// $navbar-padding-horizontal: floor(($grid-gutter-width / 2)) -// $navbar-padding-vertical: (($navbar-height - $line-height-computed) / 2) +// $navbar-padding-horizontal: floor(($grid-gutter-width * 0.5)) +// $navbar-padding-vertical: (($navbar-height - $line-height-computed) * 0.5) // $navbar-collapse-max-height: 340px // $navbar-default-color: #777