Skip to content

Instantly share code, notes, and snippets.

View KittyGiraudel's full-sized avatar
🐈

Kitty Giraudel KittyGiraudel

🐈
View GitHub Profile
@KittyGiraudel
KittyGiraudel / SassMeister-input.scss
Created January 9, 2014 13:57
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.5)
// Compass (v1.0.0.alpha.18)
// ----
/*! In information theory and computer science,
the Levenshtein distance is a string metric
for measuring the difference between two sequences.
Informally, the Levenshtein distance between two words
is the minimum number of single-character edits
@KittyGiraudel
KittyGiraudel / main.scss
Last active April 5, 2022 19:11
From: Architecturing a Sass project
// Sass utilities
@import "helpers/variables";
@import "helpers/functions";
@import "helpers/mixins";
@import "helpers/placeholders";
// Vendors and external stylesheets
@import "vendors/bootstrap";
@import "vendors/jquery-ui";
@KittyGiraudel
KittyGiraudel / SassMeister-input.scss
Created January 27, 2014 18:00
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
// A mixin of yours
@mixin app($conf: ()) {
// What could be the defaults parameter for your mixin
$conf: map-merge((
speed : 1000,
@KittyGiraudel
KittyGiraudel / SassMeister-input.scss
Created January 28, 2014 14:51
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
// Ever wanted to know what would be the color operations to apply to a color
// in order to find a second color, just out of curiosity?
// Like, "how to programmatically go from #BADA55 to #B0BCA7"?
// --------------------------------------------------------------------------------
// @param (color) $a: first color
@KittyGiraudel
KittyGiraudel / SassMeister-input.scss
Created February 3, 2014 15:32
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
@import "compass";
// Private function for custom stops
// ------------------------------------------------------------
// @param $colors: list of color + associated stop
@KittyGiraudel
KittyGiraudel / SassMeister-input.scss
Last active August 29, 2015 13:56
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.5)
// Compass (v1.0.0.alpha.18)
// ----
// Sass to CSV converter
// Just for the sake of it.
// --------------------------------------------
// @param [list|map] $value: value to convert
// @param [bool] $labels: enable first line as labels
@KittyGiraudel
KittyGiraudel / SassMeister-input.scss
Last active August 29, 2015 13:57
Generated by SassMeister.com.
// ----
// Sass (v3.3.1)
// Compass (v1.0.0.alpha.18)
// ----
// Sass polyfill for :matches()
// https://developer.mozilla.org/en-US/docs/Web/CSS/:any
// ---
// @param [string] $string: selector as a string, must contain %m where there would be :matches()
// @param [list] $selectors: list of selectors that would be passed to :matches() function
@KittyGiraudel
KittyGiraudel / gist:9488917
Created March 11, 2014 16:04
A question regarding Sass & Gzip

About Sass and Gzip

Hey guys! I have a question regarding Sass usage and Gzip compression. If anyone knows something, be sure to share. :)

A quick reminder

It's good practice to use Sass @extend rather than including mixins when possible because of the way Sass handles @extend. To put it simple, it doesn't take the CSS content from the extended selector to place them in the extending one. It works the other way around: it takes the extending selector and append it to the extended selector.

Placeholder

@KittyGiraudel
KittyGiraudel / SassMeister-input.scss
Created March 16, 2014 09:34
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
// Map storing values when the mixin is being called
$cache: (
width : (),
height : (),
);
@KittyGiraudel
KittyGiraudel / SassMeister-input.scss
Created March 19, 2014 09:02
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
// -----------------------------------------------------------------------------
// Introduction
// -----------------------------------------------------------------------------
// Here is hacky and experimental solution for cross-scopes extends