Remove redundant translate mixin

This commit is contained in:
vanillaSlice 2018-09-30 18:20:41 +01:00
parent 0a63478761
commit aaab501dc8
2 changed files with 3 additions and 18 deletions

View file

@ -25,7 +25,6 @@
.modal-body {
@include transition;
@include translate(-50%, -50%);
backface-visibility: hidden;
background: $white;
border: 2px solid $muted-light;
@ -33,6 +32,7 @@
padding: 1.25rem;
position: absolute;
top: 0;
transform: translate(-50%, -50%);
@include resp(sm) {
box-sizing: border-box;

View file

@ -171,22 +171,7 @@ $shadow-hover: 2px 8px 8px -5px $shadow-color-hover !default;
}
/*
Add transform: translate().
Same syntax for translate() and translate3d()
To get 3D add a $z value and set 'true'
@param string | boolean
@default 0 | false
*/
@mixin translate($x, $y, $z: 0, $transform3d: false) {
@if $transform3d {
transform: translate3d($x, $y, $z);
} @else {
transform: translate($x, $y);
}
}
/*
Add global transition styles to selector
Add transition styles to selector
@param string
@default all | 235ms | ease-in-out | 0
*/
@ -201,8 +186,8 @@ $shadow-hover: 2px 8px 8px -5px $shadow-color-hover !default;
*/
@mixin shadow($type: regular) {
@if $type == hover {
@include translate(0, 2px, 0, true);
box-shadow: $shadow-hover;
transform: translate3d(0, 2px, 0);
} @else if $type == small {
@include transition($animation: ease);
box-shadow: $shadow-small;