Skip to content

Instantly share code, notes, and snippets.

View jonnymaceachern's full-sized avatar

Jonny jonnymaceachern

  • Developer @ Media Mechanics
  • Halifax, NS
  • 08:46 (UTC -03:00)
View GitHub Profile
@jonnymaceachern
jonnymaceachern / defaultExample.js
Last active June 20, 2016 14:37
module import and export examples
export default function sayHi(){
console.log('Hi');
}
%clearfix {
*zoom: 1;
&:before, &:after {
content: " ";
display: table;
}
&:after {
clear: both;
}
}
@mixin table-center {
display: table;
> [class*="col-"] {
float: none;
display: table-cell;
vertical-align: middle;
}
}
@jonnymaceachern
jonnymaceachern / main.scss
Created September 13, 2016 19:21
Index file to organize partials. Uses the 7-1 rule in addition to a shamefile and folder for vendor extensions.
/*
---------------------------------------------------------------------------
Abstracts
---------------------------------------------------------------------------
Includes all partials that do not directly output CSS.
Examples include variables, mixins, and functions.
---------------------------------------------------------------------------
<div class="col-xs-12 col-sm-10 col-md-8 col-lg-4 | banner banner--tall | bg-dark color-white">
Example
</div>
TrailingWhitespace
Indentation
character tab
width 1
@jonnymaceachern
jonnymaceachern / git-stats-importer.sh
Created October 3, 2016 14:04
git-stats-importer.sh
for D in ./*; do
if [ -d "$D" ]; then
cd "$D"
git-stats-importer -e maceachern.jonny@gmail.com
cd ..
fi
done
// Mixin for alternate theme styling
@mixin theme( $blogname ){
body.theme-#{$blogname} & {
@content;
}
}
// Usage
.header {
color: #000;
@import "mq";
$mq-breakpoints: (
xs: 320px,
sm: 740px,
md: 980px,
lg: 1300px,
);
// ------------------------------