Skip to content

Instantly share code, notes, and snippets.

View cristianferrarig's full-sized avatar

Cristian Ferrari cristianferrarig

  • VOLTΛ
  • Stgo, Chile
View GitHub Profile
# CSS
.visible {
display: block;
}
.oculta {
display: none;
}
// Generic names
// ---------------------------------------------------
$size-mini: 480px !default;
$size-small: 768px !default;
$size-medium: 992px !default;
$size-large: 1200px !default;
$size-oversized: 1500px !default;
$size-container: 960px !default;
@cristianferrarig
cristianferrarig / precompiler
Last active August 29, 2015 14:27
Precompiler utility
#!/bin/bash
cd "$(dirname $0)"
dir=`pwd`
css_dir="$dir/_css/"
scss_dir="$dir/_scss/"
file_name=""
css_file=""
@cristianferrarig
cristianferrarig / color-lightness-test.scss
Last active October 22, 2015 14:15
Color lightness test. [Lightness, Brightness and Luma]
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
// https://robots.thoughtbot.com/closer-look-color-lightness
// https://thoughtbot.github.io/color-lightness-test/
$background: #ee0;
@cristianferrarig
cristianferrarig / input.scss
Last active October 22, 2015 14:16
Generated by SassMeister.com.
// ----
// Sass (v3.4.13)
// Compass (v1.0.3)
// ----
@function solidify($alpha-color, $background-color: white) {
$percent: alpha($alpha-color) * 100%;
$opaque: opacify($alpha-color, 1);
$solid-color: mix($opaque, $background-color, $percent);
@return $solid-color;
@cristianferrarig
cristianferrarig / SassMeister-input-HTML.haml
Created June 6, 2015 02:51
Generated by SassMeister.com.
%label.follow
%input{type: "checkbox"}
%span +0
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
$include-html-schema-classes: true !default;
$tone-darkest: #131B26 !default;
$tone-darker: #1D2838 !default;
$tone-dark: #485466 !default;
@cristianferrarig
cristianferrarig / change-detector.coffee
Last active August 29, 2015 14:21
Forms changes detector
Form = {}
Form.serializedForms = {}
#
# USAGE:
#
# First serialize form
# Form.saveSerialized( $("#myform") )
#
# events:
@cristianferrarig
cristianferrarig / mondrian.scss
Created May 18, 2015 15:19
Mondrian example
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// ----
@include layout($app),
$app: (
name: prey,
/* Initialisation / Button events */
// If added to home screen...
if(navigator.standalone === undefined || !!navigator.standalone) {
// On Android scroll the screen by 1 pixel to hide the address bar
if (navigator.userAgent.match(/Android/i)) {
window.addEventListener("load", function() { window.scrollTo(0,1); }, false);
}
// Show the converter & hide the install option by default