Skip to content

Commit 9173710

Browse files
committed
Improved the whole package
1 parent d87c9b0 commit 9173710

File tree

18 files changed

+344
-2506
lines changed

18 files changed

+344
-2506
lines changed

.editorconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
; This file is part of the LIN3S CSS Grid library.
2+
;
3+
; Copyright (c) 2016-2017 LIN3S <info@lin3s.com>
4+
;
5+
; For the full copyright and license information, please view the LICENSE
6+
; file that was distributed with this source code.
7+
8+
root = true
9+
10+
[*]
11+
end_of_line = LF
12+
13+
[*.{scss, css}]
14+
indent_style = space
15+
indent_size = 2
16+
17+
[{package.json}]
18+
indent_style = space
19+
indent_size = 2

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1+
# This file is part of the LIN3S CSS Grid library.
2+
#
3+
# Copyright (c) 2016-2017 LIN3S <info@lin3s.com>
4+
#
5+
# For the full copyright and license information, please view the LICENSE
6+
# file that was distributed with this source code.
7+
18
/node_modules
9+
/yarn.lock

.scss_lint.yml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
# This file is part of the LIN3S CS library.
1+
# This file is part of the LIN3S CSS Grid library.
22
#
3-
# Copyright (c) 2015-2017 LIN3S <info@lin3s.com>
3+
# Copyright (c) 2016-2017 LIN3S <info@lin3s.com>
44
#
55
# For the full copyright and license information, please view the LICENSE
66
# file that was distributed with this source code.
77
#
88
# @author Beñat Espiña <benatespina@gmail.com>
99

10-
scss_files: "**/*.scss"
10+
scss_files: '**/*.scss'
1111
plugin_directories: ['.scss-linters']
1212

13-
# List of gem names to load custom linters from (make sure they are already installed)
14-
plugin_gems: []
15-
1613
linters:
1714
BangFormat:
1815
enabled: true
@@ -25,7 +22,7 @@ linters:
2522

2623
BorderZero:
2724
enabled: true
28-
convention: zero # or `none`
25+
convention: zero
2926

3027
ColorKeyword:
3128
enabled: true
@@ -50,7 +47,7 @@ linters:
5047

5148
ElsePlacement:
5249
enabled: true
53-
style: same_line # or 'new_line'
50+
style: same_line
5451

5552
EmptyLineBetweenBlocks:
5653
enabled: true
@@ -68,11 +65,11 @@ linters:
6865

6966
HexLength:
7067
enabled: true
71-
style: short # or 'long'
68+
style: short
7269

7370
HexNotation:
7471
enabled: true
75-
style: lowercase # or 'uppercase'
72+
style: lowercase
7673

7774
HexValidation:
7875
enabled: true
@@ -91,12 +88,12 @@ linters:
9188
Indentation:
9289
enabled: true
9390
allow_non_nested_indentation: false
94-
character: space # or 'tab'
91+
character: space
9592
width: 2
9693

9794
LeadingZero:
9895
enabled: true
99-
style: exclude_zero # or 'include_zero'
96+
style: exclude_zero
10097

10198
MergeableSelector:
10299
enabled: true
@@ -105,7 +102,7 @@ linters:
105102
NameFormat:
106103
enabled: true
107104
allow_leading_underscore: true
108-
convention: hyphenated_lowercase # or 'camel_case', or 'snake_case', or a regex pattern
105+
convention: hyphenated_lowercase
109106
mixin_convention: '^([\.\%]?[a-z]*[-]?[a-z0-9\-]*)(\.[a-z0-9\-]*)?(__[a-z0-9]*[-]?[a-z0-9\-]*)?(--[a-z0-9]*[-]?[a-z0-9\-]*)?(\:[a-z]*)*$'
110107
mixin_convention_explanation: BEM pattern
111108
placeholder_convention: '^([\.\%]?[a-z]*[-]?[a-z0-9\-]*)(\.[a-z0-9\-]*)?(__[a-z0-9]*[-]?[a-z0-9\-]*)?(--[a-z0-9]*[-]?[a-z0-9\-]*)?(\:[a-z]*)*$'
@@ -146,7 +143,7 @@ linters:
146143

147144
SelectorFormat:
148145
enabled: true
149-
convention: hyphenated_BEM # or 'strict_BEM', or 'hyphenated_lowercase', or 'snake_case', or 'camel_case', or a regex pattern
146+
convention: hyphenated_BEM
150147

151148
Shorthand:
152149
enabled: true
@@ -164,7 +161,7 @@ linters:
164161

165162
SpaceAfterPropertyColon:
166163
enabled: true
167-
style: one_space # or 'no_space', or 'at_least_one_space', or 'aligned'
164+
style: one_space
168165

169166
SpaceAfterPropertyName:
170167
enabled: true
@@ -174,11 +171,11 @@ linters:
174171

