From 8cbc40b2fe9d36ef0505b9441276ca561342e9e9 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 27 May 2021 18:25:00 +0200 Subject: Move to sass module --- client/src/sass/include/_mixins.scss | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'client/src/sass/include/_mixins.scss') diff --git a/client/src/sass/include/_mixins.scss b/client/src/sass/include/_mixins.scss index bf7504d91..4d4c52b34 100644 --- a/client/src/sass/include/_mixins.scss +++ b/client/src/sass/include/_mixins.scss @@ -1,4 +1,5 @@ -@use '_variables'; +@use 'sass:math'; +@use '_variables' as *; @mixin disable-default-a-behaviour { &:hover, @@ -745,7 +746,7 @@ > div { box-sizing: border-box; - flex: 0 0 percentage(1/3); + flex: 0 0 percentage(math.div(1, 3)); padding: 0 5px; margin-bottom: 10px; @@ -867,7 +868,7 @@ // applies ratio (default to 16:9) to a child element (using $selector) only using // an immediate's parent size. This allows to set a ratio without explicit // dimensions, as width/height cannot be computed from each other. -@mixin block-ratio ($selector: 'div', $inverted-ratio: 9/16) { +@mixin block-ratio ($selector: 'div', $inverted-ratio: math.div(9, 16)) { $padding-percent: percentage($inverted-ratio); position: relative; @@ -916,8 +917,8 @@ top: 50%; transform: translate(-50%, -50%) scale(0.5); - border-top: ($height / 2) solid transparent; - border-bottom: ($height / 2) solid transparent; + border-top: #{math.div($height, 2)} solid transparent; + border-bottom: #{math.div($height, 2)} solid transparent; border-left: $width solid rgba(255, 255, 255, 0.95); } -- cgit v1.2.3