Skip to content

Instantly share code, notes, and snippets.

View mitchellhillman's full-sized avatar

Mitchell Hillman mitchellhillman

View GitHub Profile
@mitchellhillman
mitchellhillman / retina-sprite.scss
Last active December 10, 2015 22:28
Retina Sprite mixin using SCSS and COMPASS
// COMPASS
@import "compass/utilities/sprites";
@import "compass/css3/background-size";
// Import Images
$sprites: sprite-map("sprites/*.png");
$sprites2x: sprite-map("sprites-retina/*.png");
@mixin sprite($name) {
@include retina-sprite($name, $sprites, $sprites2x);
@mitchellhillman
mitchellhillman / rtabs.html
Last active August 29, 2015 14:03
Responsive AJAX Tabs
<div class="rtabs" id="rtabs-1">
<ul class="rtabs-controls">
<li><a href="#section-01">Nunc tincidunt</a></li>
<li><a href="#section-02">Proin dolor</a></li>
<li><a href="#section-03">Aenean lacinia</a></li>
</ul>
<div class="rtabs-section" id="section-01" data-ajax=""></div>
<div class="rtabs-section" id="section-02" data-ajax=""></div>
<div class="rtabs-section" id="section-03" data-ajax=""></div>
</div>
@mitchellhillman
mitchellhillman / bbubble.html
Last active August 29, 2015 14:03
Bookmark Bubble
<div class="bookmark-bubble"><!-- START .bookmark-bubble -->
<p><strong>Install this web app:</strong></p>
<p>Tap <img src="interface/images/bubble-action.png" class="action"/> and
<br /><strong>"Add to Home Screen"</strong></p>
</div><!-- END .bookmark-bubble -->
@mitchellhillman
mitchellhillman / bgimage-retina.scss
Created June 26, 2014 19:32
Retina Background Image
@mixin background-image($name) {
background-image: image-url($name);
$width: image-width($name);
$height: image-height($name);
width: $width;
height: $height;
@media (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-device-pixel-ratio: 1.5) {
& {
background-image: image-url(2x/#{$name});
@include background-size( $width $height );
@mitchellhillman
mitchellhillman / condense.php
Created July 1, 2014 19:57
Condense a directory of files into one file
<?php
$directory = 'CFA/sass/global/type/';
$write_file_name = '_type.scss';
$write_file = $directory.$write_file_name;
// Empty Target files
$content = '';
file_put_contents($write_file, $content);
@mitchellhillman
mitchellhillman / clock.html
Last active November 11, 2015 17:12
Clock
<div id="clock">
<div id="face">
<div id="secondHand"></div>
<div id="minuteHand"></div>
<div id="hourHand"></div>
</div>
</div>