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
@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;
}
@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 / 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}
@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%);
}
{exp:channel:entries channel="articles"}
{if count == 1}<div class="articles">
<h1>Recent Articles</h1>
{/if}
<article>
<h1>{title}</h1>
{body}
</article>
{if count == total_results}</div>{/if}
{/exp:channel:entries}
@RyanRoberts
RyanRoberts / Test
Created June 30, 2013 19:06
This is a test Gist
# This is just a test
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
## A heading
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
@RyanRoberts
RyanRoberts / decouple-html-from-your-css
Created August 21, 2013 15:34
Decouple HTML from your CSS
# Decouple HTML from your CSS
@RyanRoberts
RyanRoberts / tada.css
Created September 10, 2013 09:32
Tada
@-moz-keyframes tada {
0% {-moz-transform: scale(1);}
10%, 20% {-moz-transform: scale(0.9) rotate(-3deg);}
30%, 50%, 70%, 90% {-moz-transform: scale(1.1) rotate(3deg);}
40%, 60%, 80% {-moz-transform: scale(1.1) rotate(-3deg);}
100% {-moz-transform: scale(1) rotate(0);}
}
@-o-keyframes tada {
0% {-o-transform: scale(1);}
@RyanRoberts
RyanRoberts / SassMeister-input.scss
Created January 7, 2014 12:06 — forked from lunelson/SassMeister-input.scss
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
/*
A slightly more automated approach to BEM modifier classes:
using '&' parent selector interpolation, modifiers extend their bases,
so that HTML markup requires only the modifier class not the base *and* modifier
*/
@RyanRoberts
RyanRoberts / SassMeister-input-HTML.html
Created January 20, 2014 16:19
Generated by SassMeister.com.
<h2>Video with fitVid class</h2>
<div class="fitVid">
<iframe width="560" height="315" src="//www.youtube.com/embed/kK0_OVn_uxA" frameborder="0" allowfullscreen></iframe>
</div>
<h2>Video with without the class</h2>
<iframe width="560" height="315" src="//www.youtube.com/embed/kK0_OVn_uxA" frameborder="0" allowfullscreen></iframe>