Skip to content

Instantly share code, notes, and snippets.

@pascalduez
pascalduez / SassMeister-input.scss
Created June 9, 2014 06:01
Vigenère square or Vigenère table, aka tabula recta.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
// Vigenère square or Vigenère table, aka tabula recta.
// https://en.wikipedia.org/wiki/Tabula_recta
@function shift($list, $value: 1, $dir: right) {
@pascalduez
pascalduez / SassMeister-input.scss
Last active August 29, 2015 14:02
Gray code (reflected binary code) convertion in Sass.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// SassyBitwise (v1.1.1)
// ----
@import "SassyBitwise";
// Gray code (reflected binary code) convertion in Sass.
@pascalduez
pascalduez / sass-collection.md
Last active November 24, 2020 14:42
Collecting my Sass snippets.
@pascalduez
pascalduez / SassMeister-input.scss
Last active April 9, 2018 16:52
ROT13 implementation in Sass.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.18)
// ----
// ROT13 implementation in Sass.
// https://en.wikipedia.org/wiki/ROT13
@function rot13($str) {
@pascalduez
pascalduez / SassMeister-input.scss
Last active September 9, 2023 23:58
JavaScript `toString` and `parseInt` implementation in Sass.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
// JavaScript `toString` and `parseInt` implementation in Sass.
@function pow($num, $exp) {
$result: 1;
@pascalduez
pascalduez / SassMeister-input.scss
Last active September 22, 2022 08:05
Deep nested values in Sass maps
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
// Deep nested values in Sass maps.
// Fetch a deep value in a multi-level map.
// https://gist.github.com/KittyGiraudel/9933331
@pascalduez
pascalduez / SassMeister-input.scss
Last active August 29, 2015 14:01
Sass flexible prefixer mixin.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
// A Sass flexible prefixer mixin.
// Returns a list containing all the entries from `$list`
@pascalduez
pascalduez / SassMeister-input.scss
Created May 9, 2014 16:09
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
// A Sass `map-fetch` function
@function head($list) {
@return nth($list, 1);
@pascalduez
pascalduez / SassMeister-input.scss
Created April 30, 2014 19:16
Prototypal inheritance in Sass
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
// Prototypal inheritance in Sass
// Disclaimer: might be totally contrived and useless...
// “It’s not about the destination, but the journey.”
// New operator
@pascalduez
pascalduez / SassMeister-input.scss
Created April 27, 2014 11:15
Sass, testing for empty values.
// ----
// Sass (v3.3.5)
// Compass (v1.0.0.alpha.18)
// ----
// testing for empty values
// In Sass "", 0, () evaluate to true...
@function empty($value) {
@if not $value