Skip to content

Instantly share code, notes, and snippets.

@benknight
benknight / dabblet.css
Created August 10, 2012 18:28
HTML Email buttons that work in Outlook 2007+
/**
* HTML Email buttons that work in Outlook 2007+
*
* This is a really weird hacked up piece of crap but basically the technique is the containing element has some solid color background,
* and the inner <a> has a solid border which acts like padding which is the same color as the background color
*/
@benknight
benknight / A "Modern" CSS File
Created June 24, 2012 07:05
I just wanted to post an example of how my CSS looks in a post-preprocessor world.
// imports
@import 'normalize.less';
@import 'grid.less';
@import 'helpers.less';
@import 'mixins.less';
// brand colors
@red: hsl(6, 89%, 59%);
@light_gray: hsl(0, 0%, 93%);
@benknight
benknight / dabblet.css
Created May 25, 2012 05:26
Infinite crawl effect using CSS animations
/**
* Infinite crawl effect using CSS animations
*/
@keyframes crawl {
0% { background-position: 0 0; }
100% { background-position: -1500px 0; /* 1500px = width of image */ }
}
#crawl {
background: url(http://f.cl.ly/items/2i3q0a123z3w17241Q3F/page-subheader.jpg);
height: 100px;
@benknight
benknight / dabblet.css
Created March 7, 2012 00:44
Arrow tip button
/**
* Arrow tip button
*/
body { z-index: 0; text-align: center; padding-top: 100px; }
button {
position: relative;
font: 700 20px/1 'Helvetica Neue';
color: white;
border: none;
@benknight
benknight / dabblet.css
Created December 28, 2011 21:50
Square avatars with CSS
/**
* Square avatars with CSS
*/
.img.square {
width: 54px;
height: 54px;
overflow: hidden;
display: inline-block;