1
0
mirror of https://github.com/locomotivemtl/locomotive-boilerplate.git synced 2026-01-15 00:55:08 +08:00
Files
locomotive-boilerplate/_assets/styles/settings/_config.speeds.scss

39 lines
882 B
SCSS
Raw Normal View History

2023-06-08 11:48:00 +02:00
// ==========================================================================
// Settings / Config / Speeds
2023-06-08 11:48:00 +02:00
// ==========================================================================
// Speeds
2023-06-08 11:48:00 +02:00
// ==========================================================================
$speeds: (
2023-06-08 11:48:00 +02:00
fastest: 0.1s,
faster: 0.15s,
fast: 0.25s,
normal: 0.3s,
slow: 0.5s,
slower: 0.75s,
slowest: 1s,
2023-06-08 11:48:00 +02:00
);
// Function
// ==========================================================================
// Returns timing.
//
// ```scss
// .c-box {
// transition-duration: speed(slow);
2023-06-08 11:48:00 +02:00
// }
// ```
//
// @param {string} $key - The speed key in $speeds.
2023-06-08 11:48:00 +02:00
// @return {duration}
@function speed($key: "normal") {
@if not map-has-key($speeds, $key) {
@error "Unknown '#{$key}' in $speeds.";
2023-06-08 11:48:00 +02:00
}
@return map-get($speeds, $key);
2023-06-08 11:48:00 +02:00
}