Skip to content

Instantly share code, notes, and snippets.

View Chrissy's full-sized avatar

Chris Clark Chrissy

View GitHub Profile
  • a task list item
  • list syntax required
  • normal formatting, @mentions, #1234 refs
  • incomplete
  • completed
.to_sentence a {
&:before { content: ", ";
&:last-child:before { content: "and "; }
&:first-child:before { content: none; }
}
@Chrissy
Chrissy / RG_CSS_Style_Guide.scss
Last active August 29, 2015 13:57
Rap Genius CSS Style Guide
// css style guide
// welcome to the rap genius style guide!
// here you will find good rules of thumb when writing css and sass.
// of course: the only rule that really matters is:
.do-whatever { content: "it's just CSS!" }
$('.lyrics a.has_verified_annotation').each(function(i){
$(this).append('<div class="verified_line_checky"></div>');
});
function svgWarning() {
// SVG test taken from Modernizr 2.0
if (!!document.createElementNS &&
!!document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect)
return;
// No SVG, do something about it.
document.getElementById('mywarningdiv').style.display = 'block'
}
Node : function(x,y) {
var t = this
t.el = document.createElementNS("http://www.w3.org/2000/svg", this.shape)
t.el.setAttribute('r', 1)
var changeOP = function() {
t.el.setAttribute('opacity','0.5')
}
var ee = window.setTimeout(changeOP,1000)
this.root.appendChild(t.el)
return this
<!doctype html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<!doctype html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
#if begins with folio rewrite to false
RewriteRule ^folio/workspace/images/(.*) workspace/scripts/watermark.php?src=$1&resize=false
#else dont
RewriteRule ^workspace/images/(.*) workspace/scripts/watermark.php?src=$1&resize=true
### Symphony 2.0.x ###
Options +FollowSymlinks -Indexes
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
### DO NOT APPLY RULES WHEN REQUESTING "favicon.ico"
RewriteCond %{REQUEST_FILENAME} favicon.ico [NC]