Skip to content

Instantly share code, notes, and snippets.

Chris Eppstein chriseppstein

Block or report user

Report or block chriseppstein

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:137089
.js #location-navigation-form .form-submit,
.js #business-listing-form .form-submit,
.js #detailTabs ul,
/* .js #addReview, */
/* .js #addTags, */
.js #detailsEnhanced #addTags,
.js #locationSearchList,
.js #moreHoods,
#navListLeft
{ display: none; }
View index.html
<html>
<head>
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
<div id="header">
Header
</div>
<div id="sidebar">
View SASS sprite mixin
//**
Example use:
a
+sprite-bg("icons-32.png")
a.twitter
+sprite-column(1)
a.facebook
+sprite-column(2)
...
View meta.rb
module WithLayout
def with_layout(layout)
@layout = layout
yield
ensure
@layout = nil
end
def get(*args)
options = args.last.is_a?(Hash) ? args.pop : {}
options[:layout] ||= @layout
View _gradient.sass
=gradient(!type, !start, !end, !color_start, !color_end, !color_stop = false)
!coords = "#{Estart}, #{!end}"
!gradient= #{!coords}, from(#{!color_start}), to(#{!color_end})
@if !color_stop
!gradient= !gradient + ", " + !color_stop
background: -webkit-gradient(#{!type}, #{!gradient})
background: -moz-#{!type}-gradient(#{!gradient})
=linear-gradient(!start, !end, !color1, !color2, !color_stop = false)
+gradient("linear", !start, !end, !color1, !color2, !color_stop)
View sass-value-syntax.txt
This is the most-general grammar for property values in CSS.
It's taken from http://www.w3.org/TR/CSS2/syndata.html,
where the token definitions can be found.
value : [ any | block | ATKEYWORD S* ]+;
at-rule : ATKEYWORD S* any* [ block | ';' S* ];
block : '{' S* [ any | block | ATKEYWORD S* | ';' S* ]* '}' S*;
any : [ IDENT | NUMBER | PERCENTAGE | DIMENSION | STRING
| DELIM | URI | HASH | UNICODE-RANGE | INCLUDES
| DASHMATCH | ':' | FUNCTION S* any* ')'
View sweet_haml_syntax.haml
#placeholder
%img(src="/images/placeholder.jpg"
alt="This is just a placeholder image")
%p#image_description
This would be the text that would go inside the paragraph tag
View example.sass
=border(!width = 10px, !style = "solid", !color = blue)
border= !width !style !color
/* Using inline arguments */
.foo
+border(10px, "solid", green)
&:hover
+border(10px, "dashed", red)
/* Using Keyword arguments */
View example.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- saved from url=(0068)http://24ways.org/examples/compose-to-a-vertical-rhythm/example.html -->
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>Compose a Vertical Rhythm example</TITLE>
<LINK rel="stylesheet" type="text/css" href="sassy.css" title="sassy">
<LINK rel="alternate stylesheet" type="text/css" href="original.css" title="original">
</HEAD><BODY>
<H1>Aboard Minerva off the Coast of New England</H1>
View _sticky_footer.sass
You can’t perform that action at this time.