Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

De-duplicate icons using Compound Design Tokens #121

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion res/css/_common.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ input[type="search"].mx_textinput_icon {
/* FIXME THEME - Tint by CSS rather than referencing a duplicate asset */
input[type="text"].mx_textinput_icon.mx_textinput_search,
input[type="search"].mx_textinput_icon.mx_textinput_search {
background-image: url("$(res)/img/feather-customised/search-input.svg");
background-image: url("@vector-im/compound-design-tokens/icons/search.svg");
}

/* dont search UI as not all browsers support it, */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ Please see LICENSE files in the repository root for full details.

.mx_KebabContextMenu_icon {
width: 24px;
height: 24px;
color: $icon-button-color;
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Please see LICENSE files in the repository root for full details.
}

.mx_PollDetailHeader_icon {
height: 15px;
width: 15px;
height: 16px;
width: 16px;
margin-right: $spacing-8;
vertical-align: middle;
}
5 changes: 3 additions & 2 deletions res/css/components/views/location/_ShareDialogButtons.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Please see LICENSE files in the repository root for full details.
}

.mx_ShareDialogButtons_button-icon {
height: 10px;
margin-top: 3px;
width: 20px;
height: 20px;
margin: 2px;
}
2 changes: 1 addition & 1 deletion res/css/components/views/polls/_PollOption.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Please see LICENSE files in the repository root for full details.
border-width: 2px;
border-color: var(--cpd-color-icon-accent-tertiary);
background-color: var(--cpd-color-icon-accent-tertiary);
background-image: url("$(res)/img/element-icons/check-white.svg");
background-image: url("@vector-im/compound-design-tokens/icons/check.svg");
background-size: 12px;
background-repeat: no-repeat;
background-position: center;
Expand Down
4 changes: 2 additions & 2 deletions res/css/structures/_GenericDropdownMenu.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Please see LICENSE files in the repository root for full details.
width: 18px;
height: 18px;
background: currentColor;
mask-image: url("$(res)/img/feather-customised/chevron-down.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/chevron-down.svg");
mask-size: 100%;
mask-repeat: no-repeat;
float: right;
Expand Down Expand Up @@ -103,7 +103,7 @@ Please see LICENSE files in the repository root for full details.
height: 12px;
margin-left: -20px;
margin-right: 8px;
mask-image: url("$(res)/img/feather-customised/check.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
mask-size: 100%;
mask-repeat: no-repeat;
background-color: $primary-content;
Expand Down
4 changes: 2 additions & 2 deletions res/css/structures/_RightPanel.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Please see LICENSE files in the repository root for full details.
/** Fixme - factor this out with the main header **/

.mx_RightPanel_threadsButton::before {
mask-image: url("$(res)/img/element-icons/room/thread.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/threads-solid.svg");
}

.mx_RightPanel_notifsButton::before {
Expand All @@ -36,7 +36,7 @@ Please see LICENSE files in the repository root for full details.
}

.mx_RightPanel_roomSummaryButton::before {
mask-image: url("$(res)/img/element-icons/room/room-summary.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/info-solid.svg");
mask-position: center;
}

Expand Down
3 changes: 2 additions & 1 deletion res/css/structures/_RoomSearch.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ Please see LICENSE files in the repository root for full details.
.mx_RoomSearch_icon {
width: 16px;
height: 16px;
mask: url("$(res)/img/element-icons/roomlist/search.svg");
mask: url("@vector-im/compound-design-tokens/icons/search.svg");
mask-repeat: no-repeat;
background-color: $secondary-content;
margin-left: 7px;
margin-bottom: 2px;
flex-shrink: 0;
mask-size: 20px;
}

.mx_RoomSearch_spotlightTriggerText {
Expand Down
4 changes: 2 additions & 2 deletions res/css/structures/_RoomStatusBar.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ Please see LICENSE files in the repository root for full details.
}

&.mx_RoomStatusBar_unsentCancelAllBtn::before {
mask-image: url("$(res)/img/element-icons/trashcan.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/delete.svg");
}

&.mx_RoomStatusBar_unsentRetry {
padding-left: 34px; /* 28px from above, but +6px to account for the wider icon */

&::before {
mask-image: url("$(res)/img/element-icons/retry.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/restart.svg");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion res/css/structures/_RoomView.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Please see LICENSE files in the repository root for full details.

&::before {
background-color: $info-plinth-fg-color;
mask: url("$(res)/img/feather-customised/search-input.svg");
mask: url("@vector-im/compound-design-tokens/icons/search.svg");
mask-repeat: no-repeat;
mask-position: center;
mask-size: 50px;
Expand Down
4 changes: 2 additions & 2 deletions res/css/structures/_SpaceHierarchy.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Please see LICENSE files in the repository root for full details.
background-color: $tertiary-content;
mask-size: 16px;
transform: rotate(270deg);
mask-image: url("$(res)/img/feather-customised/chevron-down.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/chevron-down.svg");
}

&.mx_SpaceHierarchy_subspace_toggle_shown::before {
Expand Down Expand Up @@ -211,7 +211,7 @@ Please see LICENSE files in the repository root for full details.
mask-size: contain;
mask-repeat: no-repeat;
background-color: $accent;
mask-image: url("$(res)/img/element-icons/roomlist/checkmark.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
}
}
}
Expand Down
24 changes: 12 additions & 12 deletions res/css/structures/_SpacePanel.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Please see LICENSE files in the repository root for full details.
mask-size: contain;
mask-repeat: no-repeat;
background-color: $background;
mask-image: url("$(res)/img/feather-customised/chevron-down.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/chevron-down.svg");
transform: rotate(270deg);
}

Expand Down Expand Up @@ -169,7 +169,7 @@ Please see LICENSE files in the repository root for full details.
mask-size: 20px;
mask-repeat: no-repeat;
background-color: $tertiary-content;
mask-image: url("$(res)/img/feather-customised/chevron-down.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/chevron-down.svg");
}

