Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<style>
form
{
background:#eee;
padding:20px;
/* ----------------------------------------------------------------------------------------------------
Super Form Reset
A couple of things to watch out for:
- IE8: If a text input doesn't have padding on all sides or none the text won't be centered.
- The default border sizes on text inputs in all UAs seem to be slightly different. You're better off using custom borders.
- You NEED to set the font-size and family on all form elements
- Search inputs need to have their appearance reset and the box-sizing set to content-box to match other UAs
<h{embed:heading_size}>Title</h{embed:heading_size}>
@anthonyshort
anthonyshort / rem-font-size.scss
Created May 2, 2011 01:37
Rem font size mixin
$base-font-size: 15px;
@mixin rem-font-size($size) {
font-size:#{$size/$base-font-size}rem;
}
body {
font-size:$base-font-size;
}
@anthonyshort
anthonyshort / css-responsive-images-alt.html
Created May 19, 2011 00:29 — forked from necolas/css-responsive-images.html
Idea for CSS-only responsive images using CSS3 generated content and attr() function. No browser implementation as of May 2011
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS responsive images</title>
<style>
/* Play nice with existing requirements for
Responsive Images polyfill */
/* Doesn't stop original source image being
@anthonyshort
anthonyshort / gist:1156513
Created August 19, 2011 10:11
CSS Copy Class
/* Define styles for blocks of content scoped within the .copy rather than
making them global. Global styles will be constantly overridden. */
@mixin text-copy {
@include improve-text-rendering;
/*
Set the baseline on all elements directly inside a copy block
Margin won't work on inline elements anyway
*/
body {
margin:0;
}
p {
margin:0;
}
form {
margin:0;
@anthonyshort
anthonyshort / gist:1160093
Created August 21, 2011 04:00
Globbing error
NameError on line 5 of /Library/Ruby/Gems/1.8/gems/sass-globbing-1.0.0.rc.1/lib/sass/globbing/importer.rb: uninitialized constant Sass::Globbing::Importer::Singleton
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
/Library/Ruby/Gems/1.8/gems/sass-globbing-1.0.0.rc.1/lib/sass/globbing.rb:6
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
/Library/Ruby/Gems/1.8/gems/sass-globbing-1.0.0.rc.1/lib/sass-globbing.rb:1
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:59:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:59:in `require'
/Library/Ruby/Gems/1.8/gems/compass-0.11.4/lib/compass/configuration/data.rb:122:in `require'
@anthonyshort
anthonyshort / gist:1161485
Created August 22, 2011 01:53
AddThis Markup
<li class='email'>
<a
addthis:title="TITLE HERE"
addthis:url="URL HERE"
href='http://addthis.com/bookmark.php'
rel='external'
title='Send to a friend'
class="addthis_button_email">Send to a friend</a>
</li>
@anthonyshort
anthonyshort / gist:1161821
Created August 22, 2011 06:56
Cakefile: Simple Combiner + Uglifier - Based on https://github.com/rwldrn/idiomatic.js
FILES =
libraries: [
"libs/jquery/jquery.ui.widget.js",
"libs/jquery/jquery.nsm.container.js",
"libs/jquery/jquery.nsmToc.js",
"libs/jquery/jquery.nsm.BigTarget.js",
"libs/jquery/nsm-sectionComments/jquery-nsm-sectionComments.js",
"libs/jquery/jquery.placeholder.js",
"libs/jquery/jquery.pjax.js",