Skip to content

Instantly share code, notes, and snippets.


Paul Stanton Stanton

View GitHub Profile

Given the following markup:

<fieldset id="comp-1">
    <legend id="comp-1[label]">Legend One</legend>    
    <label for="dd-1" id="dd-1[label]">Day</label>
    <input id="dd-1" type="text" />

<fieldset id="comp-2">
Stanton / SassMeister-input-HTML.html
Last active Aug 29, 2015
Generated by
View SassMeister-input-HTML.html
<ul class="nav">
<li class="nav__item"><a href="#" class="nav__link">The workshop</a></li><!--
--><li class="nav__item nav__item--current"><a href="#" class="nav__link">2013 schedule</a></li><!--
--><li class="nav__item"><a href="#" class="nav__link">About CSSWizardry</a></li><!--
--><li class="nav__item"><a href="#" class="nav__link">Contact</a></li>
Stanton / gist:73385d219ab27c1eee74
Created Mar 9, 2015
Add a class then remove it on animation or transition end
View gist:73385d219ab27c1eee74
// Assume .foo triggers a CSS animation, or a transition and that we wish to
// remove the .foo class when the animation completes.
// Useful for declarative animation class names like .shake
// on animation end
var animationEnd = 'webkitAnimationEnd oanimationend oAnimationEnd msAnimationEnd animationend';
Stanton / SassMeister-input-HTML.html
Created Jan 21, 2015
Generated by
View SassMeister-input-HTML.html
<p class="foo">foo</p>
<p class="foo foo--bar">foo bar</p>
Stanton / SassMeister-input.scss
Created Nov 25, 2014
Generated by
View SassMeister-input.scss
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
.block {
color: red;
&__element {
color: white;
Stanton / post-merge
Created Oct 22, 2014
Grunt post-merge Git hook
View post-merge
grunt sass:dev
Stanton / Asset.css
Created Nov 2, 2012
LESS noise texture mixin
View Asset.css
* Adds a transparent noise texture as a background image to a given element.
* Texture strength can be controlled with @opacity parameter.
.noise (@opacity: .3) {
&:before {
bottom: 0;
content: "";
left: 0;
opacity: @opacity;
View users_controller.php
class UsersController extends AppController {
var $name = 'Users';
var $scaffold = 'admin';
var $components = array('JqImgcrop');
var $helpers = array('Javascript', 'Thumbnail', 'CropImage');
function beforeFilter() {
Stanton / Asset.js
Created Jun 11, 2012
Get document height
View Asset.js
function getDocumentHeight() {
return Math.max(
Math.max(document.body.scrollHeight, document.documentElement.scrollHeight),
Math.max(document.body.offsetHeight, document.documentElement.offsetHeight),
Math.max(document.body.clientHeight, document.documentElement.clientHeight)
Stanton / html.html
Created May 29, 2012
light on dark inset text
View html.html
text-shadow: 0px -1px 0px #666;