Skip to content

Instantly share code, notes, and snippets.

@mhayes
mhayes / SassMeister-input-HTML.html
Created January 7, 2014 23:55
Generated by SassMeister.com.
<div class="chart under-half"></div>
@mhayes
mhayes / SassMeister-input-HTML.html
Created January 7, 2014 22:46
Generated by SassMeister.com.
<div class="pie-timer deg-350">
<div class="before"></div>
<div class="after"></div>
</div>
@mhayes
mhayes / README.md
Last active December 31, 2015 02:09
Foundation w/Sass standalone

Requirements

Make sure Ruby, Node.js, and bower are setup on your system before continuing.

Setup a new project

@mhayes
mhayes / README.md
Created December 4, 2013 00:27
Make elements sticky on a page

Quickstart

  1. Add jquery.makeitsticky.js to your page
  2. Decide which element you want to make sticky, and initiliaze like so: $('#myElement').makeItSticky()

Options

  • threshold: Number of pixels from the top of the page when an element should become sticky (default: 20)
  • stickyClass: The fixed position class to apply to an element (default: fixed)
@mhayes
mhayes / _settings.scss
Created November 21, 2013 22:41
Foundation 5 | Sass Variables
// abide
// Accordion
$include-html-accordion-classes: $include-html-classes;
$accordion-navigation-padding: rem-calc(16);
$accordion-navigation-bg-color: #efefef  ;
$accordion-navigation-hover-bg-color: darken($accordion-navigation-bg-color, 5%);
$accordion-navigation-active-bg-color: darken($accordion-navigation-bg-color, 3%);
@mhayes
mhayes / README.md
Created October 4, 2013 22:42
Start a simple web server from the current directory by running `s` in terminal!

Quickstart

Setup

  1. Place s in /usr/local/bin/s
  2. Run chmod +x /usr/local/bin/s

Usage

Let's assume you have a static site setup in ~/Sites/awesomeapp. Open up terminal and run the following commands:

@mhayes
mhayes / font_icon_html_generator.rb
Last active December 24, 2015 02:49
Font Icon Sample Page Generator
# Generate font icon page for reference
FONT = /^\.(sportisaicon[^:]+):before {/
paths = [
"fonts/custom_font_1.css",
"fonts/custom_font_2.css"
]
paths.each do |pth|
@mhayes
mhayes / semantic-grid-v1.scss
Last active December 20, 2015 18:29
Semantic grids in Foundation
.container{
@include grid-row();
.div1 {
@include grid-column(12);
@media #{$small} {
@include grid-column(4);
}
}
.div2 {
@include grid-column(12);
@mhayes
mhayes / README.md
Last active December 20, 2015 13:48
Using jQuery noConflict mode

Enabling noConflict mode

Using a default Foundation 5 download you'll see some code like this in your index.html file:

<script src="bower_components/jquery/jquery.js"></script>
<script src="bower_components/foundation/js/foundation.min.js"></script>
<script src="js/app.js"></script>
@mhayes
mhayes / README.md
Last active December 20, 2015 03:49
Equal Height Panels

Quickstart

This code should go AFTER foundation has been initialized, i.e.

<script>
$(document).foundation();
// equal-height.js code can go here
</script>