Skip to content

Instantly share code, notes, and snippets.

Avatar

Antti Salonen antsa

  • Kisko Labs
  • Helsinki
View GitHub Profile
View gopen.sh
# Open the latest commit in repo on github
# Dependencies
#
# Hub
# $ brew install --HEAD hub
$ alias gopen='hub browse -- commit/`git rev-parse HEAD`'
@antsa
antsa / .powrc
Last active Aug 29, 2015
.powrc
View .powrc
source "${rvm_path}/scripts/rvm"
cd .
View gist:6533547
<!-- Fallbacks of SVG -->
<svg width="96" height="96">
<image xlink:href="svg.svg" src="fallback.png" width="96" height="96"/>
</svg>
View _compass-retina-sprites.scss
@mixin all-retina-sprites($map, $map2x) {
@media (min--moz-device-pixel-ratio: 1.5),
(-o-min-device-pixel-ratio: 3/2),
(-webkit-min-device-pixel-ratio: 1.5),
(min-device-pixel-ratio: 1.5),
(min-resolution: 1.5dppx) {
$base-class: sprite-map-name($map);
.#{$base-class}-all-retina-sprites {
@antsa
antsa / mq.scss
Last active Mar 2, 2019
Media Query mixin - @MQ
View mq.scss
// A mixin for media queries: @mq
//
// Use with keywords in $medias array:
// @include mq($media: iphone) {
// ...
// }
//
// Use with manual queries:
// @include mq("all and (min-width:33em)") {
// ...
@antsa
antsa / placeholder.scss
Created Mar 23, 2012
Placeholder mixin for Sass
View placeholder.scss
// Placeholder @mixin for Sass
//
// A mixin to style placeholders in HTML5 form elements.
// Includes also a .placeholder class to be used with a polyfill e.g.
// https://github.com/mathiasbynens/jquery-placeholder
// Requires Sass 3.2.
//
// Example usage (.scss):
//
// input {
@antsa
antsa / IE_VPCs_OSX.md
Created Feb 6, 2012
IE VPCs & VirtualBox on OSX
View IE_VPCs_OSX.md

Testing IE 7/8/9 on OSX

Steps needed to start IE7/8/9 testing on OSX with VirtualBox

View background_noise_function.rb
require "chunky_png"
require "base64"
module Sass::Script::Functions
def background_noise(kwargs = {})
opts = {}
Sass::Util.map_hash({
"intensity" => [0..1, "", :Number, Sass::Script::Number.new(0.5) ],
"opacity" => [0..1, "", :Number, Sass::Script::Number.new(0.08)],
"size" => [1..512, "px", :Number, Sass::Script::Number.new(200) ],
@antsa
antsa / hyphens.scss
Created Aug 23, 2011
Hyphens @mixin for Compass
View hyphens.scss
// Provides a mixin to define hyphenation
//
// Requires Compass
//
// (http://blog.fontdeck.com/post/9037028497/hyphens)
// (http://www.w3.org/TR/css3-text/#hyphenation)
//
// $value - The hyphenation property value. One of "none", "manual", "auto" or "all"
//
// Example .scss:
View bodyborder.scss
// A sass @mixin to create the body border effect
// with pseudo elements as described by CSS-Tricks:
// http://css-tricks.com/body-border/
@mixin bodyborder($color, $width) {
body {
border-left: $width solid $color;
border-right: $width solid $color;
&:before, &:after {
You can’t perform that action at this time.