From cfdddac43f10d06a8b0e9bcf69dc0ce77ce16649 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 8 Jun 2022 19:06:27 +0200 Subject: fix(settings): avoid cropped tooltip on small devices I changed the settings disposition to make tooltip positioning easier. Jest complains about ref passed but everything seems to work as expected so I'm not sure it is relevant. Maybe a bug with cloneElement. --- src/styles/abstracts/_variables.scss | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/styles') diff --git a/src/styles/abstracts/_variables.scss b/src/styles/abstracts/_variables.scss index 79824dd..9620fa0 100644 --- a/src/styles/abstracts/_variables.scss +++ b/src/styles/abstracts/_variables.scss @@ -45,6 +45,20 @@ $breakpoints: ( "lg": fun.convert-px(1600, "em"), ); +// I cannot declare the following function with others functions due to module +// loop. But, it will only be used in this file so it is not really a problem. + +/// Get breakpoint +/// @param {String} $name - Breakpoint name. +/// @return {String} The breakpoint value. +@function get-breakpoint($breakpoint) { + @if type-of($breakpoint) == "string" { + @return map.get($breakpoints, $breakpoint); + } @else { + @error "`$breakpoint` must be a string."; + } +} + //=========================================================================== // Fonts //=========================================================================== -- cgit v1.2.3