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

Introduce new copy icon #8942

Merged
merged 3 commits into from
Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
13 changes: 12 additions & 1 deletion res/css/components/views/beacon/_ShareLatestLocation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,20 @@ limitations under the License.
color: $secondary-content;
}

.mx_ShareLatestLocation_copy {
// double class to be more specific than the general mx_CopyableText CSS rule
.mx_CopyableText.mx_ShareLatestLocation_copy {
// override copyable text style to make compact
.mx_CopyableText_copyButton {
height: 13px;
margin-left: $spacing-8 !important;
position: relative;
top: -1px;
width: 13px;

&::before {
background-color: $secondary-content;
height: 13px;
width: 13px;
}
}
}
14 changes: 9 additions & 5 deletions res/css/views/elements/_CopyableText.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.
*/

.mx_CopyableText {
align-items: center;
display: flex;
justify-content: space-between;
width: max-content;
Expand All @@ -31,19 +32,22 @@ limitations under the License.

.mx_CopyableText_copyButton {
flex-shrink: 0;
width: 20px;
height: 20px;
// using em here to adapt to the local font size
width: 1em;
height: 1em;
cursor: pointer;
margin-left: 20px;
display: block;

&::before {
content: "";

mask-image: url($copy-button-url);
mask-position: center center;
mask-repeat: no-repeat;
mask-size: contain;
background-color: $message-action-bar-fg-color;
width: 20px;
height: 20px;
width: 1em;
height: 1em;
display: block;
background-repeat: no-repeat;
}
Expand Down
3 changes: 3 additions & 0 deletions res/img/element-icons/copy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions res/img/feather-customised/clipboard.svg

This file was deleted.

2 changes: 1 addition & 1 deletion res/themes/legacy-light/css/_legacy-light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ $event-highlight-bg-color: $yellow-background;
// event timestamp
$event-timestamp-color: #acacac;

$copy-button-url: "$(res)/img/feather-customised/clipboard.svg";
$copy-button-url: "$(res)/img/element-icons/copy.svg";

// e2e
$e2e-verified-color: #76cfa5; // N.B. *NOT* the same as $accent
Expand Down
2 changes: 1 addition & 1 deletion res/themes/light/css/_light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ $focus-brightness: 105%;

// Icon URLs
// ********************
$copy-button-url: "$(res)/img/feather-customised/clipboard.svg";
$copy-button-url: "$(res)/img/element-icons/copy.svg";
// ********************

// Location sharing
Expand Down