Skip to content

Commit

Permalink
Updated to v4.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
m-spyratos committed Feb 2, 2020
1 parent 371499d commit bf254df
Show file tree
Hide file tree
Showing 14 changed files with 392 additions and 53 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Bootstrap 4 Grid System (Flex)

Bootstrap v4.3.1 grid system and layout utilities.
Bootstrap v4.4.1 grid system and layout utilities.

## What's Included

Expand Down
234 changes: 232 additions & 2 deletions css/grid.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Bootstrap Grid v4.3.1 (https://getbootstrap.com/)
* Bootstrap Grid v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
Expand Down Expand Up @@ -45,14 +45,34 @@ html {
}
}

.container-fluid {
.container-fluid, .container-sm, .container-md, .container-lg, .container-xl {
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}

@media (min-width: 576px) {
.container, .container-sm {
max-width: 540px;
}
}
@media (min-width: 768px) {
.container, .container-sm, .container-md {
max-width: 720px;
}
}
@media (min-width: 992px) {
.container, .container-sm, .container-md, .container-lg {
max-width: 960px;
}
}
@media (min-width: 1200px) {
.container, .container-sm, .container-md, .container-lg, .container-xl {
max-width: 1140px;
}
}
.row {
display: -webkit-box;
display: -ms-flexbox;
Expand Down Expand Up @@ -94,6 +114,48 @@ html {
max-width: 100%;
}

.row-cols-1 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 100%;
flex: 0 0 100%;
max-width: 100%;
}

.row-cols-2 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}

.row-cols-3 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 33.3333333333%;
flex: 0 0 33.3333333333%;
max-width: 33.3333333333%;
}

.row-cols-4 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 25%;
flex: 0 0 25%;
max-width: 25%;
}

.row-cols-5 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 20%;
flex: 0 0 20%;
max-width: 20%;
}

.row-cols-6 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 16.6666666667%;
flex: 0 0 16.6666666667%;
max-width: 16.6666666667%;
}

.col-auto {
-webkit-box-flex: 0;
-ms-flex: 0 0 auto;
Expand Down Expand Up @@ -330,6 +392,48 @@ html {
max-width: 100%;
}

.row-cols-sm-1 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 100%;
flex: 0 0 100%;
max-width: 100%;
}

.row-cols-sm-2 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}

.row-cols-sm-3 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 33.3333333333%;
flex: 0 0 33.3333333333%;
max-width: 33.3333333333%;
}

.row-cols-sm-4 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 25%;
flex: 0 0 25%;
max-width: 25%;
}

.row-cols-sm-5 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 20%;
flex: 0 0 20%;
max-width: 20%;
}

.row-cols-sm-6 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 16.6666666667%;
flex: 0 0 16.6666666667%;
max-width: 16.6666666667%;
}

.col-sm-auto {
-webkit-box-flex: 0;
-ms-flex: 0 0 auto;
Expand Down Expand Up @@ -570,6 +674,48 @@ html {
max-width: 100%;
}

.row-cols-md-1 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 100%;
flex: 0 0 100%;
max-width: 100%;
}

.row-cols-md-2 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}

.row-cols-md-3 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 33.3333333333%;
flex: 0 0 33.3333333333%;
max-width: 33.3333333333%;
}

.row-cols-md-4 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 25%;
flex: 0 0 25%;
max-width: 25%;
}

.row-cols-md-5 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 20%;
flex: 0 0 20%;
max-width: 20%;
}

.row-cols-md-6 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 16.6666666667%;
flex: 0 0 16.6666666667%;
max-width: 16.6666666667%;
}

.col-md-auto {
-webkit-box-flex: 0;
-ms-flex: 0 0 auto;
Expand Down Expand Up @@ -810,6 +956,48 @@ html {
max-width: 100%;
}

.row-cols-lg-1 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 100%;
flex: 0 0 100%;
max-width: 100%;
}

.row-cols-lg-2 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}

.row-cols-lg-3 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 33.3333333333%;
flex: 0 0 33.3333333333%;
max-width: 33.3333333333%;
}

.row-cols-lg-4 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 25%;
flex: 0 0 25%;
max-width: 25%;
}

.row-cols-lg-5 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 20%;
flex: 0 0 20%;
max-width: 20%;
}

.row-cols-lg-6 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 16.6666666667%;
flex: 0 0 16.6666666667%;
max-width: 16.6666666667%;
}

.col-lg-auto {
-webkit-box-flex: 0;
-ms-flex: 0 0 auto;
Expand Down Expand Up @@ -1050,6 +1238,48 @@ html {
max-width: 100%;
}

.row-cols-xl-1 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 100%;
flex: 0 0 100%;
max-width: 100%;
}

.row-cols-xl-2 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}

.row-cols-xl-3 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 33.3333333333%;
flex: 0 0 33.3333333333%;
max-width: 33.3333333333%;
}

.row-cols-xl-4 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 25%;
flex: 0 0 25%;
max-width: 25%;
}

.row-cols-xl-5 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 20%;
flex: 0 0 20%;
max-width: 20%;
}

.row-cols-xl-6 > * {
-webkit-box-flex: 0;
-ms-flex: 0 0 16.6666666667%;
flex: 0 0 16.6666666667%;
max-width: 16.6666666667%;
}

.col-xl-auto {
-webkit-box-flex: 0;
-ms-flex: 0 0 auto;
Expand Down
4 changes: 2 additions & 2 deletions css/grid.min.css

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"homepage": "https://github.com/m-spyratos/bootstrap-4-grid",
"devDependencies": {
"autoprefixer": "^8.6.5",
"bootstrap": "^4.3.1",
"bootstrap": "4.4.1",
"grunt": "^1.0.4",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-sass": "^1.0.0",
Expand Down
50 changes: 49 additions & 1 deletion scss/grid/_functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$prev-key: null;
$prev-num: null;
@each $key, $num in $map {
@if $prev-num == null or unit($num) == "%" {
@if $prev-num == null or unit($num) == "%" or unit($prev-num) == "%" {
// Do nothing
} @else if not comparable($prev-num, $num) {
@warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !";
Expand Down Expand Up @@ -48,6 +48,17 @@
@return $string;
}

// See https://codepen.io/kevinweber/pen/dXWoRw
@function escape-svg($string) {
@if str-index($string, "data:image/svg+xml") {
@each $char, $encoded in $escaped-characters {
$string: str-replace($string, $char, $encoded);
}
}

@return $string;
}

// Color contrast
@function color-yiq($color, $dark: $yiq-text-dark, $light: $yiq-text-light) {
$r: red($color);
Expand Down Expand Up @@ -84,3 +95,40 @@

@return mix($color-base, $color, $level * $theme-color-interval);
}

// Return valid calc
@function add($value1, $value2, $return-calc: true) {
@if $value1 == null {
@return $value2;
}

@if $value2 == null {
@return $value1;
}

@if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
@return $value1 + $value2;
}

@return if($return-calc == true, calc(#{$value1} + #{$value2}), $value1 + unquote(" + ") + $value2);
}

@function subtract($value1, $value2, $return-calc: true) {
@if $value1 == null and $value2 == null {
@return null;
}

@if $value1 == null {
@return -$value2;
}

@if $value2 == null {
@return $value1;
}

@if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
@return $value1 - $value2;
}

@return if($return-calc == true, calc(#{$value1} - #{$value2}), $value1 + unquote(" - ") + $value2);
}
Loading

0 comments on commit bf254df

Please sign in to comment.