From ccb5e2176a6e6889627daf1ac4e2f395a14cbe42 Mon Sep 17 00:00:00 2001 From: Shawn Allen Date: Fri, 1 Mar 2019 10:55:57 -0800 Subject: [PATCH] refactor(utilities/layout): make it less DRY --- src/utilities/layout.scss | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/utilities/layout.scss b/src/utilities/layout.scss index 7c214f2d..ba8d4a5c 100644 --- a/src/utilities/layout.scss +++ b/src/utilities/layout.scss @@ -36,13 +36,17 @@ .v-align-baseline { vertical-align: baseline !important; } // Overflow utilities -// overflow-hidden can also be used to create a new -// block formatting context or clear floats. -@each $overflow in (hidden, scroll, auto) { - .overflow-#{$overflow} { overflow: $overflow !important; } - .overflow-x-#{$overflow} { overflow-x: $overflow !important; } - .overflow-y-#{$overflow} { overflow-y: $overflow !important; } -} +.overflow-hidden { overflow: hidden !important; } +.overflow-x-hidden { overflow-x: hidden !important; } +.overflow-y-hidden { overflow-y: hidden !important; } + +.overflow-auto { overflow: auto !important; } +.overflow-x-auto { overflow-x: auto !important; } +.overflow-y-auto { overflow-y: auto !important; } + +.overflow-scroll { overflow: scroll !important; } +.overflow-x-scroll { overflow-x: scroll !important; } +.overflow-y-scroll { overflow-y: scroll !important; } // Clear floats /* Clear floats around the element */