Skip to content

Commit 680a019

Browse files
authored
Merge pull request element-hq#6067 from vector-im/t3chguy/fix_usercontent_pointer
Split MImageBody into MFileBody to match JS Classes.
2 parents 456aebe + 3abf145 commit 680a019

3 files changed

Lines changed: 48 additions & 31 deletions

File tree

‎src/skins/vector/css/_components.scss‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
@import "./matrix-react-sdk/views/login/_InteractiveAuthEntryComponents.scss";
4747
@import "./matrix-react-sdk/views/login/_ServerConfig.scss";
4848
@import "./matrix-react-sdk/views/messages/_MEmoteBody.scss";
49+
@import "./matrix-react-sdk/views/messages/_MFileBody.scss";
4950
@import "./matrix-react-sdk/views/messages/_MImageBody.scss";
5051
@import "./matrix-react-sdk/views/messages/_MNoticeBody.scss";
5152
@import "./matrix-react-sdk/views/messages/_MTextBody.scss";
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
Copyright 2015, 2016 OpenMarket Ltd
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
.mx_MFileBody_download {
18+
color: $accent-color;
19+
}
20+
21+
.mx_MFileBody_download a {
22+
color: $accent-color;
23+
text-decoration: none;
24+
cursor: pointer;
25+
}
26+
27+
.mx_MFileBody_download object {
28+
margin-left: -16px;
29+
padding-right: 4px;
30+
margin-top: -4px;
31+
vertical-align: middle;
32+
pointer-events: none;
33+
}
34+
35+
/* Remove the border and padding for iframes for download links. */
36+
.mx_MFileBody_download iframe {
37+
margin: 0px;
38+
padding: 0px;
39+
border: none;
40+
width: 100%;
41+
/* Set the height of the iframe to be 1 line of text.
42+
* Iframes don't automatically size themselves to fit their content.
43+
* So either we have to fix the height of the iframe using CSS or
44+
* use javascript's cross-origin postMessage API to communicate how
45+
* big the content of the iframe is. */
46+
height: 1.5em;
47+
}

‎src/skins/vector/css/matrix-react-sdk/views/messages/_MImageBody.scss‎

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -27,34 +27,3 @@ limitations under the License.
2727
border-radius: 1px;
2828
*/
2929
}
30-
31-
.mx_MImageBody_download {
32-
color: $accent-color;
33-
}
34-
35-
.mx_MImageBody_download a {
36-
color: $accent-color;
37-
text-decoration: none;
38-
}
39-
40-
.mx_MImageBody_download object {
41-
margin-left: -16px;
42-
padding-right: 4px;
43-
margin-top: -4px;
44-
vertical-align: middle;
45-
pointer-events: none;
46-
}
47-
48-
/* Remove the border and padding for iframes for download links. */
49-
.mx_MImageBody_download iframe {
50-
margin: 0px;
51-
padding: 0px;
52-
border: none;
53-
width: 100%;
54-
/* Set the height of the iframe to be 1 line of text.
55-
* Iframes don't automatically size themselves to fit their content.
56-
* So either we have to fix the height of the iframe using CSS or
57-
* use javascript's cross-origin postMessage API to communicate how
58-
* big the content of the iframe is. */
59-
height: 1.5em;
60-
}

0 commit comments

Comments
 (0)