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
@chriseppstein
chriseppstein / readme.md
Created Aug 31, 2011 — forked from mislav/Gemfile
How to integrate Compass with Rails 3.1 asset pipeline
View readme.md

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

View input-placeholder.sass
// Mixins ---------------------------------------------------------------
=placeholder
&::-webkit-input-placeholder
@children
&:-moz-placeholder
@children
&.placeholder
@children
View awk-scss-mod.md
{
  line = $0
  while (match(line, /^(.*)spacing\(([0-9\.]+)\)(.*)$/, groups)) {
    line = groups[1] "SPACING(" (groups[2] * 2) ")" groups[3]
  }
  gsub(/SPACING/, "spacing", line)
  print line
}
View rounded_corners.sass
// round corners (base)
= border-radius(!radius = 10px)
-moz-border-radius= !radius
-webkit-border-radius= !radius
border-radius= !radius
// top rounded corners
= border-top-radius(!radius = 10px)
+border-top-left-radius(!radius)
+border-top-left-radius(!radius)
View SassMeister-input.scss
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
@import "compass";
$map: (
animation: foo 1s infinite,
width: 200px,
@chriseppstein
chriseppstein / SassMeister-input.scss
Created Nov 13, 2013 — forked from kaelig/SassMeister-input.scss
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
// Transform a value into rem
// Assuming baseline is set to 10px on :root/html
@function rem($value, $baseline: 10px) {
@if type-of($value) == list {
$result: ();
View Sass.scss
@function add-grid($grid-definition) {
$grid-split: split_string($grid-definition, 'at');
$number: to-number(nth($grid-split, 2));
@debug $number;
@debug type-of($number);
@return $number;
}
View split_string.rb
def split_string(string, key)
items = string.value.split(" " + key.value + " ")
if items.count == 1
Sass::Script::Bool.new(false)
else
Sass::Script::List.new(items.map{|i| Sass::Script::String.new(i), :comma)
end
end
View wrong.scss
$test:();
@for $i from 0 through 5 {
$test: append($test, a b, comma);
}
@debug $test;
@debug nth($test, 1);
@debug nth(nth($test, 1),2);
View filters.sass
@mixin filter( $var )
-webkit-filter: $var
-moz-filter: $var
-ms-filter: $var
-o-filter: $var
filter: $var
a
&.on
@include filter( sepia(100%) hue-rotate(33deg) contrast(69%) unquote("saturate(2)"))
You can’t perform that action at this time.