From 4d302ebd694b1e84ae3c6815656839203d063777 Mon Sep 17 00:00:00 2001 From: Raphael Ferrand Date: Tue, 22 Aug 2023 18:39:05 +0200 Subject: [PATCH 1/2] SWED-2269 revert LESS import notation --- .stylelintrc | 3 +- RELEASE_NOTES.md | 4 ++ src/less/components/button.less | 2 +- src/less/components/expandable.less | 2 +- src/less/documentation-payex.less | 6 +- src/less/documentation-swedbankpay.less | 4 +- src/less/payex.less | 40 ++++++------ src/less/swedbankpay.less | 86 ++++++++++++------------- 8 files changed, 76 insertions(+), 71 deletions(-) diff --git a/.stylelintrc b/.stylelintrc index 13ab665bc2..c61976c3de 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -70,6 +70,7 @@ { "ignoreFunctions": ["fade", "darken"] } - ] + ], + "import-notation": "string" } } diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 477aa60fdb..2d7e3ee68d 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -2,6 +2,10 @@ ## [10.8.5] - 03.07.2023 +## Bug Fixes + +- We reverted back the way CSS stylesheets were imported internally. It caused a regression bug, svg files would not load when imported from CSS properties (e.g. checkbox, ...). Paths resolution were failing. (not an issue for projects importing CSS via CDN, only for the ones importing styles via the local npm package) + ## Component changes ### Non breaking UI changes diff --git a/src/less/components/button.less b/src/less/components/button.less index 1177409b08..0e2addef66 100644 --- a/src/less/components/button.less +++ b/src/less/components/button.less @@ -1,4 +1,4 @@ -@import url("../global.less"); +@import "../global.less"; .btn { display: inline-flex; diff --git a/src/less/components/expandable.less b/src/less/components/expandable.less index f764fe193b..6ad1cd6025 100644 --- a/src/less/components/expandable.less +++ b/src/less/components/expandable.less @@ -1,4 +1,4 @@ -@import url("../global.less"); +@import "../global.less"; .expandable { border: none; diff --git a/src/less/documentation-payex.less b/src/less/documentation-payex.less index 50f600c942..c64cb04a0b 100644 --- a/src/less/documentation-payex.less +++ b/src/less/documentation-payex.less @@ -1,6 +1,6 @@ -@import url("variables-swedbankpay.less"); -@import url("variables-payex.less"); -@import url("documentation-swedbankpay.less"); +@import "variables-swedbankpay.less"; +@import "variables-payex.less"; +@import "documentation-swedbankpay.less"; .documentation { .doc-container { diff --git a/src/less/documentation-swedbankpay.less b/src/less/documentation-swedbankpay.less index cf923ec934..85a3b0240e 100644 --- a/src/less/documentation-swedbankpay.less +++ b/src/less/documentation-swedbankpay.less @@ -1,5 +1,5 @@ -@import url("variables-swedbankpay.less"); -@import url("global.less"); +@import "variables-swedbankpay.less"; +@import "global.less"; #designguide { display: flex; diff --git a/src/less/payex.less b/src/less/payex.less index 3a7d96089b..f62998fdb8 100644 --- a/src/less/payex.less +++ b/src/less/payex.less @@ -1,26 +1,26 @@ -@import url("swedbankpay.less"); +@import "swedbankpay.less"; /* Override variables */ -@import url("variables-payex"); +@import "variables-payex"; -@import url("components/payex/alert.less"); -@import url("components/payex/badge.less"); -@import url("components/payex/button.less"); -@import url("components/payex/checkbox.less"); -@import url("components/payex/datepicker.less"); -@import url("components/payex/form.less"); -@import url("components/payex/input-group.less"); -@import url("components/payex/links.less"); -@import url("components/payex/loader.less"); -@import url("components/payex/logo.less"); -@import url("components/payex/progress-step.less"); -@import url("components/payex/radio.less"); -@import url("components/payex/sidebar.less"); -@import url("components/payex/table.less"); -@import url("components/payex/tabs.less"); -@import url("components/payex/toast.less"); -@import url("components/payex/tooltip.less"); -@import url("components/payex/card.less"); +@import "components/payex/alert.less"; +@import "components/payex/badge.less"; +@import "components/payex/button.less"; +@import "components/payex/checkbox.less"; +@import "components/payex/datepicker.less"; +@import "components/payex/form.less"; +@import "components/payex/input-group.less"; +@import "components/payex/links.less"; +@import "components/payex/loader.less"; +@import "components/payex/logo.less"; +@import "components/payex/progress-step.less"; +@import "components/payex/radio.less"; +@import "components/payex/sidebar.less"; +@import "components/payex/table.less"; +@import "components/payex/tabs.less"; +@import "components/payex/toast.less"; +@import "components/payex/tooltip.less"; +@import "components/payex/card.less"; html, body { diff --git a/src/less/swedbankpay.less b/src/less/swedbankpay.less index 102a25ea62..0aa761d3a5 100644 --- a/src/less/swedbankpay.less +++ b/src/less/swedbankpay.less @@ -1,45 +1,45 @@ -@import url("global"); -@import url("variables-swedbankpay"); -@import url("utilities/all"); -@import url("core/all"); +@import "global"; +@import "variables-swedbankpay"; +@import "utilities/all"; +@import "core/all"; /* Components */ -@import url("components/accordion"); -@import url("components/action-list"); -@import url("components/alert"); -@import url("components/badge"); -@import url("components/breadcrumb"); -@import url("components/button"); -@import url("components/card"); -@import url("components/checkbox"); -@import url("components/code-tags"); -@import url("components/code-view"); -@import url("components/dropdown"); -@import url("components/datepicker"); -@import url("components/dialog"); -@import url("components/expandable"); -@import url("components/footer"); -@import url("components/form"); -@import url("components/input-group"); -@import url("components/links"); -@import url("components/lists"); -@import url("components/loader"); -@import url("components/media-object"); -@import url("components/nav"); -@import url("components/pagination"); -@import url("components/progress-steps"); -@import url("components/panel"); -@import url("components/radio"); -@import url("components/rangeslider"); -@import url("components/sheet"); -@import url("components/sidebar"); -@import url("components/slab"); -@import url("components/status"); -@import url("components/skip-link"); -@import url("components/tables"); -@import url("components/tabs"); -@import url("components/toast"); -@import url("components/togglebox"); -@import url("components/tooltip"); -@import url("components/topbar"); -@import url("components/validation"); +@import "components/accordion"; +@import "components/action-list"; +@import "components/alert"; +@import "components/badge"; +@import "components/breadcrumb"; +@import "components/button"; +@import "components/card"; +@import "components/checkbox"; +@import "components/code-tags"; +@import "components/code-view"; +@import "components/dropdown"; +@import "components/datepicker"; +@import "components/dialog"; +@import "components/expandable"; +@import "components/footer"; +@import "components/form"; +@import "components/input-group"; +@import "components/links"; +@import "components/lists"; +@import "components/loader"; +@import "components/media-object"; +@import "components/nav"; +@import "components/pagination"; +@import "components/progress-steps"; +@import "components/panel"; +@import "components/radio"; +@import "components/rangeslider"; +@import "components/sheet"; +@import "components/sidebar"; +@import "components/slab"; +@import "components/status"; +@import "components/skip-link"; +@import "components/tables"; +@import "components/tabs"; +@import "components/toast"; +@import "components/togglebox"; +@import "components/tooltip"; +@import "components/topbar"; +@import "components/validation"; From 6a913ac2c1518ba5393d34f5b03431cf338a0510 Mon Sep 17 00:00:00 2001 From: Raphael Ferrand Date: Tue, 22 Aug 2023 19:07:23 +0200 Subject: [PATCH 2/2] SWED-2269 apease Stylelint lint --- src/less/global.less | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/less/global.less b/src/less/global.less index 375cc589c3..dd7be51ff6 100644 --- a/src/less/global.less +++ b/src/less/global.less @@ -1,3 +1,4 @@ +/* stylelint-disable-next-line import-notation */ @import (css) url("https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined"); @@ -90,17 +91,20 @@ @font-face { font-family: "Futura PT W08 Book"; - src: url("../fonts/FuturaBook.woff2") format("woff2"), + src: + url("../fonts/FuturaBook.woff2") format("woff2"), url("../fonts/FuturaBook.woff") format("woff"); } @font-face { font-family: "Futura PT W08 Medium"; - src: url("../fonts/FuturaMedium.woff2") format("woff2"), + src: + url("../fonts/FuturaMedium.woff2") format("woff2"), url("../fonts/FuturaMedium.woff") format("woff"); } @font-face { font-family: "Futura PT W08 Demi"; - src: url("../fonts/FuturaDemi.woff2") format("woff2"), + src: + url("../fonts/FuturaDemi.woff2") format("woff2"), url("../fonts/FuturaDemi.woff") format("woff"); }