material-web/motion/_animation.scss
Material Web Team 41d41cc278 chore: update repository for Material 3
PiperOrigin-RevId: 455635969
2022-06-17 16:42:04 +00:00

34 lines
926 B
SCSS

//
// Copyright 2021 Google LLC
// SPDX-License-Identifier: Apache-2.0
//
$standard-easing: cubic-bezier(0.4, 0, 0.2, 1);
$acceleration-easing: cubic-bezier(0.4, 0, 1, 1);
$deceleration-easing: cubic-bezier(0, 0, 0.2, 1);
$sharp-easing: cubic-bezier(0.4, 0, 0.6, 1);
@function standard($name, $duration, $delay: null) {
@return _animation($name, $duration, $standard-easing, $delay);
}
@function acceleration($name, $duration, $delay: null) {
@return _animation($name, $duration, $acceleration-easing, $delay);
}
@function deceleration($name, $duration, $delay: null) {
@return _animation($name, $duration, $deceleration-easing, $delay);
}
@function sharp($name, $duration, $delay: null) {
@return _animation($name, $duration, $sharp-easing, $delay);
}
@function _animation($name, $duration, $easing, $delay) {
@if $delay {
@return $name $duration $easing $delay;
}
@return $name $duration $easing;
}