From 96f2dcd8392525fee707312f85e7254abc6dbeb3 Mon Sep 17 00:00:00 2001 From: Holger Stitz Date: Wed, 8 Jan 2025 14:17:16 +0100 Subject: [PATCH] fix: @use imports --- src/scss/vendors/_lineup.scss | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/scss/vendors/_lineup.scss b/src/scss/vendors/_lineup.scss index 1dcac0e60..7f47226b5 100644 --- a/src/scss/vendors/_lineup.scss +++ b/src/scss/vendors/_lineup.scss @@ -1,15 +1,17 @@ // With https://github.com/lineupjs/lineupengine/releases/tag/v2.5.3, they changed from @import to @use, forcing us to use the variables before being able to override them. -@use 'lineupengine/src/styles/vars' as *; +@use 'lineupengine/src/styles/vars' as * with ( + // TODO: Without this, we get "Can't resolve './node_modules/lineupengine/src/styles/lineupengine/src/assets/loading.svg' in '.../workspaces/'" + // Why do I need to do this? Probably because lineupjs defines $engine_assets and it is resolving it relatively? + $engine_assets: '../assets', + $engine_loading_image: url('../assets/loading.svg'), + $engine_loading_static_image: url('../assets/loading_s.svg') +); -// TODO: Without this, we get "Can't resolve './node_modules/lineupengine/src/styles/lineupengine/src/assets/loading.svg' in '.../workspaces/'" -// Why do I need to do this? Probably because lineupjs defines $engine_assets and it is resolving it relatively? -$engine_assets: '../assets'; -$engine_loading_image: url('#{$engine_assets}/loading.svg'); -$engine_loading_static_image: url('#{$engine_assets}/loading_s.svg'); - -$lu_assets: '../assets' !default; -$lu_use_font_awesome: true !default; -$lu_include_font_awesome: false !default; +@use 'lineupjs/src/styles/vars' as * with ( + $lu_assets: '../assets', + $lu_use_font_awesome: true, + $lu_include_font_awesome: false +); // Add fontawesome only here to allow lazy loading of this style. @import '@fortawesome/fontawesome-free/scss/solid'; @@ -17,7 +19,7 @@ $lu_include_font_awesome: false !default; @import '@fortawesome/fontawesome-free/scss/brands'; @import '@fortawesome/fontawesome-free/scss/fontawesome'; -@import 'lineupjs/src/style.scss'; +@import 'lineupjs/src/styles/lineup.scss'; .lu { // use a fixed font-size for the ranking + side panel with the Roboto font family. @@ -63,4 +65,4 @@ $lu_include_font_awesome: false !default; mask-position: center; mask-repeat: no-repeat; font-size: inherit; -} \ No newline at end of file +}