Skip to content

Instantly share code, notes, and snippets.

import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
}
@chriseppstein
chriseppstein / _icons.scss
Created December 5, 2010 21:48
This is an example of the generated stylesheet by compass for a set of sprites
@import "compass/utilities/sprites/base";
// General Sprite Defaults
// You can override them before you import this file.
$icon-sprite-base-class: ".icon-sprite" !default;
$icon-sprite-dimensions: false !default;
$icon-position: 0% !default;
$icon-spacing: 0 !default;
$icon-repeat: no-repeat !default;
@chriseppstein
chriseppstein / 1_slower_sprite_file.scss
Created December 20, 2010 03:11
This gist demonstrates how a generated sprite file can be optimized to shave some time off your compile.
@import "compass/utilities/sprites/base";
// General Sprite Defaults
// You can override them before you import this file.
$emblem-sprite-base-class: ".emblem-sprite" !default;
$emblem-sprite-dimensions: false !default;
$emblem-position: 0% !default;
$emblem-spacing: 0 !default;
$emblem-repeat: no-repeat !default;
@chriseppstein
chriseppstein / _minified_filenaming.md
Last active November 26, 2019 07:40
compiling a minified version of css. This configures your compass project to emit files in minified form when compiling for production.
$ compass compile --environment production && compass compile

Afterwards you will have both the minified and non-minified versions in your output folder. Note that compass clean will not clean up your minified files.

@chriseppstein
chriseppstein / _grid-system.scss
Created August 22, 2011 17:43
Building Responsive Layouts with Sass
@import "compass/utilities/general/clearfix";
$gutter-width: 10px; // All grids systems have the same gutter width
$float-direction: left;
$left-gutter-width: ceil($gutter-width / 2) !default;
$right-gutter-width: $gutter-width - $left-gutter-width !default;
$base-line-height: 21px;
$show-grid-background: false;
@mixin centered {
import { something, defined, TypeGuard, FunctionCall0, FunctionCall1, FunctionCall2, FunctionCall3, FunctionCall4 } from "./UtilityTypes";
import { isObject, whatever } from "./index";
/**
* Maybe.ts - A TypeScript implementation of the Maybe Monad.
* ==========================================================
*
* Usually a Maybe is strong type with methods, but that approach, I felt,
* would lead to poor performance characteristics and also not take full
* advantage of TypeScript's specific approach to types using type guards.
@chriseppstein
chriseppstein / general.sass
Created July 22, 2008 22:01
Sass Mixin Examples
// Clearing floats without extra markup
// Based on How To Clear Floats Without Structural Markup by PiE
// [http://www.positioniseverything.net/easyclearing.html]
// From the official sass documentation.
=clearfix
display: inline-block
&:after
content: "."
display: block
height: 0
@chriseppstein
chriseppstein / readme.md
Created August 31, 2011 21:57 — forked from mislav/Gemfile
How to integrate Compass with Rails 3.1 asset pipeline

This gist is no longer valid. Please see Compass-Rails for instructions on how to install.

// Mixins ---------------------------------------------------------------
=placeholder
&::-webkit-input-placeholder
@children
&:-moz-placeholder
@children
&.placeholder
@children
@chriseppstein
chriseppstein / defining_placeholders_once.scss
Created April 17, 2012 15:11
If you have a module with placeholder selectors, this pattern will help you avoid outputting them twice if imported twice.
$module-placeholders-defined: false !default;
@mixin module-placeholders {
@if not $module-placeholders-defined {
$module-placeholders-defined: true;
%module-object { color: red; }
%module-object:hover { color: blue; }
}
}
@include module-placeholders;