.mx_SpaceButton_icon {
Expand Down Expand Up @@ -207,15 +207,15 @@ Please see LICENSE files in the repository root for full details.
}

&.mx_SpaceButton_home .mx_SpaceButton_icon::before {
mask-image: url("$(res)/img/element-icons/home.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/home-solid.svg");
}

&.mx_SpaceButton_favourites .mx_SpaceButton_icon::before {
mask-image: url("$(res)/img/element-icons/roomlist/favorite.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/favourite-solid.svg");
}

&.mx_SpaceButton_people .mx_SpaceButton_icon::before {
mask-image: url("$(res)/img/element-icons/room/members.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/user-profile-solid.svg");
}

&.mx_SpaceButton_orphans .mx_SpaceButton_icon::before {
Expand All @@ -229,7 +229,7 @@ Please see LICENSE files in the repository root for full details.
&.mx_SpaceButton_new .mx_SpaceButton_icon {
&::before {
background-color: $primary-content;
mask-image: url("$(res)/img/element-icons/plus.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/plus.svg");
transition: all 0.2s ease-in-out; /* TODO transition */
}
}
Expand Down Expand Up @@ -258,7 +258,7 @@ Please see LICENSE files in the repository root for full details.
mask-position: center;
mask-size: contain;
mask-repeat: no-repeat;
mask-image: url("$(res)/img/element-icons/context-menu.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/overflow-horizontal.svg");
background: $primary-content;
}
}
Expand Down Expand Up @@ -414,27 +414,27 @@ Please see LICENSE files in the repository root for full details.
}

.mx_SpacePanel_iconHome::before {
mask-image: url("$(res)/img/element-icons/home.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/home-solid.svg");
}

.mx_SpacePanel_iconInvite::before {
mask-image: url("$(res)/img/element-icons/room/invite.svg");
}

.mx_SpacePanel_iconSettings::before {
mask-image: url("$(res)/img/element-icons/settings.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/settings-solid.svg");
}

.mx_SpacePanel_iconLeave::before {
mask-image: url("$(res)/img/element-icons/leave.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/leave.svg");
}

.mx_SpacePanel_iconMembers::before {
mask-image: url("$(res)/img/element-icons/room/members.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/user-profile-solid.svg");
}

.mx_SpacePanel_iconPlus::before {
mask-image: url("$(res)/img/element-icons/plus.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/plus.svg");
}

