Skip to content

Instantly share code, notes, and snippets.

@johncionci
johncionci / gist:5094100
Last active December 14, 2015 13:29
Font Size with REM in SCSS + pixel fallback
/* Font Size REM Mixin
* Use REMS for font sizes with a pixel fallback
*
* $pixels - required - string or hex value - the number unit value - defualt : 10px
* $weight - optional - string or numeric value - the font weight - defualt : normal
*
* @usage h1 {
* @include font-size(24);
* }
*
@johncionci
johncionci / gist:5094121
Created March 5, 2013 20:47
16:9 Image Size Calculations with SCSS
@mixin imagesize($width) {
$height : ( $width / 16 ) * 9 + px;
height: $height;
width: $width + px;
}
@johncionci
johncionci / gist:7373587
Last active December 27, 2015 18:59
Drupal Standard Pager SCSS Placeholder
/* Implement the Standard Drupal Pager
*
* @usage
* ... .item-list { @extend %pager; }
*
* @required
* _rem-mixin.scss
**/
%pager {
@johncionci
johncionci / gist:7555371
Last active December 28, 2015 20:09
WordPress 1280px Responsive Layout
/*
* 1280px layout supports: ( max-width 1264px )
*
* 10px | 304px | 10px | 304px | 10px | 304px | 10px | 300px | 10px
* Posts floated left, and can be resized with container eq 314px
*
* 10px | 75.88424% ( 944px ) | 24.11576% ( 300px ) | 10px
*
* @required
* rem-mixin.scss
@johncionci
johncionci / gist:7556049
Last active December 28, 2015 20:18
WordPress 1000px Responsive Layout
/*
* 1000px layout supports: ( max-width 1000px )
*
* 10px | 320px | 20px | 320px | 20px | 300px | 10px
* Posts floated left, and can be resized with container eq 320px
*
* 10px | 69.38776% ( 680px ) | 30.61224% ( 300px ) | 10px
*
* @required
* rem-mixin.scss
@johncionci
johncionci / gist:7739060
Last active December 29, 2015 22:49
WordPress 640px - 768px Responsive Layout
/*
* 640px - 768px layout supports: ( max-width 768px )
*
* 10px | 214px | 10px | 214px | 10px | 300px | 10px
* Posts floated left, and can be resized with container eq 214px
*
* 10px | 59.893048128342244% ( 448px ) | 40.106951871657756%% ( 300px ) | 10px
*
* @required
* rem-mixin.scss
@johncionci
johncionci / gist:7739110
Created December 1, 2013 18:47
WordPress 480px Responsive Layout
/*
* 480px layout supports: ( max-width 480px )
*
* 10px | 460px | 10px
* Posts are not floated left, can be resized with container eq 460px
*
* 10px | 100% ( 460px ) | 10px
*
* @required
* rem-mixin.scss
@johncionci
johncionci / gist:7739150
Created December 1, 2013 18:51
WordPress 320px Responsive Layout
/*
* 320px layout supports: ( max-width 320px )
*
* 10px | 300px | 10px
* Posts are not floated left, can be resized with container eq 300px
*
* 10px | 100% ( 300px ) | 10px
*
* @required
* rem-mixin.scss
@johncionci
johncionci / gist:7739422
Last active December 29, 2015 22:58
SCSS Mixin for Link Colors
/* Text Decorations
* Supply a base link color and a hover link color
* Remove the underline, until hover
*
* $link_color - required - string or hex value - the initial link color
* $hover_color - required - string or hex value - the links hover color
*
* @usage a {
* @include text-decoration(#fff,#000);
* }
@johncionci
johncionci / gist:7739484
Created December 1, 2013 19:13
SCSS Mixin Clearfix
/*
* Nicolas Gallagher Micro Clearfix
* @link http://nicolasgallagher.com/micro-clearfix-hack/
*/
@mixin clearfix() {
&:before,
&:after {
content: " ";
display: table;