mirror of
https://github.com/locomotivemtl/locomotive-boilerplate.git
synced 2026-01-15 00:55:08 +08:00
39 lines
870 B
SCSS
39 lines
870 B
SCSS
// ==========================================================================
|
|
// Settings / Config / Timings
|
|
// ==========================================================================
|
|
|
|
// Timings
|
|
// ==========================================================================
|
|
|
|
$timings: (
|
|
fastest: 0.1s,
|
|
faster: 0.15s,
|
|
fast: 0.25s,
|
|
normal: 0.5s,
|
|
slow: 0.75s,
|
|
slower: 1s,
|
|
slowest: 2s,
|
|
);
|
|
|
|
// Function
|
|
// ==========================================================================
|
|
|
|
// Returns timing.
|
|
//
|
|
// ```scss
|
|
// .c-box {
|
|
// transition-duration: t(slow);
|
|
// }
|
|
// ```
|
|
//
|
|
// @param {string} $key - The timing key in $timings.
|
|
// @return {duration}
|
|
|
|
@function t($key) {
|
|
@if not map-has-key($timings, $key) {
|
|
@error "Unknown '#{$key}' in $timings.";
|
|
}
|
|
|
|
@return map-get($timings, $key);
|
|
}
|