From aaab501dc84fc354449e16c98888af8a56e1e2df Mon Sep 17 00:00:00 2001 From: vanillaSlice Date: Sun, 30 Sep 2018 18:20:41 +0100 Subject: [PATCH] Remove redundant translate mixin --- src/components/_modals.scss | 2 +- src/core/_config.scss | 19 ++----------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/components/_modals.scss b/src/components/_modals.scss index fe02614..c2a92c7 100644 --- a/src/components/_modals.scss +++ b/src/components/_modals.scss @@ -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; diff --git a/src/core/_config.scss b/src/core/_config.scss index 14b8891..a6f2123 100644 --- a/src/core/_config.scss +++ b/src/core/_config.scss @@ -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;