Skip to content

Instantly share code, notes, and snippets.

View jnowland's full-sized avatar

James Nowland jnowland

View GitHub Profile
@jnowland
jnowland / svg-logo.scss
Created November 19, 2012 03:23
Logo mixin to include fallback SVG
// Currently an idea, yet to test this snippet.
@mixin logo( $logo-name) {
$image: "#{$logo-name}.png";
.logo {
background-repeat:no-repeat;
display:block;
overflow:hidden;
@jnowland
jnowland / config.rb
Created December 7, 2012 10:48
Config file for working with html and css which can export into a wordpress theme when that phase of the development cycle hits.
#environment = :production
environment = :development
# Set this to the root of your project when deployed.
# Work from file directory "code" for your statics, when the css is ready to go into the wordpress theme switch it over to development
if environment == :production
output_style = :expanded
http_path = "/"
css_dir = "deploy"
//Please note this does not currently work.
@each $section in council, household, business {
.#{$section} h2 {
//Step 1: I want this below varible to dynamically change to $council-light, $household-light, $business-light
color: $#{$section}-light; //this seems to be the problem of trying to append '-light' onto a varible name
//please note council-light, household-light, business-light are all predefined varibles with hex colours assigned.
@jnowland
jnowland / _mediaQueries.scss
Last active December 12, 2015 04:18
A file I have in my helpers that makes doing inline media queries pretty good :) extra-small, small, medium, large, larger, huge, massive
/* ==========================================================================
Media Queries:
How to get inline media querey
Order from small to big.
extra-small, small, medium, large, larger, huge, massive.
Should be noted when using min-width your styles outside any mediaqueries are the smallest and global.
@jnowland
jnowland / troll.css
Created February 18, 2013 05:29
makes things amazing.
* {
background: pink;
font-family: cursive;
text-transform: uppercase;
letter-spacing: -5px;
}
*:hover {
/*webkit rainbow gradient*/
background-image: -webkit-gradient(linear, left top, left bottom,
<snippet>
<content><![CDATA[
@include breakpoint(${1:massive / huge / larger / large / medium / small / extra-small}) {
${2:}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>mq</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@jnowland
jnowland / gist:5148661
Created March 13, 2013 01:26
Border box work around…
$padding: 20px;
$total-width:580px;
textarea {
width:100% - (percentage($padding / total-width)*2);
padding:0 percentage($padding / total-width);
}
<snippet>
<content><![CDATA[
@include breakpoint(${1:papa-bear / mama-bear / baby-bear}) {
${2:}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>mq</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@jnowland
jnowland / lorempic.sublime-snippet
Created March 14, 2013 05:14
A snippet for getting filler pictures by lorempic + tab
<snippet>
<content><![CDATA[
<img src="http://lorempixel.com/${1:}/${2:}/${3:abstract / animals / business / cats / city / food / nightlife / fashion / people / nature / sports / technics / transport}/${4:Enter a Number 1 / 10}/" width="${1:}" height="${2:}" />
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>lorempic</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
@jnowland
jnowland / clearfix.sublime-snippet
Created March 14, 2013 05:59
Cleafix snippet
<snippet>
<content><![CDATA[@extend .clearfix;]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>cf</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>