Skip to content

Instantly share code, notes, and snippets.

View Harrisonbro's full-sized avatar

Harrison Brown Harrisonbro

View GitHub Profile
@Harrisonbro
Harrisonbro / Sass-parallax-example.markdown
Created January 27, 2014 09:51
A Pen by Scott Kellum.

Sass parallax example

By locking the perspective on the body element and transforming elements in 3D on top of that, you can easily create parallax scrolling effects that don’t require JavaScript and can be much more performant as a result. Mixins can be found here: http://codepen.io/scottkellum/pen/Jwudg

A Pen by Scott Kellum on CodePen.

License.

var subpixelWordSpacing = false;
if (document.defaultView && document.defaultView.getComputedStyle) {
var originalSpacing = document.defaultView.getComputedStyle(document.documentElement, null).wordSpacing;
document.documentElement.style.wordSpacing = '0.5px';
subpixelWordSpacing = document.defaultView.getComputedStyle(document.documentElement, null).wordSpacing === '0.5px';
document.documentElement.style.wordSpacing = originalSpacing;
}
@Harrisonbro
Harrisonbro / Class-mixin.scss
Created August 14, 2013 17:33
Generate a solid class (for use in markup) and a silent class (for use with @extend) in one go.
/**
* Generate a solid class (for use in markup) and a silent class (for use with
* `@extend`) in one go.
*
* Created by csswizardry at http://jsfiddle.net/csswizardry/ECntr/
*/
@mixin class($name) {
.#{$name},
%#{$name} {
@content
@Harrisonbro
Harrisonbro / gist:4038361
Created November 8, 2012 11:51
BAPO-104 | Insurance table HTML and modal info boxes
<h3>What your policy covers:</h3>
<table class="table table-striped table-bordered">
<tbody>
<tr align="left">
<th>Cover</th>
<th>Limit</th>
</tr>
<tr>
<td>Medical Expenses <a href="#medical" role="button" data-toggle="modal">(details)</a></td>