Skip to content

Instantly share code, notes, and snippets.

View Snugug's full-sized avatar

Sam Richard Snugug

View GitHub Profile

I have a Compass extension named Aurora that provides three templates, default, corona, and polaris. They share a set of files that get pulled in and placed via each's manifest.rb file. I share these files so I don't need identical copies of each in each template.

That being said, for one shared file, I'd like to add a line of code if I'm using the default template. I thought was I could do something like this:

# file.txt.erb
This is a file! Yay!

<% if Compass.template == 'default' %>
This is an extra line for when Default is used
@Snugug
Snugug / SassMeister-input-HTML.haml
Created February 6, 2014 18:48
Generated by SassMeister.com.
.one
.two
.three
.four
@Snugug
Snugug / SassMeister-input.scss
Created February 7, 2014 18:53
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// Breakpoint (v2.4.1)
// ----
@import "breakpoint";
@include breakpoint((min-resolution 1.5dppx, 2050px)) {
.foo {
@Snugug
Snugug / SassMeister-input.sass
Created February 14, 2014 21:11
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.3)
// Compass (v1.0.0.alpha.18)
// ----
.foo
*display: inline
@Snugug
Snugug / SassMeister-input.scss
Created February 15, 2014 19:03
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.4)
// Compass (v1.0.0.alpha.18)
// ----
@mixin placeholder {
$placeholders: ':-webkit-input', '-moz', ':-moz', '-ms';
@each $prefix in $placeholders {
&:#{$prefix}-placeholder {
@content;
@Snugug
Snugug / SassMeister-input-HTML.html
Created February 21, 2014 15:54
Generated by SassMeister.com.
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Clearing trouble</title> <!-- 70chars max -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
@Snugug
Snugug / SassMeister-input-HTML.html
Created February 25, 2014 01:59
Generated by SassMeister.com.
<div class="container"></div></div><div class="shifted">This is a test div</div></div>
@Snugug
Snugug / SassMeister-input-HTML.haml
Created February 25, 2014 21:22
Generated by SassMeister.com.
.blue
.red
@Snugug
Snugug / SassMeister-input-HTML.haml
Created February 26, 2014 21:45
Generated by SassMeister.com.
.header
.main
@Snugug
Snugug / SassMeister-input-HTML.html
Created February 27, 2014 17:34
Generated by SassMeister.com.
<div class="container">
<div class="one"></div>
<div class="two"></div>
<div class="three"></div>
</div>