Working on #66
This commit is contained in:
parent
8b3da7d4cc
commit
3a32b4a3ae
5 changed files with 102 additions and 43 deletions
|
@ -54,9 +54,7 @@ $ultra-large-screen : 1600px; // ultra large screens media query
|
||||||
$gutter : 20px; // gutter value (%, px, em, rem) for grid layouts
|
$gutter : 20px; // gutter value (%, px, em, rem) for grid layouts
|
||||||
|
|
||||||
|
|
||||||
// Sass mixins
|
// [Mixin] Rem with px fallback
|
||||||
|
|
||||||
// Rem with px fallback
|
|
||||||
@mixin rem($size) {
|
@mixin rem($size) {
|
||||||
@if unitless($size) {
|
@if unitless($size) {
|
||||||
font-size: ($size * 1rem) / 1rem * $base-font-size;
|
font-size: ($size * 1rem) / 1rem * $base-font-size;
|
||||||
|
@ -67,7 +65,7 @@ $gutter : 20px; // gutter value (%, px, em, rem) for grid layouts
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Em from px
|
// [Mixin] Em from px
|
||||||
@mixin em($size) {
|
@mixin em($size) {
|
||||||
@if unitless($size) {
|
@if unitless($size) {
|
||||||
$bf: $base-font-size / 1px;
|
$bf: $base-font-size / 1px;
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
/* ---------------------------------- */
|
/* ---------------------------------- */
|
||||||
/* ==classic grids */
|
/* ==classic grids */
|
||||||
/* .. use it when gutter size matters */
|
|
||||||
/* ---------------------------------- */
|
/* ---------------------------------- */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,28 +16,42 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid > * { /* global styles for direct child ex. .grid3 */
|
/**
|
||||||
|
* Global styles for direct child
|
||||||
|
* e.g. `.grid3`
|
||||||
|
* 1. Gutter value
|
||||||
|
*/
|
||||||
|
.grid > * {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-left: -$gutter; /* gutter value */
|
margin-left: -$gutter;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid > * > * { /* global styles for each "cell" */
|
/**
|
||||||
|
* Global styles for each "cell"
|
||||||
|
* 1. Gutter value
|
||||||
|
*/
|
||||||
|
.grid > * > * {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding-left: $gutter; /* gutter value */
|
padding-left: $gutter;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* whitespace fixing for modern browsers including IE9+ */
|
/**
|
||||||
|
* Whitespace fixing for modern browsers including IE9+
|
||||||
|
*/
|
||||||
:root .grid {
|
:root .grid {
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Rem fallback for Opera Mini
|
||||||
|
*/
|
||||||
:root .grid > * > * {
|
:root .grid > * > * {
|
||||||
font-size: $base-font-size; /* fallback for Opera Mini */
|
font-size: $base-font-size;
|
||||||
font-size: ($base-font-size / 10px) + rem;
|
font-size: ($base-font-size / 10px) * 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Opera hack */
|
/* Opera hack */
|
||||||
|
@ -47,32 +60,73 @@
|
||||||
word-spacing: -0.43em;
|
word-spacing: -0.43em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid2 > * {width: 50%;}
|
.grid2 > * {
|
||||||
.grid3 > * {width: 33.333%;}
|
width: 50%;
|
||||||
.grid4 > * {width: 25%;}
|
}
|
||||||
.grid5 > * {width: 20%;}
|
|
||||||
.grid6 > * {width: 16.667%;}
|
|
||||||
.grid8 > * {width: 12.5%;}
|
|
||||||
.grid10 > * {width: 10%;}
|
|
||||||
.grid12 > * {width: 8.333%;}
|
|
||||||
|
|
||||||
/* unequal grids (1-2, 2-1, 1-3 and 3-1) for 2 blocks */
|
.grid3 > * {
|
||||||
|
width: 33.333%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid4 > * {
|
||||||
|
width: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid5 > * {
|
||||||
|
width: 20%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid6 > * {
|
||||||
|
width: 16.667%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid8 > * {
|
||||||
|
width: 12.5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid10 > * {
|
||||||
|
width: 10%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid12 > * {
|
||||||
|
width: 8.333%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unequal grids
|
||||||
|
* (1-2, 2-1, 1-3 and 3-1) for 2 blocks
|
||||||
|
*/
|
||||||
.grid2-1 > *:first-child,
|
.grid2-1 > *:first-child,
|
||||||
.grid1-2 > * + * { width: 66.666%; }
|
.grid1-2 > * + * {
|
||||||
.grid1-2 > *:first-child,
|
width: 66.666%;
|
||||||
.grid2-1 > * + * { width: 33.333%; }
|
}
|
||||||
.grid1-3 > *:first-child,
|
|
||||||
.grid3-1 > * + * { width: 25%; }
|
|
||||||
.grid3-1 > *:first-child,
|
|
||||||
.grid1-3 > * + * { width: 75%; }
|
|
||||||
|
|
||||||
/* Responsiv-o-matic */
|
.grid1-2 > *:first-child,
|
||||||
|
.grid2-1 > * + * {
|
||||||
|
width: 33.333%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid1-3 > *:first-child,
|
||||||
|
.grid3-1 > * + * {
|
||||||
|
width: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid3-1 > *:first-child,
|
||||||
|
.grid1-3 > * + * {
|
||||||
|
width: 75%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Responsive-o-matic
|
||||||
|
*/
|
||||||
@media (max-width: $large-screen) {
|
@media (max-width: $large-screen) {
|
||||||
.grid5 > *,
|
.grid5 > *,
|
||||||
.grid6 > *,
|
.grid6 > *,
|
||||||
.grid8 > *,
|
.grid8 > *,
|
||||||
.grid10 > *,
|
.grid10 > *,
|
||||||
.grid12 > * {width: 33.333%}
|
.grid12 > * {
|
||||||
|
width: 33.333%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: $small-screen) {
|
@media (max-width: $small-screen) {
|
||||||
|
@ -82,11 +136,15 @@
|
||||||
.grid6 > *,
|
.grid6 > *,
|
||||||
.grid8 > *,
|
.grid8 > *,
|
||||||
.grid10 > *,
|
.grid10 > *,
|
||||||
.grid12 > * {width: 50%}
|
.grid12 > * {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: $tiny-screen) {
|
@media (max-width: $tiny-screen) {
|
||||||
.grid > * > * {width: 100% !important}
|
.grid > * > * {
|
||||||
|
width: 100% !important,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------- */
|
/* ---------------------------------- */
|
||||||
|
@ -94,10 +152,9 @@
|
||||||
/* .. to automatically justify blocs */
|
/* .. to automatically justify blocs */
|
||||||
/* ---------------------------------- */
|
/* ---------------------------------- */
|
||||||
|
|
||||||
/* Demo : http://codepen.io/raphaelgoetter/pen/Kqehf */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Container of autogrids
|
* Container of autogrids
|
||||||
|
* Demo : http://codepen.io/raphaelgoetter/pen/Kqehf
|
||||||
*/
|
*/
|
||||||
[class*="autogrid"] {
|
[class*="autogrid"] {
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
/* ==forms */
|
/* ==forms */
|
||||||
/* ----------------------------- */
|
/* ----------------------------- */
|
||||||
|
|
||||||
/* thanks to HTML5boilerplate,
|
/**
|
||||||
* github.com/nathansmith/formalize
|
* Thanks to HTML5boilerplate,
|
||||||
* and www.sitepen.com
|
* Source: github.com/nathansmith/formalize and www.sitepen.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,12 +53,15 @@ textarea {
|
||||||
resize: vertical;
|
resize: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Clickable input types in iOS
|
||||||
|
*/
|
||||||
button,
|
button,
|
||||||
input[type="button"],
|
input[type="button"],
|
||||||
input[type="reset"],
|
input[type="reset"],
|
||||||
input[type="submit"] {
|
input[type="submit"] {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
-webkit-appearance: button; /* clickable input types in iOS */
|
-webkit-appearance: button;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="search"] {
|
input[type="search"] {
|
||||||
|
@ -94,9 +97,9 @@ textarea:-moz-placeholder {
|
||||||
* Removes inner padding and border in FF3+
|
* Removes inner padding and border in FF3+
|
||||||
*/
|
*/
|
||||||
button::-moz-focus-inner,
|
button::-moz-focus-inner,
|
||||||
input[type='button']::-moz-focus-inner,
|
input[type="button"]::-moz-focus-inner,
|
||||||
input[type='reset']::-moz-focus-inner,
|
input[type="reset"]::-moz-focus-inner,
|
||||||
input[type='submit']::-moz-focus-inner {
|
input[type="submit"]::-moz-focus-inner {
|
||||||
border: 0;
|
border: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
@import "00-config";
|
@import "00-config";
|
||||||
|
|
||||||
/* ----------------------------- */
|
/* ----------------------------- */
|
||||||
/* ==gmaps support */
|
/* ==gmaps support */
|
||||||
/* ----------------------------- */
|
/* ----------------------------- */
|
||||||
|
|
Loading…
Add table
Reference in a new issue