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

Commit

Permalink
Create a mixin of cancel button (#8526)
Browse files Browse the repository at this point in the history
  • Loading branch information
luixxiul authored May 7, 2022
1 parent 7e63202 commit e980c14
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 35 deletions.
13 changes: 10 additions & 3 deletions res/css/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -385,15 +385,22 @@ legend {
color: $alert;
}

.mx_Dialog_cancelButton {
@define-mixin customisedCancelButton {
mask: url('$(res)/img/feather-customised/cancel.svg');
mask-repeat: no-repeat;
mask-position: center;
mask-size: cover;
width: 14px;
height: 14px;
background-color: $dialog-close-fg-color;
cursor: pointer;
position: unset;
width: unset;
height: unset;
}

.mx_Dialog_cancelButton {
@mixin customisedCancelButton;
width: 14px;
height: 14px;
position: absolute;
top: 10px;
right: 0;
Expand Down
7 changes: 1 addition & 6 deletions res/css/structures/auth/_CompleteSecurity.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,9 @@ limitations under the License.
}

.mx_CompleteSecurity_skip {
mask: url('$(res)/img/feather-customised/cancel.svg');
mask-repeat: no-repeat;
mask-position: center;
mask-size: cover;
@mixin customisedCancelButton;
width: 18px;
height: 18px;
background-color: $dialog-close-fg-color;
cursor: pointer;
position: absolute;
right: 24px;
}
Expand Down
7 changes: 1 addition & 6 deletions res/css/views/dialogs/_CompoundDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,9 @@ limitations under the License.
}

.mx_CompoundDialog_cancelButton {
mask: url('$(res)/img/feather-customised/cancel.svg');
mask-repeat: no-repeat;
mask-position: center;
mask-size: cover;
@mixin customisedCancelButton;
width: 20px;
height: 20px;
background-color: $dialog-close-fg-color;
cursor: pointer;

// Align with middle of title, 34px from right edge
position: absolute;
Expand Down
4 changes: 1 addition & 3 deletions res/css/views/elements/_EditableItemList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ limitations under the License.
}

.mx_EditableItem_delete {
@mixin customisedCancelButton;
order: 3;
margin-right: 5px;
cursor: pointer;
vertical-align: middle;
width: 14px;
height: 14px;
mask-image: url('$(res)/img/feather-customised/cancel.svg');
mask-repeat: no-repeat;
background-color: $alert;
mask-size: 100%;
}
Expand Down
6 changes: 1 addition & 5 deletions res/css/views/right_panel/_VerificationPanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,10 @@ limitations under the License.

.mx_UserInfo {
.mx_EncryptionPanel_cancel {
mask: url('$(res)/img/feather-customised/cancel.svg');
mask-repeat: no-repeat;
mask-position: center;
mask-size: cover;
@mixin customisedCancelButton;
width: 14px;
height: 14px;
background-color: $settings-subsection-fg-color;
cursor: pointer;
position: absolute;
z-index: 100;
top: 14px;
Expand Down
7 changes: 1 addition & 6 deletions res/css/views/voip/_DialPadContextMenu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,10 @@ limitations under the License.
}

.mx_DialPadContextMenu_cancel {
@mixin customisedCancelButton;
float: right;
mask: url('$(res)/img/feather-customised/cancel.svg');
mask-repeat: no-repeat;
mask-position: center;
mask-size: cover;
width: 14px;
height: 14px;
background-color: $dialog-close-fg-color;
cursor: pointer;
}

.mx_DialPadContextMenu_header:focus-within {
Expand Down
7 changes: 1 addition & 6 deletions res/css/views/voip/_DialPadModal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,10 @@ limitations under the License.
}

.mx_DialPadModal_cancel {
@mixin customisedCancelButton;
float: right;
mask: url('$(res)/img/feather-customised/cancel.svg');
mask-repeat: no-repeat;
mask-position: center;
mask-size: cover;
width: 14px;
height: 14px;
background-color: $dialog-close-fg-color;
cursor: pointer;
margin-right: 16px;
}

Expand Down

0 comments on commit e980c14

Please sign in to comment.