Skip to content

Instantly share code, notes, and snippets.

@maddesigns
maddesigns / file_input_example.css
Created December 9, 2011 15:38 — forked from nathansmith/file_input_example.css
Markup to Hide a File Input
.fake_file_input {
background: url(../images/fake_file_input.png) no-repeat;
cursor: pointer;
width: 150px;
height: 30px;
overflow: hidden;
position: relative;
display: inline-block;
*display: inline;
*zoom: 1;
@maddesigns
maddesigns / dabblet.css
Created January 21, 2012 04:49
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(to right, #f06, yellow);
min-height: 100%;
@maddesigns
maddesigns / CssRule.js
Created March 23, 2012 18:37 — forked from mseeley/CssRule.js
Easily alter CSS rules via JS
// Allows programmatic altering of CSS rules. Turn this class into a flyweight by enabling modification of the underlying rule property.
function CssRule (selector, stylesheet) {
var rules = stylesheet.rules,
len = rules.length,
i = 0,
rule = null;
for (i; i < len; i++) {
rule = rules[i];
if (rule.selectorText === selector) {
@maddesigns
maddesigns / dabblet.css
Created May 23, 2012 09:54
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.item {
width: 120px;
height: 120px;
}
.img-wrap {
@maddesigns
maddesigns / spancount.js
Created December 2, 2012 16:46 — forked from bejes/spancount.js
Simple jquery plugin to insert spans in text and a defined character limit
/**
* Plugin function to insert spans into text:
* usage
* $(document).ready(function() {
* $('p.charcount').charSpanCount(); });
* or $(document).ready(function() {
* $('p.charcount').charSpanCount({'charcount' : 15});
* });
*/
(function($) {
compiletype = environment
project_path = File.dirname(__FILE__) + "/"
utils_dir = "utilities/"
utils_path = project_path + utils_dir
# callback - on_sprite_saved
# http://compass-style.org/help/tutorials/configuration-reference/
on_sprite_saved do |filename|
if File.exists?(filename)
if (compiletype == :production)
@maddesigns
maddesigns / Preferences.sublime-settings
Last active August 26, 2016 07:10
my sublime text (3) user preference file
{
"auto_complete_selector": "source - comment, meta.tag - punctuation.definition.tag.begin, text.html.basic",
"binary_file_patterns":
[
"dist/*",
".tmp/*",
"node_modules/*",
"*.jpg",
"*.jpeg",
"*.png",
@maddesigns
maddesigns / gist:6138317
Last active December 20, 2015 13:19
Sublime searches for modernizer classes and CSS3 pseudo classes (Selectivizr)
// Modernizr search
\.(no-)?(flexbox|canvas|canvastext|webgl|touch|geolocation|postmessage|websqldatabase|indexeddb|hashchange|history|draganddrop|websockets|rgba|hsla|multiplebgs|backgroundsize|borderimage|borderradius|boxshadow|textshadow|opacity|cssanimations|csscolumns|cssgradients|cssreflections|csstransforms|csstransforms3d|csstransitions|fontface|generatedcontent|video|audio|localstorage|sessionstorage|webworkers|applicationcache|svg|inlinesvg|smil|svgclippaths)\s
// Selectivizr search
:(root|nth-of-type|nth-last-of-type|first-of-type|last-of-type|only-of-type|only-child|last-child|nth-child|nth-last-child|empty|target|checked|:selection|enabled|disabled|not)
# General
output_style = :expanded
relative_assets = true
line_comments = false
project_path = File.dirname(__FILE__) + "/"
utils_dir = project_path + "utils/"
# Sass Paths
http_path = "/"
@maddesigns
maddesigns / index.html
Created August 15, 2013 14:42
A CodePen by Sven Wolfermann. iOS font rendering - test of iOS font rendering (landscape bolding of text)
<div class="block1">
<h1>type rendering – black on white</h1>
<h2>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. </h2>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.
</p>
</div>
<div class="block2">