Skip to content

Commit

Permalink
Add new helper classes
Browse files Browse the repository at this point in the history
- Implemented #8, add `.row-break` and `.col-break` classes, inspired by https://tobiasahlin.com/blog/flexbox-break-to-new-row/
  • Loading branch information
pafnuty committed Aug 21, 2020
1 parent 6020062 commit c862a4f
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 24 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# LEGRID
[![GitHub release](https://img.shields.io/github/release/pafnuty/LEGRID.svg?style=flat-square&colorB=95C915)]()
[![npm](https://img.shields.io/npm/v/legrid.svg?style=flat-square)]()
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/pafnuty/DLE-UniForm/blob/master/LICENSE)

Expand Down
5 changes: 1 addition & 4 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{
"name": "legrid",
"version": "3.0.5",
"version": "3.0.7",
"description": "Simple, fully configurable, comfortable grid on less and flexBox",
"main": "src/less/legrid.less",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git@github.com:pafnuty/LEGRID.git"
Expand Down
12 changes: 10 additions & 2 deletions dist/legrid.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* LEGRID — Simple, fully configurable, comfortable grid on less and flexBox
* Version: 3.0.5
* Date: 16.09.2019
* Version: 3.0.7
* Date: 21.08.2020
* Author: Pavel Belousov
* HomePage: https://git.io/va1ms
* License: MIT
Expand Down Expand Up @@ -319,6 +319,14 @@
.col-xs-last {
order: 1;
}
.row-break {
flex-basis: 100%;
height: 0;
}
.col-break {
flex-basis: 100%;
width: 0;
}
.col-margin {
margin-top: 10px;
margin-bottom: 10px;
Expand Down
6 changes: 3 additions & 3 deletions dist/legrid.min.css

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Simple, fully configurable, comfortable grid on less and flexBox",
"homepage": "https://git.io/va1ms",
"title": "LEGRID",
"version": "3.0.6",
"version": "3.0.7",
"keywords": [
"less, css, flexbox, grid"
],
Expand All @@ -27,7 +27,6 @@
"autoprefixer": "^9.8.6",
"cssnano": "^4.1.10",
"dot-prop": ">=4.2.1",
"minimist": "1.2.5",
"grunt": "^1.3.0",
"grunt-cli": "^1.3.2",
"grunt-contrib-clean": "^2.0.0",
Expand All @@ -36,8 +35,9 @@
"grunt-css-mqpacker": "^3.0.1",
"grunt-postcss": "^0.9.0",
"load-grunt-tasks": "^5.1.0",
"postcss-banner": "^3.0.1",
"postcss-flexbugs-fixes": "^4.2.0",
"minimist": "1.2.5",
"postcss-banner": "^3.0.2",
"postcss-flexbugs-fixes": "^4.2.1",
"postcss-merge-rules": "^4.0.3",
"postcss-sorting": "^5.0.1"
}
Expand Down
9 changes: 9 additions & 0 deletions src/core/helpers/mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@

.makeHelpersMixin() {

.@{rowClassName}@{sep}break {
flex-basis: 100%;
height: 0;
}
.@{colClassName}@{sep}break {
flex-basis: 100%;
width: 0;
}

.makeDisplayHelpersLoop();

.makeDisplayHelpersLoop (@i: 1) when (@i <= length(@colPrefixes)) {
Expand Down

0 comments on commit c862a4f

Please sign in to comment.