-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial version of layout bottom gutters.
- Loading branch information
Nenad Jelovac
committed
Aug 24, 2014
1 parent
25ddc36
commit 6c0eb4f
Showing
4 changed files
with
174 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bower_components/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
inuit-layout-bottom-gutters | ||
=========================== | ||
# Layout items with bottom gutter. | ||
|
||
An extension of inuitcss layout object that adds bottom gutter to layout items. | ||
An extension of [inuitcss' layout object](https://github.com/inuitcss/objects.layout) that adds bottom gutter to layout items. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
/*------------------------------------*\ | ||
#LAYOUT-BOTTOM-GUTTERS | ||
\*------------------------------------*/ | ||
|
||
/** | ||
* This extension uses an `:after` pseudo element with negative top margin | ||
* applied to `.layout` object to negate layout items bottom margin. | ||
*/ | ||
|
||
/** | ||
* Default layout. | ||
* | ||
* 1. Make sure `:after` pseudo element takes the whole width of its parent. | ||
* 2. Negate layout item's bottom margin. | ||
*/ | ||
.#{$inuit-layout-namespace}layout, | ||
%#{$inuit-layout-namespace}layout { | ||
|
||
&:after { | ||
content: ""; | ||
display: block; /* [1] */ | ||
margin-top: -($inuit-layout-gutter); /* [2] */ | ||
} | ||
|
||
} | ||
|
||
.#{$inuit-layout-namespace}layout__item, | ||
%#{$inuit-layout-namespace}layout__item { | ||
margin-bottom: $inuit-layout-gutter; | ||
} | ||
|
||
|
||
|
||
|
||
|
||
@if ($inuit-enable-layout--tiny == true) { | ||
|
||
/** | ||
* Layouts with tiny gutters. | ||
*/ | ||
|
||
.#{$inuit-layout-namespace}layout--tiny, | ||
%#{$inuit-layout-namespace}layout--tiny { | ||
|
||
&:after { | ||
margin-top: -($inuit-layout-gutter--tiny); | ||
} | ||
|
||
> .#{$inuit-layout-namespace}layout__item, | ||
> %#{$inuit-layout-namespace}layout__item { | ||
margin-bottom: $inuit-layout-gutter--tiny; | ||
} | ||
|
||
} | ||
|
||
} | ||
|
||
@if ($inuit-enable-layout--small == true) { | ||
|
||
/** | ||
* Layouts with small gutters. | ||
*/ | ||
|
||
.#{$inuit-layout-namespace}layout--small, | ||
%#{$inuit-layout-namespace}layout--small { | ||
|
||
&:after { | ||
margin-top: -($inuit-layout-gutter--small); | ||
} | ||
|
||
> .#{$inuit-layout-namespace}layout__item, | ||
> %#{$inuit-layout-namespace}layout__item { | ||
margin-bottom: $inuit-layout-gutter--small; | ||
} | ||
|
||
} | ||
|
||
} | ||
|
||
@if ($inuit-enable-layout--large == true) { | ||
|
||
/** | ||
* Layouts with large gutters. | ||
*/ | ||
|
||
.#{$inuit-layout-namespace}layout--large, | ||
%#{$inuit-layout-namespace}layout--large { | ||
|
||
&:after { | ||
margin-top: -($inuit-layout-gutter--large); | ||
} | ||
|
||
> .#{$inuit-layout-namespace}layout__item, | ||
> %#{$inuit-layout-namespace}layout__item { | ||
margin-bottom: $inuit-layout-gutter--large; | ||
} | ||
|
||
} | ||
|
||
} | ||
|
||
@if ($inuit-enable-layout--huge == true) { | ||
|
||
/** | ||
* Layouts with huge gutters. | ||
*/ | ||
|
||
.#{$inuit-layout-namespace}layout--huge, | ||
%#{$inuit-layout-namespace}layout--huge { | ||
|
||
&:after { | ||
margin-top: -($inuit-layout-gutter--huge); | ||
} | ||
|
||
> .#{$inuit-layout-namespace}layout__item, | ||
> %#{$inuit-layout-namespace}layout__item { | ||
margin-bottom: $inuit-layout-gutter--huge; | ||
} | ||
|
||
} | ||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
@if ($inuit-enable-layout--flush == true) { | ||
|
||
/** | ||
* Layouts with no gutters. | ||
*/ | ||
|
||
.#{$inuit-layout-namespace}layout--flush, | ||
%#{$inuit-layout-namespace}layout--flush { | ||
|
||
&:after { | ||
margin-top: 0; | ||
} | ||
|
||
> .#{$inuit-layout-namespace}layout__item, | ||
> %#{$inuit-layout-namespace}layout__item { | ||
margin-bottom: 0; | ||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "inuit-layout-bottom-gutters", | ||
"version": "0.1.0", | ||
"homepage": "https://github.com/nenadjelovac/inuit-layout-bottom-gutters", | ||
"authors": [ | ||
"Nenad Jelovac <[email protected]>" | ||
], | ||
"description": "An extension of inuit-layout that adds bottom gutter to layout items.", | ||
"main": "_objects.layout-bottom-gutters.scss", | ||
"keywords": [ | ||
"inuit", | ||
"oocss", | ||
"css", | ||
"framework", | ||
"extension" | ||
], | ||
"license": "Apache", | ||
"dependencies": { | ||
"inuit-defaults": "~0.2.1", | ||
"inuit-mixins": "~0.2.3", | ||
"inuit-layout": "~0.3.2" | ||
} | ||
} |