Skip to content

Instantly share code, notes, and snippets.

View dirkschmid's full-sized avatar

Dirk Schmid dirkschmid

View GitHub Profile
.container
.info
%h1 :focus tooltip
.form
%input#input0.form-input{:type => "text", :placeholder => "Select this to fold tooltip"}
.form-tooltip Information only visible on :focus
%input#input1.form-input{:type => "text", :placeholder => "Or this to fold another."}
.form-tooltip Information only visible on :focus
<?php $hsl = rand(0, 240) . ',' . rand(50, 80) . '%,60%'; ?>
<style type="text/css">
a {
color: hsl(<?php echo $hsl ?>);
}
</style>
@dirkschmid
dirkschmid / controller.rb
Created April 3, 2012 07:43 — forked from aurelian/controller.rb
dumps sass variables
# ref: http://bit.ly/fN2ep8
# http://twitpic.com/3rr8dk
def sass_colors
engine= Sass::Engine.new(File.read("app/stylesheets/_colors.scss"), :syntax => :scss, :load_paths => ["app/stylesheets"])
environment= Sass::Environment.new
engine.to_tree.children.each do | node |
next unless node.kind_of? Sass::Tree::VariableNode
node.perform environment
end
@dirkschmid
dirkschmid / css
Created March 31, 2012 07:50 — forked from gpassarelli/gist:2135086
jQuery: Cycle Through a List
ul#cyclelist {position:relative;overflow:hidden;}
ul#cyclelist li {opacity:0;position:absolute;}
@dirkschmid
dirkschmid / compass-retina-sprites.sass
Created March 21, 2012 12:30 — forked from thulstrup/compass-retina-sprites.scss
Using Compass to generate normal and retina sprite maps
$sprites: sprite-map("sprites/*.png")
$sprites-retina: sprite-map("sprites-retina/*.png")
=sprite-background($name)
background-image: sprite-url($sprites)
background-position: sprite-position($sprites, $name)
background-repeat: no-repeat
display: block
height: image-height(sprite-file($sprites, $name))
width: image-width(sprite-file($sprites, $name))