Skip to content

Commit 74a919c

Browse files
authored
Deduplicate icons using Compound Design Tokens (#28381)
* Deduplicate icons using Compound Design Tokens Signed-off-by: Michael Telatynski <[email protected]> * Remove unused test images Signed-off-by: Michael Telatynski <[email protected]> * Update snapshots & screenshots Signed-off-by: Michael Telatynski <[email protected]> --------- Signed-off-by: Michael Telatynski <[email protected]>
1 parent b92101a commit 74a919c

File tree

26 files changed

+75
-104
lines changed

26 files changed

+75
-104
lines changed
-31 Bytes
Loading

res/css/structures/_RoomStatusBar.pcss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Please see LICENSE files in the repository root for full details.
125125
padding-left: 34px; /* 28px from above, but +6px to account for the wider icon */
126126

127127
&::before {
128-
mask-image: url("$(res)/img/element-icons/retry.svg");
128+
mask-image: url("@vector-im/compound-design-tokens/icons/restart.svg");
129129
}
130130
}
131131
}

res/css/structures/_SpaceHierarchy.pcss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Please see LICENSE files in the repository root for full details.
7777
height: 16px;
7878
width: 16px;
7979
left: 0;
80-
background-image: url("$(res)/img/element-icons/warning-badge.svg");
80+
background-image: url("@vector-im/compound-design-tokens/icons/error.svg");
8181
background-size: cover;
8282
background-repeat: no-repeat;
8383
}

res/css/views/context_menus/_MessageContextMenu.pcss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Please see LICENSE files in the repository root for full details.
2929
}
3030

3131
.mx_MessageContextMenu_iconReport::before {
32-
mask-image: url("$(res)/img/element-icons/warning-badge.svg");
32+
mask-image: url("@vector-im/compound-design-tokens/icons/error.svg");
3333
}
3434

3535
.mx_MessageContextMenu_iconLink::before {
@@ -61,7 +61,7 @@ Please see LICENSE files in the repository root for full details.
6161
}
6262

6363
.mx_MessageContextMenu_iconResend::before {
64-
mask-image: url("$(res)/img/element-icons/retry.svg");
64+
mask-image: url("@vector-im/compound-design-tokens/icons/restart.svg");
6565
}
6666

6767
.mx_MessageContextMenu_iconSource::before {

res/css/views/dialogs/_AddExistingToSpaceDialog.pcss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Please see LICENSE files in the repository root for full details.
125125
mask-repeat: no-repeat;
126126
mask-position: center;
127127
mask-size: contain;
128-
mask-image: url("$(res)/img/element-icons/retry.svg");
128+
mask-image: url("@vector-im/compound-design-tokens/icons/restart.svg");
129129
width: 18px;
130130
height: 18px;
131131
left: 0;

res/css/views/dialogs/security/_AccessSecretStorageDialog.pcss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Please see LICENSE files in the repository root for full details.
2121

2222
&.mx_AccessSecretStorageDialog_resetBadge::before {
2323
/* The image isn't capable of masking, so we use a background instead. */
24-
background-image: url("$(res)/img/element-icons/warning-badge.svg");
24+
background-image: url("@vector-im/compound-design-tokens/icons/error.svg");
2525
background-size: 24px;
2626
background-color: transparent;
2727
}
@@ -120,7 +120,7 @@ Please see LICENSE files in the repository root for full details.
120120
width: 16px;
121121
left: 0;
122122
top: 2px; /* alignment */
123-
background-image: url("$(res)/img/element-icons/warning-badge.svg");
123+
background-image: url("@vector-im/compound-design-tokens/icons/error.svg");
124124
background-size: contain;
125125
}
126126

res/css/views/elements/_InfoTooltip.pcss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ Please see LICENSE files in the repository root for full details.
2929
}
3030

3131
.mx_InfoTooltip_icon_warning::before {
32-
mask-image: url("$(res)/img/element-icons/warning.svg");
32+
mask-image: url("@vector-im/compound-design-tokens/icons/error.svg");
3333
}

res/css/views/messages/_MessageActionBar.pcss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ Please see LICENSE files in the repository root for full details.
108108
color: var(--cpd-color-icon-primary);
109109
}
110110

111+
&.mx_MessageActionBar_retryButton {
112+
--MessageActionBar-icon-size: 16px;
113+
}
114+
111115
&.mx_MessageActionBar_downloadButton {
112116
--MessageActionBar-icon-size: 14px;
113117

res/css/views/rooms/_EntityTile.pcss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ Please see LICENSE files in the repository root for full details.
3131
position: absolute;
3232
top: calc(50% - 8px); /* center */
3333
right: -8px;
34-
mask: url("$(res)/img/member_chevron.png");
34+
mask: url("@vector-im/compound-design-tokens/icons/chevron-right.svg");
3535
mask-repeat: no-repeat;
36+
mask-position: center;
3637
width: 16px;
3738
height: 16px;
3839
background-color: $header-panel-text-primary-color;

res/css/views/rooms/_ThreadSummary.pcss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ Please see LICENSE files in the repository root for full details.
5353
content: "";
5454
position: absolute;
5555
top: 50%;
56-
right: $spacing-12;
56+
right: var(--cpd-space-1x);
5757
transform: translateY(-50%);
58-
width: 12px;
59-
height: 12px;
60-
mask-image: url("$(res)/img/compound/chevron-right-12px.svg");
58+
width: 24px;
59+
height: 24px;
60+
mask-image: url("@vector-im/compound-design-tokens/icons/chevron-right.svg");
6161
mask-position: center;
6262
mask-size: contain;
6363
mask-repeat: no-repeat;

0 commit comments

Comments
 (0)