175172
SpaceAroundOperator:
176173
enabled: true
177-
style: one_space # or 'no_space'
174+
style: one_space
178175

179176
SpaceBeforeBrace:
180177
enabled: true
181-
style: space # or 'new_line'
178+
style: space
182179
allow_single_line_padding: false
183180

184181
SpaceBetweenParens:
@@ -187,7 +184,7 @@ linters:
187184

188185
StringQuotes:
189186
enabled: true
190-
style: single_quotes # or double_quotes
187+
style: single_quotes
191188

192189
TrailingSemicolon:
193190
enabled: true

Gulpfile.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// This file is part of the LIN3S CSS Grid library.
2+
//
3+
// Copyright (c) 2016-2017 LIN3S <info@lin3s.com>
4+
//
5+
// For the full copyright and license information, please view the LICENSE
6+
// file that was distributed with this source code.
7+
//
8+
// @author Gorka Laucirica <gorka.lauzirika@gmail.com>
9+
// @author Beñat Espiña <benatespina@gmail.com>
10+
111
var gulp = require('gulp');
212
var sass = require('gulp-sass');
313
var scsslint = require('gulp-scss-lint');
@@ -17,7 +27,7 @@ gulp.task('scss-lint', function () {
1727
});
1828

1929
gulp.task('example-css', function () {
20-
gulp.src(paths.exampleSass + '/*.scss')
30+
gulp.src(paths.exampleSass + '/app.scss')
2131
.pipe(sass().on('error', sass.logError))
2232
.pipe(gulp.dest(paths.exampleCss))
2333
});

LICENSE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2016-2017 LIN3S
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
'Software'), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be
12+
included in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#CSSGrid
2+
> Simple CSS grid based on Flexbox in the LIN3S way.
3+
4+
[![npm version](https://img.shields.io/npm/v/lin3s-css-grid.svg?style=flat-square)](https://www.npmjs.com/package/lin3s-css-grid)
5+
[![Build Status](http://img.shields.io/travis/LIN3S/CSSGrid/master.svg?style=flat-square)](https://travis-ci.org/LIN3S/CSSGrid)
6+
[![NPM Status](http://img.shields.io/npm/dm/lin3s-css-grid.svg?style=flat-square)](https://www.npmjs.org/package/lin3s-css-grid)
7+
[![devDependency Status](https://img.shields.io/david/LIN3S/CSSGrid.svg?style=flat-square)](https://david-dm.org/LIN3S/CSSGrid#info=dependencies)
8+
9+
##Installation
10+
The recommended and the most suitable way to install is through *Yarn*:
11+
```bash
12+
$ yarn add lin3s-css-grid
13+
```
14+
or alternatively through *NPM*:
15+
```bash
16+
$ npm install --save lin3s-css-grid
17+
```
18+
Also, you can install through *Bower*.
19+
```shell
20+
$ bower install --save lin3s-css-grid
21+
```
22+
23+
After installation process, you can include css file in your html.
24+
```html
25+
<link href="/your/path/lin3s-css-grid/dist/lin3scssgrid.min.css" type="text/css" rel="stylesheet">
26+
```
27+
However is highly recommend to use the Sass version of the grid including files as Sass's imports.
28+
The best practice is to create a row.scss component that wraps all the grid generation logic. Basic example can be the
29+
following code:
30+
31+
```scss
32+
@import '../../scss/functions';
33+
@import '../../scss/mixins';
34+
@import '../../scss/variables';
35+
36+
$small-cols: 6;
37+
$medium-cols: 3, 4, 6;
38+
$large-cols: 1, 2, 3, 4, 6;
39+
$xlarge-cols: 6;
40+
41+
@include grid__row('.row', 'adaptive');
42+
43+
.row__column {
44+
@include grid__column(12);
45+
}
46+
47+
.row--centered {
48+
margin-left: auto;
49+
margin-right: auto;
50+
}
51+
52+
.row--collapse {
53+
padding-left: $column-gutter / 2;
54+
padding-right: $column-gutter / 2;
55+
56+
> .row__column {
57+
padding-left: 0;
58+
padding-right: 0;
59+
}
60+
}
61+
62+
@include grid-column-for-media-query('small', $small-cols, $small-up);
63+
@include grid-column-for-media-query('medium', $medium-cols, $medium-up);
64+
@include grid-column-for-media-query('large', $large-cols, $large-up);
65+
@include grid-column-for-media-query('xlarge', $xlarge-cols, $xlarge-up);
66+
67+
@include grid-column-push-for-media-query('large', $large-cols, $large-up);
68+
@include grid-column-push-for-media-query('xlarge', $xlarge-cols, $xlarge-up);
69+
```
70+
71+
##Licensing Options
72+
[![License](https://img.shields.io/badge/License-MIT-yellowgreen.svg?style=flat-square)](https://github.com/LIN3S/CSSGrid/blob/master/LICENSE)

0 commit comments

Comments
 (0)