Closed lucasvallenet closed 1 year ago
Add useful SCSS functions:
—
grid-space() Return value based on grid cell width with possible offset of grid gutter
grid-space()
Usage:
.box { width: grid-space(6/12); margin-left: grid-space(1/12, 1); }
vh() Return value based of vh, default css vh if no overwrite (by javascript on mobile for example)
vh()
.box { height: vh(100); }
strip-unit() Return a value without unit (used for other function)
strip-unit()
responsive-type() Clamp min/max px value with a max breakpoint, useful for responsive font sizes
responsive-type()
.c-heading.-h1 { font-size: responsive-type(30px, 60px, 1800); } .c-heading.-h2 { font-size: responsive-type(20px, 40px, $from-big); }
Comment: Breakpoint value can be in px or plain number.
be71474
View logs
Add useful SCSS functions:
—
grid-space()
Return value based on grid cell width with possible offset of grid gutterUsage:
—
vh()
Return value based of vh, default css vh if no overwrite (by javascript on mobile for example)Usage:
—
strip-unit()
Return a value without unit (used for other function)—
responsive-type()
Clamp min/max px value with a max breakpoint, useful for responsive font sizesUsage:
Comment: Breakpoint value can be in px or plain number.