Skip to content

Commit 00b7cc5

Browse files
committed
Split MImageBody into MImageBody,MFileBody to match react-sdk
and having the classnames match their components. Signed-off-by: Michael Telatynski <[email protected]>
1 parent b0a3bd6 commit 00b7cc5

File tree

3 files changed

+47
-31
lines changed

3 files changed

+47
-31
lines changed

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: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
}
25+
26+
.mx_MFileBody_download object {
27+
margin-left: -16px;
28+
padding-right: 4px;
29+
margin-top: -4px;
30+
vertical-align: middle;
31+
pointer-events: none;
32+
}
33+
34+
/* Remove the border and padding for iframes for download links. */
35+
.mx_MFileBody_download iframe {
36+
margin: 0px;
37+
padding: 0px;
38+
border: none;
39+
width: 100%;
40+
/* Set the height of the iframe to be 1 line of text.
41+
* Iframes don't automatically size themselves to fit their content.
42+
* So either we have to fix the height of the iframe using CSS or
43+
* use javascript's cross-origin postMessage API to communicate how
44+
* big the content of the iframe is. */
45+
height: 1.5em;
46+
}

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)