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

Commit 66daaf0

Browse files
authored
Force style rules of buttons on MessageActionBar used with maskButton selector (#8780)
* Include mx_MessageActionBar_maskButton::after in mx_MessageActionBar_maskButton Signed-off-by: Suguru Hirahara <[email protected]> * Include mx_MessageActionBar_maskButton:hover::after in mx_MessageActionBar_maskButton Signed-off-by: Suguru Hirahara <[email protected]> * Ensure buttons on message action bar used only with mx_MessageActionBar_maskButton as expected Signed-off-by: Suguru Hirahara <[email protected]> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <[email protected]> * Include mx_Indicator in mx_MessageActionBar_threadButton Signed-off-by: Suguru Hirahara <[email protected]> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <[email protected]> * Include mx_MessageActionBar_downloadButton.mx_MessageActionBar_downloadSpinnerButton in mx_MessageActionBar_downloadButton Signed-off-by: Suguru Hirahara <[email protected]> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <[email protected]>
1 parent 8362174 commit 66daaf0

File tree

1 file changed

+65
-61
lines changed

1 file changed

+65
-61
lines changed

res/css/views/messages/_MessageActionBar.scss

Lines changed: 65 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -75,81 +75,85 @@ limitations under the License.
7575
cursor: not-allowed;
7676
opacity: .75;
7777
}
78-
}
7978

80-
.mx_MessageActionBar_maskButton::after {
81-
content: '';
82-
position: absolute;
83-
top: 0;
84-
left: 0;
85-
height: 100%;
86-
width: 100%;
87-
mask-size: 18px;
88-
mask-repeat: no-repeat;
89-
mask-position: center;
90-
background-color: $secondary-content;
91-
}
79+
&::after {
80+
content: '';
81+
position: absolute;
82+
top: 0;
83+
left: 0;
84+
height: 100%;
85+
width: 100%;
86+
mask-size: 18px;
87+
mask-repeat: no-repeat;
88+
mask-position: center;
89+
background-color: $secondary-content;
90+
}
9291

93-
.mx_MessageActionBar_maskButton:hover::after {
94-
background-color: $primary-content;
95-
}
92+
&:hover::after {
93+
background-color: $primary-content;
94+
}
9695

97-
.mx_MessageActionBar_reactButton::after {
98-
mask-image: url('$(res)/img/element-icons/room/message-bar/emoji.svg');
99-
}
96+
&.mx_MessageActionBar_reactButton::after {
97+
mask-image: url('$(res)/img/element-icons/room/message-bar/emoji.svg');
98+
}
10099

101-
.mx_MessageActionBar_replyButton::after {
102-
mask-image: url('$(res)/img/element-icons/room/message-bar/reply.svg');
103-
}
100+
&.mx_MessageActionBar_replyButton::after {
101+
mask-image: url('$(res)/img/element-icons/room/message-bar/reply.svg');
102+
}
104103

105-
.mx_MessageActionBar_threadButton::after {
106-
mask-image: url('$(res)/img/element-icons/message/thread.svg');
107-
}
104+
&.mx_MessageActionBar_threadButton {
105+
&::after {
106+
mask-image: url('$(res)/img/element-icons/message/thread.svg');
107+
}
108108

109-
.mx_MessageActionBar_threadButton .mx_Indicator {
110-
background: $links;
111-
animation-iteration-count: infinite;
112-
}
109+
.mx_Indicator {
110+
background: $links;
111+
animation-iteration-count: infinite;
112+
}
113+
}
113114

114-
.mx_MessageActionBar_editButton::after {
115-
mask-image: url('$(res)/img/element-icons/room/message-bar/edit.svg');
116-
}
115+
&.mx_MessageActionBar_editButton::after {
116+
mask-image: url('$(res)/img/element-icons/room/message-bar/edit.svg');
117+
}
117118

118-
.mx_MessageActionBar_optionsButton::after {
119-
mask-image: url('$(res)/img/element-icons/context-menu.svg');
120-
}
119+
&.mx_MessageActionBar_optionsButton::after {
120+
mask-image: url('$(res)/img/element-icons/context-menu.svg');
121+
}
121122

122-
.mx_MessageActionBar_resendButton::after {
123-
mask-image: url('$(res)/img/element-icons/retry.svg');
124-
}
123+
&.mx_MessageActionBar_resendButton::after {
124+
mask-image: url('$(res)/img/element-icons/retry.svg');
125+
}
125126

126-
.mx_MessageActionBar_cancelButton::after {
127-
mask-image: url('$(res)/img/element-icons/trashcan.svg');
128-
}
127+
&.mx_MessageActionBar_cancelButton::after {
128+
mask-image: url('$(res)/img/element-icons/trashcan.svg');
129+
}
129130

130-
.mx_MessageActionBar_downloadButton::after {
131-
mask-size: 14px;
132-
mask-image: url('$(res)/img/download.svg');
133-
}
131+
&.mx_MessageActionBar_downloadButton {
132+
&::after {
133+
mask-size: 14px;
134+
mask-image: url('$(res)/img/download.svg');
134135

135-
.mx_MessageActionBar_expandMessageButton::after {
136-
mask-size: 12px;
137-
mask-image: url('$(res)/img/element-icons/expand-message.svg');
138-
}
136+
&.mx_MessageActionBar_downloadSpinnerButton::after {
137+
background-color: transparent; // hide the download icon mask
138+
}
139+
}
140+
}
139141

140-
.mx_MessageActionBar_collapseMessageButton::after {
141-
mask-size: 12px;
142-
mask-image: url('$(res)/img/element-icons/collapse-message.svg');
143-
}
142+
&.mx_MessageActionBar_expandMessageButton::after {
143+
mask-size: 12px;
144+
mask-image: url('$(res)/img/element-icons/expand-message.svg');
145+
}
144146

145-
.mx_MessageActionBar_viewInRoom::after {
146-
mask-image: url('$(res)/img/element-icons/view-in-room.svg');
147-
}
147+
&.mx_MessageActionBar_collapseMessageButton::after {
148+
mask-size: 12px;
149+
mask-image: url('$(res)/img/element-icons/collapse-message.svg');
150+
}
148151

149-
.mx_MessageActionBar_copyLinkToThread::after {
150-
mask-image: url('$(res)/img/element-icons/link.svg');
151-
}
152+
&.mx_MessageActionBar_viewInRoom::after {
153+
mask-image: url('$(res)/img/element-icons/view-in-room.svg');
154+
}
152155

153-
.mx_MessageActionBar_downloadButton.mx_MessageActionBar_downloadSpinnerButton::after {
154-
background-color: transparent; // hide the download icon mask
156+
&.mx_MessageActionBar_copyLinkToThread::after {
157+
mask-image: url('$(res)/img/element-icons/link.svg');
158+
}
155159
}

0 commit comments

Comments
 (0)