Skip to content

Instantly share code, notes, and snippets.

View Cleecanth's full-sized avatar

Chris Lee Cleecanth

View GitHub Profile
@Cleecanth
Cleecanth / clamp-calculator.scss
Last active February 1, 2023 20:20
Font Clamp calculator
@use 'sass:math';
/**
* Sass function, adapted from:
* @link https://chrisburnell.com/clamp-calculator/
*/
@function fs-clamp($min-fs, $max-fs, $min-vw, $max-vw) {
$x: div(
($max-fs - $min-fs),
($max-vw - $min-vw)
@Cleecanth
Cleecanth / pathmorphs.svelte
Created May 29, 2019 20:52
Path morphing with svelte
<script>
import {onMount} from 'svelte';
import {tweened} from 'svelte/motion';
import {cubicOut} from 'svelte/easing';
import {interpolate} from 'polymorph-js';
let svg, path;
let pathD;
let pathVal = [
@Cleecanth
Cleecanth / example.js
Created April 23, 2019 23:34 — forked from johanalkstal/example.js
Basic Svelte Store Routing
/**
* Basic example of routerless store based routing.
* To understand what is going on check out
* https://svelte.dev/tutorial/writable-stores
* https://www.npmjs.com/package/feather-route-matcher
*/
// stores.js
@Cleecanth
Cleecanth / SassMeister-input.scss
Created September 10, 2015 15:58
Generated by SassMeister.com.
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// Toolkit (v2.9.0)
// ----
@import "toolkit";
//Sass does some strange stuff with unquoted "and"s.
@Cleecanth
Cleecanth / _colors.scss
Created January 15, 2015 21:35
A way to generate a color palette using base colors
$colors: (
primary: (
base: #063b6d
),
accent: (
base: #d40026
),
action: (
base: #4c7659
),