Skip to content

Instantly share code, notes, and snippets.

@jakob-e
jakob-e / unitconversion.scss
Last active October 26, 2022 17:20
SCSS unit conversion functions
// ==========================================================
// Unit Conversion
// ==========================================================
//
// Functions:
// ----------------------------------------------------------
//
// NUMBER:
//
// isNaN($value) - returns true or false if type-of($value)==number
// Strip units (from unit conversion)
@function number($val){
@if($val==null){ @return null;}
@return $val/($val*0+1);
}
// ======================
// Inbuild
// ======================
// floor
@jakob-e
jakob-e / ResponsiveFonts.scss
Created September 22, 2013 09:42
ResponsiveFonts
// SCSS Mixin v.1.0 - beta
// =========================================
// ResponsiveFonts
// =========================================
// Config
$base-width:960 !default; // Width @ 100% layout or 1:1
$min-width:320 !default; // Minimum width
$max-width:2560 !default; // Maximum width
// only run once
@jakob-e
jakob-e / ModularSCSScale.scss
Last active December 24, 2015 07:29
ModularSCSScale - A mixin for making modular scales a la ModuularScales.com
// Config
$base-font-size:16 !default; // Ideal font size
$sign-font-size:16 !default; // Significant font size
$MS_MINOR_SECOND: 1.067;
$MS_MAJOR_SECOND: 1.125;
$MS_MINOR_THIRD: 1.200;
$MS_MAJOR_THIRD: 1.250;
$MS_PERFECT_FOURTH:1.333;
@jakob-e
jakob-e / A-Pen-by-jakob-e.markdown
Created October 6, 2013 17:41
A Pen by jakob-e.
@jakob-e
jakob-e / SassMeister-input.scss
Created November 3, 2013 09:14
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
// ====================================================================
// Unit Conversion
// ====================================================================
@jakob-e
jakob-e / paths.scss
Last active December 27, 2015 07:29
Simple centralized path control v3.12
//=========================================================================
// Paths
// - Simple centralized path control
//=========================================================================
// Set default path - if no path is provided
// Enable paths - if false url(...) will work as normal
$paths-default:images !default;
$paths-enabled:true !default;
// Override CSS url(...)
@function url($src, $path:$paths-default){
@jakob-e
jakob-e / paths.scss
Last active December 27, 2015 07:39
Simple centralized path control v3.3 (using map)
//=========================================================================
// Paths SCSS 3.3 using map
// - Simple centralized path control
//=========================================================================
// Set default path - if no path is provided
// Enable paths - if false url(...) will work as normal
$paths-default:images !default;
$paths-enabled:true !default;
// Override CSS url(...)
@function url($src, $path:$paths-default){
// Chunks $list into $size large lists
// -------------------------------------------------------------------------------
// @documentation http://sassylists.com/documentation/#chunk
// -------------------------------------------------------------------------------
// @example chunk(a b c d e, 2) => a b, c d, e
// @example chunk(a b c d e, 3) => a b c, d e
// -------------------------------------------------------------------------------
// @param $list [List] : list
// @param $size [Number] : length of lists
// -------------------------------------------------------------------------------