From 41444bce9b75a020db748d0c02907e12a4ace784 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 4 Feb 2026 14:40:59 +0000 Subject: [PATCH] Rid the world of `$(res)` Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- res/css/structures/_RoomView.pcss | 2 +- res/css/structures/_SplashPage.pcss | 2 +- res/css/views/avatars/_DecoratedRoomAvatar.pcss | 2 +- res/css/views/avatars/_RoomAvatarView.pcss | 4 ++-- res/css/views/dialogs/_AnalyticsLearnMoreDialog.pcss | 2 +- res/css/views/rooms/RoomListPanel/_RoomListSkeleton.pcss | 2 +- res/css/views/rooms/_RoomSublist.pcss | 2 +- res/css/views/rooms/_WhoIsTypingTile.pcss | 2 +- res/css/views/voip/_LegacyCallView.pcss | 2 +- res/themes/dark-custom/css/dark-custom.pcss | 1 - res/themes/dark/css/dark.pcss | 1 - res/themes/legacy-dark/css/legacy-dark.pcss | 1 - res/themes/legacy-light/css/_fonts.pcss | 6 +++--- res/themes/legacy-light/css/_paths.pcss | 3 --- res/themes/legacy-light/css/legacy-light.pcss | 1 - res/themes/light-custom/css/light-custom.pcss | 1 - res/themes/light-high-contrast/css/light-high-contrast.pcss | 1 - res/themes/light/css/_fonts.pcss | 6 +++--- res/themes/light/css/_paths.pcss | 3 --- res/themes/light/css/light.pcss | 1 - src/vector/jitsi/index.pcss | 4 +--- 21 files changed, 17 insertions(+), 32 deletions(-) delete mode 100644 res/themes/legacy-light/css/_paths.pcss delete mode 100644 res/themes/light/css/_paths.pcss diff --git a/res/css/structures/_RoomView.pcss b/res/css/structures/_RoomView.pcss index 03f95020da..6a5ceb641b 100644 --- a/res/css/structures/_RoomView.pcss +++ b/res/css/structures/_RoomView.pcss @@ -55,7 +55,7 @@ Please see LICENSE files in the repository root for full details. .mx_RoomView_messagePanelSearchSpinner { flex: 1; - background-image: url("$(res)/img/typing-indicator-2x.gif"); + background-image: url("/res/img/typing-indicator-2x.gif"); background-position: center 367px; background-size: 25px; background-repeat: no-repeat; diff --git a/res/css/structures/_SplashPage.pcss b/res/css/structures/_SplashPage.pcss index 8f06541179..6eb01478c9 100644 --- a/res/css/structures/_SplashPage.pcss +++ b/res/css/structures/_SplashPage.pcss @@ -30,7 +30,7 @@ Please see LICENSE files in the repository root for full details. inset: -9px; mask: /* mask to dither resulting combined gradient */ - url("$(res)/img/noise.png"), + url("/res/img/noise.png"), /* gradient to apply different amounts of dithering to different parts of the gradient */ linear-gradient( to bottom, diff --git a/res/css/views/avatars/_DecoratedRoomAvatar.pcss b/res/css/views/avatars/_DecoratedRoomAvatar.pcss index f170471a01..2ad1b174af 100644 --- a/res/css/views/avatars/_DecoratedRoomAvatar.pcss +++ b/res/css/views/avatars/_DecoratedRoomAvatar.pcss @@ -13,7 +13,7 @@ Please see LICENSE files in the repository root for full details. line-height: 0; &.mx_DecoratedRoomAvatar_cutout .mx_BaseAvatar { - mask-image: url("$(res)/img/element-icons/roomlist/decorated-avatar-mask.svg"); + mask-image: url("/res/img/element-icons/roomlist/decorated-avatar-mask.svg"); mask-position: center; mask-size: contain; mask-repeat: no-repeat; diff --git a/res/css/views/avatars/_RoomAvatarView.pcss b/res/css/views/avatars/_RoomAvatarView.pcss index 0d5523a9f1..509b51c3e8 100644 --- a/res/css/views/avatars/_RoomAvatarView.pcss +++ b/res/css/views/avatars/_RoomAvatarView.pcss @@ -21,11 +21,11 @@ } .mx_RoomAvatarView_RoomAvatar_icon { - mask-image: url("$(res)/img/element-icons/roomlist/room-avatar-view-icon-mask.svg"); + mask-image: url("/res/img/element-icons/roomlist/room-avatar-view-icon-mask.svg"); } .mx_RoomAvatarView_RoomAvatar_presence { - mask-image: url("$(res)/img/element-icons/roomlist/room-avatar-view-presence-mask.svg"); + mask-image: url("/res/img/element-icons/roomlist/room-avatar-view-presence-mask.svg"); } .mx_RoomAvatarView_icon { diff --git a/res/css/views/dialogs/_AnalyticsLearnMoreDialog.pcss b/res/css/views/dialogs/_AnalyticsLearnMoreDialog.pcss index e48800c881..5bafec7c0f 100644 --- a/res/css/views/dialogs/_AnalyticsLearnMoreDialog.pcss +++ b/res/css/views/dialogs/_AnalyticsLearnMoreDialog.pcss @@ -9,7 +9,7 @@ Please see LICENSE files in the repository root for full details. .mx_AnalyticsLearnMoreDialog { max-width: 500px; .mx_AnalyticsLearnMore_image_holder { - background-image: url("$(res)/img/element-shiny.svg"); + background-image: url("/res/img/element-shiny.svg"); background-repeat: no-repeat; background-position: center top; height: 112px; diff --git a/res/css/views/rooms/RoomListPanel/_RoomListSkeleton.pcss b/res/css/views/rooms/RoomListPanel/_RoomListSkeleton.pcss index 2e644cbba1..248f260262 100644 --- a/res/css/views/rooms/RoomListPanel/_RoomListSkeleton.pcss +++ b/res/css/views/rooms/RoomListPanel/_RoomListSkeleton.pcss @@ -19,6 +19,6 @@ position: absolute; mask-repeat: repeat-y; mask-size: auto 96px; - mask-image: url("$(res)/img/element-icons/roomlist/room-list-item-skeleton.svg"); + mask-image: url("/res/img/element-icons/roomlist/room-list-item-skeleton.svg"); } } diff --git a/res/css/views/rooms/_RoomSublist.pcss b/res/css/views/rooms/_RoomSublist.pcss index aca8109f50..f1118ebed6 100644 --- a/res/css/views/rooms/_RoomSublist.pcss +++ b/res/css/views/rooms/_RoomSublist.pcss @@ -379,7 +379,7 @@ Please see LICENSE files in the repository root for full details. position: absolute; mask-repeat: repeat-y; mask-size: auto 48px; - mask-image: url("$(res)/img/element-icons/roomlist/skeleton-ui.svg"); + mask-image: url("/res/img/element-icons/roomlist/skeleton-ui.svg"); } } diff --git a/res/css/views/rooms/_WhoIsTypingTile.pcss b/res/css/views/rooms/_WhoIsTypingTile.pcss index eb604155c5..08f519eaa6 100644 --- a/res/css/views/rooms/_WhoIsTypingTile.pcss +++ b/res/css/views/rooms/_WhoIsTypingTile.pcss @@ -49,7 +49,7 @@ Please see LICENSE files in the repository root for full details. } .mx_WhoIsTypingTile_label > span { - background-image: url("$(res)/img/typing-indicator-2x.gif"); + background-image: url("/res/img/typing-indicator-2x.gif"); background-size: 25px; background-position: left bottom; background-repeat: no-repeat; diff --git a/res/css/views/voip/_LegacyCallView.pcss b/res/css/views/voip/_LegacyCallView.pcss index 93d3e23f8b..a8d13adc62 100644 --- a/res/css/views/voip/_LegacyCallView.pcss +++ b/res/css/views/voip/_LegacyCallView.pcss @@ -110,7 +110,7 @@ Please see LICENSE files in the repository root for full details. content: ""; width: 40px; height: 40px; - background-image: url("$(res)/img/voip/paused.svg"); + background-image: url("/res/img/voip/paused.svg"); background-position: center; background-size: cover; } diff --git a/res/themes/dark-custom/css/dark-custom.pcss b/res/themes/dark-custom/css/dark-custom.pcss index a6c5a7a7b4..7eaffcee0c 100644 --- a/res/themes/dark-custom/css/dark-custom.pcss +++ b/res/themes/dark-custom/css/dark-custom.pcss @@ -1,5 +1,4 @@ @import "../../../../res/css/_font-sizes.pcss"; -@import "../../legacy-light/css/_paths.pcss"; @import "../../legacy-light/css/_fonts.pcss"; @import "../../legacy-light/css/_legacy-light.pcss"; @import "../../legacy-dark/css/_legacy-dark.pcss"; diff --git a/res/themes/dark/css/dark.pcss b/res/themes/dark/css/dark.pcss index b81a2793f0..05cc9dfb6a 100644 --- a/res/themes/dark/css/dark.pcss +++ b/res/themes/dark/css/dark.pcss @@ -1,5 +1,4 @@ @import "../../../../res/css/_font-sizes.pcss"; -@import "../../light/css/_paths.pcss"; @import "../../light/css/_fonts.pcss"; @import "../../light/css/_light.pcss"; @import "_dark.pcss"; diff --git a/res/themes/legacy-dark/css/legacy-dark.pcss b/res/themes/legacy-dark/css/legacy-dark.pcss index 240175c9d1..d816c8c24d 100644 --- a/res/themes/legacy-dark/css/legacy-dark.pcss +++ b/res/themes/legacy-dark/css/legacy-dark.pcss @@ -1,5 +1,4 @@ @import "../../../../res/css/_font-sizes.pcss"; -@import "../../legacy-light/css/_paths.pcss"; @import "../../legacy-light/css/_fonts.pcss"; @import "../../legacy-light/css/_legacy-light.pcss"; @import "_legacy-dark.pcss"; diff --git a/res/themes/legacy-light/css/_fonts.pcss b/res/themes/legacy-light/css/_fonts.pcss index bc65ec2d6e..dd22ecef34 100644 --- a/res/themes/legacy-light/css/_fonts.pcss +++ b/res/themes/legacy-light/css/_fonts.pcss @@ -23,17 +23,17 @@ font-family: "Nunito"; font-style: normal; font-weight: 400; - src: url("$(res)/fonts/Nunito/Nunito-Regular.ttf") format("truetype"); + src: url("/res/fonts/Nunito/Nunito-Regular.ttf") format("truetype"); } @font-face { font-family: "Nunito"; font-style: normal; font-weight: 600; - src: url("$(res)/fonts/Nunito/Nunito-SemiBold.ttf") format("truetype"); + src: url("/res/fonts/Nunito/Nunito-SemiBold.ttf") format("truetype"); } @font-face { font-family: "Nunito"; font-style: normal; font-weight: 700; - src: url("$(res)/fonts/Nunito/Nunito-Bold.ttf") format("truetype"); + src: url("/res/fonts/Nunito/Nunito-Bold.ttf") format("truetype"); } diff --git a/res/themes/legacy-light/css/_paths.pcss b/res/themes/legacy-light/css/_paths.pcss deleted file mode 100644 index d35445dfd9..0000000000 --- a/res/themes/legacy-light/css/_paths.pcss +++ /dev/null @@ -1,3 +0,0 @@ -/* Path from root SCSS file (such as `light.pcss`) to `res` dir in the source tree */ -/* This value is overridden by external themes in `element-web`. */ -$res: ../../..; diff --git a/res/themes/legacy-light/css/legacy-light.pcss b/res/themes/legacy-light/css/legacy-light.pcss index 7e42d75bfc..d196b2850c 100644 --- a/res/themes/legacy-light/css/legacy-light.pcss +++ b/res/themes/legacy-light/css/legacy-light.pcss @@ -1,5 +1,4 @@ @import "../../../../res/css/_font-sizes.pcss"; -@import "_paths.pcss"; @import "_fonts.pcss"; @import "_legacy-light.pcss"; @import "../../../../res/css/_components.pcss"; diff --git a/res/themes/light-custom/css/light-custom.pcss b/res/themes/light-custom/css/light-custom.pcss index c39e9bcf30..d02c0eeef4 100644 --- a/res/themes/light-custom/css/light-custom.pcss +++ b/res/themes/light-custom/css/light-custom.pcss @@ -1,5 +1,4 @@ @import "../../../../res/css/_font-sizes.pcss"; -@import "../../legacy-light/css/_paths.pcss"; @import "../../legacy-light/css/_fonts.pcss"; @import "../../legacy-light/css/_legacy-light.pcss"; @import "_custom.pcss"; diff --git a/res/themes/light-high-contrast/css/light-high-contrast.pcss b/res/themes/light-high-contrast/css/light-high-contrast.pcss index 2556c2c4f5..c794d07499 100644 --- a/res/themes/light-high-contrast/css/light-high-contrast.pcss +++ b/res/themes/light-high-contrast/css/light-high-contrast.pcss @@ -1,5 +1,4 @@ @import "../../../../res/css/_font-sizes.pcss"; -@import "../../light/css/_paths.pcss"; @import "../../light/css/_fonts.pcss"; @import "../../light/css/_light.pcss"; @import "_light-high-contrast.pcss"; diff --git a/res/themes/light/css/_fonts.pcss b/res/themes/light/css/_fonts.pcss index 8044f47b21..878920102f 100644 --- a/res/themes/light/css/_fonts.pcss +++ b/res/themes/light/css/_fonts.pcss @@ -5,16 +5,16 @@ @font-face { font-family: "Twemoji"; font-weight: 400; - src: url("$(res)/fonts/Twemoji_Mozilla/TwemojiMozilla-colr.woff2") format("woff2"); + src: url("/res/fonts/Twemoji_Mozilla/TwemojiMozilla-colr.woff2") format("woff2"); } /* For at least Chrome on Windows 10, we have to explictly add extra weights for the emoji to appear in bold messages, etc. */ @font-face { font-family: "Twemoji"; font-weight: 600; - src: url("$(res)/fonts/Twemoji_Mozilla/TwemojiMozilla-colr.woff2") format("woff2"); + src: url("/res/fonts/Twemoji_Mozilla/TwemojiMozilla-colr.woff2") format("woff2"); } @font-face { font-family: "Twemoji"; font-weight: 700; - src: url("$(res)/fonts/Twemoji_Mozilla/TwemojiMozilla-colr.woff2") format("woff2"); + src: url("/res/fonts/Twemoji_Mozilla/TwemojiMozilla-colr.woff2") format("woff2"); } diff --git a/res/themes/light/css/_paths.pcss b/res/themes/light/css/_paths.pcss deleted file mode 100644 index d35445dfd9..0000000000 --- a/res/themes/light/css/_paths.pcss +++ /dev/null @@ -1,3 +0,0 @@ -/* Path from root SCSS file (such as `light.pcss`) to `res` dir in the source tree */ -/* This value is overridden by external themes in `element-web`. */ -$res: ../../..; diff --git a/res/themes/light/css/light.pcss b/res/themes/light/css/light.pcss index 3fd90482f1..d3abfe669c 100644 --- a/res/themes/light/css/light.pcss +++ b/res/themes/light/css/light.pcss @@ -1,5 +1,4 @@ @import "../../../../res/css/_font-sizes.pcss"; -@import "_paths.pcss"; @import "_fonts.pcss"; @import "_light.pcss"; @import "_mods.pcss"; diff --git a/src/vector/jitsi/index.pcss b/src/vector/jitsi/index.pcss index 8bb4b508a0..33d5170658 100644 --- a/src/vector/jitsi/index.pcss +++ b/src/vector/jitsi/index.pcss @@ -8,14 +8,12 @@ Please see LICENSE files in the repository root for full details. /* TODO: Match the user's theme: https://github.com/element-hq/element-web/issues/12794 */ @import url("@vector-im/compound-design-tokens/assets/web/css/compound-design-tokens.css"); -/* Path to `res` dir in the source tree */ -$res: ../../../res; @font-face { font-family: "Nunito"; font-style: normal; font-weight: 400; - src: url("$(res)/fonts/Nunito/Nunito-Regular.ttf") format("truetype"); + src: url("/res/fonts/Nunito/Nunito-Regular.ttf") format("truetype"); } $dark-fg: #edf3ff;