Skip to content

Instantly share code, notes, and snippets.

@jackarmley
jackarmley / index.html
Last active August 15, 2020 13:05
Recursive classname function: JS Bin// source https://jsbin.com/yivacan
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
// Convert single or multiple values to em
// for a property that takes 1-4 size values
// ie: margin, padding, width, height
// @author Jack Armley
// @parm {string} @prop - property to use
// @param {interger|list} @val - value(s) to use
// @param {interger} @embase [16] - base px value of ems
.pxem(@prop,@val,@embase:16) when(length(@val) < 5){
@valuelen: length(@val);
.pxem-each(@i) when (@i > 0){
@jackarmley
jackarmley / seeyounexttuesday.js
Created July 19, 2015 10:42
See you next tuesday, a helpful script for letting you know what day of what week is [x] days from today
/**
* See you next tuesday,
* a helpful script for letting
* you know what day of what week is [x]
* days from today
* @author Jack Armley
* @param daysNo {interger} - Number of days from today to grab
* @param debug {boolean} [false] - Output a more verbose message
**/
@jackarmley
jackarmley / images.json
Created June 15, 2015 12:10
Image mixin JSON data sample
{
"small": {
"width": "400",
"sizes": "(min-width: 6.25em) 90vw"
},
"medium": {
"width": "800",
"sizes": "(min-width: 43em) 80vw"
},
"large": {
@jackarmley
jackarmley / _image.jade
Last active September 5, 2015 12:37
Jade image mixin
//-
//- Srcset mixin
//- @requires site.data.images
//- https://ericportis.com/posts/2014/srcset-sizes/
//-
mixin image(src,alt)
//- 1:
//- Set initial vars
@jackarmley
jackarmley / SassMeister-input.scss
Last active August 29, 2015 14:22
Generated by SassMeister.com.
// ----
// Sass (v3.4.13)
// Compass (v1.0.3)
// ----
$producticons:(
spritesrc: (
'../images/processicons.svg',
'../images/processicons.png'
),
@jackarmley
jackarmley / SassMeister-input.scss
Created May 28, 2015 01:38
Generated by SassMeister.com.
// ----
// Sass (v3.4.13)
// Compass (v1.0.3)
// ----
@function longshadow($length){
@return $length;
};
p{
text-shadow: longshadow(50);
@jackarmley
jackarmley / SassMeister-input.scss
Created March 12, 2015 02:49
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
$producticons:
posturalzonedsupport,
reducedpressurepoints,
healthysleepenvironment,
increasedbloodflow,
@jackarmley
jackarmley / SassMeister-input.scss
Last active August 29, 2015 14:15
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
////
//// The Hatchd Eggbox icon-font set
//// @author Hatchd Digital
//// Generated by grunt-webfont
////
@jackarmley
jackarmley / SassMeister-input-HTML.jade
Last active August 29, 2015 14:15
Generated by SassMeister.com.
.icon