Last active
August 29, 2015 14:23
-
-
Save adhocgraFX/d412dc8a3b1373d81031 to your computer and use it in GitHub Desktop.
Less version of pocketgrid.css by Arnaud Leray
This file contains hidden or 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
/* PocketGrid 1.1.0 | |
* Copyright 2013 Arnaud Leray | |
* http://arnaudleray.github.io/pocketgrid/ | |
* MIT License | |
*/ | |
// LESS Version by adhocgrafx | |
.block-group { | |
// box-sizing > border-box mixin | |
.box-sizing(border-box); | |
// Clearfix | |
*zoom: 1; | |
// ul/li compatibility | |
list-style-type: none; | |
padding: 0; | |
margin: 0; | |
&:before, | |
&:after { | |
.box-sizing(border-box); | |
display: table; | |
content: ""; | |
line-height: 0; | |
} | |
&:after { | |
// Clearfix | |
clear: both; | |
} | |
} | |
.block { | |
.box-sizing(border-box); | |
// Default block | |
float: left; | |
width: 100%; | |
&:after, | |
&:before { | |
.box-sizing(border-box); | |
} | |
} | |
// Nested grid | |
.block-group > .block-group { | |
clear: none; | |
float: left; | |
margin: 0 !important; | |
} | |
// | |
// gutter variables | |
// for more information: http://arnaudleray.github.io/pocketgrid/docs/#gutters | |
// | |
@verticalGutter: 0; | |
@horizontalGutter: 0; | |
.block-group { | |
margin: -@verticalGutter -@horizontalGutter; | |
} | |
.block { | |
padding: @verticalGutter @horizontalGutter; | |
} | |
// box-sizing mixin | |
.box-sizing(@boxmodel) { | |
-webkit-box-sizing: @boxmodel; | |
-moz-box-sizing: @boxmodel; | |
box-sizing: @boxmodel; | |
} | |
// mixin to assign block style to any tag element | |
.make-block { | |
.box-sizing(border-box); | |
float: left; | |
width: 100%; | |
padding: @verticalGutter @horizontalGutter; | |
&:after, | |
&:before { | |
.box-sizing(border-box); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment