Skip to content

Commit

Permalink
Uinified the grid variables
Browse files Browse the repository at this point in the history
  • Loading branch information
benatespina committed Feb 15, 2017
1 parent b870193 commit 6ba50fc
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 19 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,24 @@ The best practice is to create a row.scss component that wraps all the grid gene
following code:

```scss
$grid-row-type: 'adaptive';
$grid-row-column-count: 12;
$grid-type: 'adaptive'; // also, it can be fluid

$row-padding: 15px;
$row-width: 1290;

$column-count: 12;
$column-gutter: 30px;

$small-cols: 6;
$medium-cols: 3, 4, 6;
$large-cols: 1, 2, 3, 4, 6;
$xlarge-cols: 6;

$small-breakpoint: 640;
$medium-breakpoint: 1024;
$large-breakpoint: 1279;
$xlarge-breakpoint: 1440;

@import '../../node_modules/lin3s-css-grid/scss/row';
```

Expand Down
6 changes: 3 additions & 3 deletions example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>untitled</title>
<title>LIN3S CSS Grid</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<link rel="stylesheet" type="text/css" href="https://raw.github.com/necolas/normalize.css/master/normalize.css"/>
<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet"/>
<link rel="stylesheet" type="text/css" href="/css/app.css"/>
<link rel="stylesheet" type="text/css" href="css/app.css"/>
</head>
<body>
<h1>LIN3S CSS Adaptive Grid</h1>
<h1>LIN3S CSS Grid | Adaptive example</h1>
<div class="row">
<div class="row__column row__column--large-1 row__column--medium-3 row__column--small-6">1</div>
<div class="row__column row__column--large-1 row__column--medium-3 row__column--small-6">1</div>
Expand Down
3 changes: 0 additions & 3 deletions example/scss/_row.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// @author Beñat Espiña <[email protected]>
// @author Mikel Tuesta <[email protected]>

$grid-row-type: 'adaptive';
$grid-row-column-count: 12;

$small-cols: 6;
$medium-cols: 3, 4, 6;
$large-cols: 1, 2, 3, 4, 6;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lin3s-css-grid",
"description": "Simple CSS grid based on Flexbox in the LIN3S way",
"version": "0.2.0",
"version": "0.3.0",
"license": "MIT",
"keywords": [
"adaptive-grid",
Expand Down
2 changes: 1 addition & 1 deletion scss/_placeholders.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

%grid__row--fluid {
@extend %grid__row;
max-width: $fluid-row-width + $column-gutter;
max-width: $row-width + $column-gutter;
}

%grid__row--fluid-one-column {
Expand Down
7 changes: 3 additions & 4 deletions scss/_row.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,17 @@
@import 'mixins';
@import 'variables';

$grid-row-type: 'adaptive' !default;
$grid-row-column-count: 12 !default;
$grid-type: 'adaptive' !default;

$small-cols: 6 !default;
$medium-cols: 3, 4, 6 !default;
$large-cols: 1, 2, 3, 4, 6 !default;
$xlarge-cols: 6 !default;

@include grid__row('.row', $grid-row-type);
@include grid__row('.row', $grid-type);

.row__column {
@include grid__column($grid-row-column-count);
@include grid__column($column-count);
}

.row .row {
Expand Down
4 changes: 2 additions & 2 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ $column-count: 12 !default;
$column-gutter: 30px !default;
$row-padding: 15px !default;

$fluid-row-width: 1290 !default;
$row-width: 1290 !default;

$adaptive-row-small-width: 666 !default;
$adaptive-row-medium-width: 666 !default;
$adaptive-row-large-width: 930 !default;
$adaptive-row-xlarge-width: 1170 !default;
$adaptive-row-xxlarge-width: $fluid-row-width;
$adaptive-row-xxlarge-width: $row-width;

$grid: (
'adaptive': (
Expand Down
3 changes: 0 additions & 3 deletions scss/dist.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// @author Beñat Espiña <[email protected]>
// @author Mikel Tuesta <[email protected]>

$grid-row-type: 'adaptive';
$grid-row-column-count: 12;

$small-cols: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12;
$medium-cols: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12;
$large-cols: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12;
Expand Down

0 comments on commit 6ba50fc

Please sign in to comment.