Skip to content

Instantly share code, notes, and snippets.

View Razenbull's full-sized avatar

Chris Wetz Razenbull

View GitHub Profile
@Razenbull
Razenbull / ET-button-mixin.scss
Last active August 29, 2015 14:15
Generated by SassMeister.com.
// ----
// Sass (v3.4.11)
// Compass (v1.0.3)
// ----
@mixin ET-button() {
button, .button {
@include ET-button-shape(grey, black);
&.blue {
@Razenbull
Razenbull / size-mixin.scss
Last active August 29, 2015 14:15
Generated by SassMeister.com.
// ----
// Sass (v3.4.11)
// Compass (v1.0.3)
// ----
@mixin size($width, $height: $width) {
width: $width;
height: $height;
}
@Razenbull
Razenbull / HG-position-mixin.scss
Last active August 29, 2015 14:15
Generated by SassMeister.com.
// ----
// Sass (v3.4.11)
// Compass (v1.0.3)
// ----
@mixin position($position, $args) {
@each $o in top right bottom left {
$i: index($args, $o);
@if $i and $i + 1 <= length($args) and type-of(nth($args, $i + 1)) == number {
@Razenbull
Razenbull / Dynamic-backgrounds.scss
Last active August 29, 2015 14:15
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
$features: (
forest: ('leafy', 'resinous', 'mixed', 'unworkable'),
culture: ('agroforestry', 'field', 'orchad', 'prairie'),
road: ('road', 'firewall', 'firewall2'),
water: ('water', 'pond', 'watercourse'),
@Razenbull
Razenbull / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Razenbull
Razenbull / _ellipsis.scss
Last active August 29, 2015 14:23
multiline ellipsis module
// @8trust
// map font-sizes
// build as needed
$font-sizes: (
xsmall: 12px,
small: 14px
);
// function to get sizes easier
@Razenbull
Razenbull / SassMeister-input.scss
Created July 10, 2015 08:53
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$fs--big: 18px;
$default-map: (
action-height: 38px,
);
$colors: (
@Razenbull
Razenbull / SassMeister-input.scss
Created July 10, 2015 11:03
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
/// A mixin for generating vendor prefixes on non-standardized properties.
///
/// @param {String} $property
/// Property to prefix
///
/// @param {*} $value
@Razenbull
Razenbull / getRandomInt.js
Created July 23, 2015 12:05
Get a random int within a specified range
/**
*
* @param min (inclusive)
* @param max (exclusive)
* @returns {*}
*/
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
}
@Razenbull
Razenbull / testOffset.js
Created July 23, 2015 12:11
Test if an element is at the top of the document
/**
*
* @param $element = element offset to test against $(window).scrollTop()
* @returns {boolean}
*/
function testOffset($element) {
var windowScroll = $(window).scrollTop(),
elementOffset = $element.offset().top;
return (windowScroll >= elementOffset);