.mx_SpacePanel_iconExplore::before {
Expand Down
4 changes: 2 additions & 2 deletions res/css/structures/_SpaceRoomView.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ Please see LICENSE files in the repository root for full details.
width: 24px;
background: $tertiary-content;
mask-size: contain;
mask-image: url("$(res)/img/element-icons/settings.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/settings-solid.svg");
}
}
}
Expand All @@ -247,7 +247,7 @@ Please see LICENSE files in the repository root for full details.
}

.mx_SpaceRoomView_privateScope_justMeButton::before {
mask-image: url("$(res)/img/element-icons/room/members.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/user-profile-solid.svg");
}

.mx_SpaceRoomView_privateScope_meAndMyTeammatesButton::before {
Expand Down
8 changes: 4 additions & 4 deletions res/css/structures/_UserMenu.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ Please see LICENSE files in the repository root for full details.
}

.mx_UserMenu_iconHome::before {
mask-image: url("$(res)/img/element-icons/home.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/home-solid.svg");
}

.mx_UserMenu_iconDnd::before {
Expand All @@ -185,19 +185,19 @@ Please see LICENSE files in the repository root for full details.
}

.mx_UserMenu_iconLock::before {
mask-image: url("$(res)/img/element-icons/security.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/lock-solid.svg");
}

.mx_UserMenu_iconSettings::before {
mask-image: url("$(res)/img/element-icons/settings.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/settings-solid.svg");
}

.mx_UserMenu_iconMessage::before {
mask-image: url("$(res)/img/element-icons/feedback.svg");
}

.mx_UserMenu_iconSignOut::before {
mask-image: url("$(res)/img/element-icons/leave.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/lock-solid.svg");
}

.mx_UserMenu_iconQr::before {
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/context_menus/_IconizedContextMenu.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Please see LICENSE files in the repository root for full details.
}

.mx_IconizedContextMenu_checked::before {
mask-image: url("$(res)/img/element-icons/roomlist/checkmark.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
}

.mx_IconizedContextMenu_unchecked::before {
Expand Down
22 changes: 10 additions & 12 deletions res/css/views/context_menus/_MessageContextMenu.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ Please see LICENSE files in the repository root for full details.
}

.mx_MessageContextMenu_iconCollapse::before {
mask-image: url("$(res)/img/element-icons/message/chevron-up.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/chevron-up.svg");
}

.mx_MessageContextMenu_iconReport::before {
mask-image: url("$(res)/img/element-icons/warning-badge.svg");
}

.mx_MessageContextMenu_iconLink::before {
mask-image: url("$(res)/img/element-icons/link.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/link.svg");
}

.mx_MessageContextMenu_iconPermalink::before {
Expand All @@ -49,19 +49,19 @@ Please see LICENSE files in the repository root for full details.
}

.mx_MessageContextMenu_iconEndPoll::before {
mask-image: url("$(res)/img/element-icons/check-white.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
}

.mx_MessageContextMenu_iconForward::before {
mask-image: url("$(res)/img/element-icons/message/fwd.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/forward.svg");
}

.mx_MessageContextMenu_iconRedact::before {
mask-image: url("$(res)/img/element-icons/trashcan.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/delete.svg");
}

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

.mx_MessageContextMenu_iconSource::before {
Expand All @@ -81,24 +81,22 @@ Please see LICENSE files in the repository root for full details.
}

.mx_MessageContextMenu_iconCopy::before {
height: 12px;
left: 2px;
height: 16px;
mask-image: url($copy-button-url);
position: relative;
width: 12px;
top: 3px;
width: 16px;
}

.mx_MessageContextMenu_iconEdit::before {
mask-image: url("$(res)/img/element-icons/room/message-bar/edit.svg");
}

.mx_MessageContextMenu_iconReply::before {
mask-image: url("$(res)/img/element-icons/room/message-bar/reply.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/reply.svg");
}

.mx_MessageContextMenu_iconReplyInThread::before {
mask-image: url("$(res)/img/element-icons/message/thread.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/threads.svg");
}

.mx_MessageContextMenu_iconReact::before {
Expand Down
Loading
Loading