Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including @lunelson/sass-lerp with all npm packages installed. Try it out:

require("@lunelson/sass-calc/package.json"); // @lunelson/sass-calc is a peer dependency. require("@lunelson/sass-throw/package.json"); // @lunelson/sass-throw is a peer dependency. var sassLerp = require("@lunelson/sass-lerp")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@lunelson/sass-lerp v1.0.0

Create dynamically interpolated values with CSS calc() expressions

Sass Lerp

A "lerp" or linear interpolation is a linear equation that expresses the straight line between two [x, y] points on a plane, as a function y = f(x). This function creates a CSS calc() expression which resolves an interpolation of two static values, relative to a low/high range of a dynamic value (width, font-size, viewport dimensions) using a combination of relative and absolute units. This enables numerous applications of dynamic values in CSS including for letter-spacing, line-height, font-size, margin, padding, width and height.

Questions?

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free