Skip to content

Instantly share code, notes, and snippets.

View RyanRoberts's full-sized avatar
💭
I may be slow to respond.

Ryan RyanRoberts

💭
I may be slow to respond.
View GitHub Profile
@function colorize($color, $change: n) {
@if $change == l1 {
@return tint($color, 10%);
}
@else if $change == l2 {
@return tint($color, 25%);
}
@else if $change == l3 {
@return tint($color, 50%);
}
@RyanRoberts
RyanRoberts / gist:4059473
Created November 12, 2012 13:45
If no results I don't want the .articles div or main h1. Without using {if no_results} to output content.
<div class="articles">
<h1>Recent Articles</h1>
{exp:channel:entries channel="articles"}
<article>
<h1>{title}</h1>
{body}
</article>
{/exp:channel:entries}
@RyanRoberts
RyanRoberts / gist:3964587
Created October 27, 2012 13:14
Ruby fail
Ryans-MacBook-Pro:_assets RyanRoberts$ compass watch
>>> Compass is watching for changes. Press Ctrl-C to Stop.
/Library/Ruby/Gems/1.8/gems/fssm-0.2.7/lib/fssm/backends/fsevents.rb:27: [BUG] Segmentation fault
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
Abort trap: 6
@RyanRoberts
RyanRoberts / one-break-only.css
Created October 15, 2012 08:40
Allow only one break tag. Helpful for times you have little control over the HTML being output (such as client using a poorly made text editor).
br ~ br,
* br:only-child {
display: none;
}