From 00b7cc512b3a9f0e0a36e4ea7d1f4a6c3011ff66 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 5 Feb 2018 13:25:09 +0000 Subject: [PATCH] Split MImageBody into MImageBody,MFileBody to match react-sdk and having the classnames match their components. Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/skins/vector/css/_components.scss | 1 + .../views/messages/_MFileBody.scss | 46 +++++++++++++++++++ .../views/messages/_MImageBody.scss | 31 ------------- 3 files changed, 47 insertions(+), 31 deletions(-) create mode 100644 src/skins/vector/css/matrix-react-sdk/views/messages/_MFileBody.scss diff --git a/src/skins/vector/css/_components.scss b/src/skins/vector/css/_components.scss index 2319ebee84..faf358bd94 100644 --- a/src/skins/vector/css/_components.scss +++ b/src/skins/vector/css/_components.scss @@ -46,6 +46,7 @@ @import "./matrix-react-sdk/views/login/_InteractiveAuthEntryComponents.scss"; @import "./matrix-react-sdk/views/login/_ServerConfig.scss"; @import "./matrix-react-sdk/views/messages/_MEmoteBody.scss"; +@import "./matrix-react-sdk/views/messages/_MFileBody.scss"; @import "./matrix-react-sdk/views/messages/_MImageBody.scss"; @import "./matrix-react-sdk/views/messages/_MNoticeBody.scss"; @import "./matrix-react-sdk/views/messages/_MTextBody.scss"; diff --git a/src/skins/vector/css/matrix-react-sdk/views/messages/_MFileBody.scss b/src/skins/vector/css/matrix-react-sdk/views/messages/_MFileBody.scss new file mode 100644 index 0000000000..77c6241bcb --- /dev/null +++ b/src/skins/vector/css/matrix-react-sdk/views/messages/_MFileBody.scss @@ -0,0 +1,46 @@ +/* +Copyright 2015, 2016 OpenMarket Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +.mx_MFileBody_download { + color: $accent-color; +} + +.mx_MFileBody_download a { + color: $accent-color; + text-decoration: none; +} + +.mx_MFileBody_download object { + margin-left: -16px; + padding-right: 4px; + margin-top: -4px; + vertical-align: middle; + pointer-events: none; +} + +/* Remove the border and padding for iframes for download links. */ +.mx_MFileBody_download iframe { + margin: 0px; + padding: 0px; + border: none; + width: 100%; + /* Set the height of the iframe to be 1 line of text. + * Iframes don't automatically size themselves to fit their content. + * So either we have to fix the height of the iframe using CSS or + * use javascript's cross-origin postMessage API to communicate how + * big the content of the iframe is. */ + height: 1.5em; +} diff --git a/src/skins/vector/css/matrix-react-sdk/views/messages/_MImageBody.scss b/src/skins/vector/css/matrix-react-sdk/views/messages/_MImageBody.scss index 83ae06160d..1702aac8ad 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/messages/_MImageBody.scss +++ b/src/skins/vector/css/matrix-react-sdk/views/messages/_MImageBody.scss @@ -27,34 +27,3 @@ limitations under the License. border-radius: 1px; */ } - -.mx_MImageBody_download { - color: $accent-color; -} - -.mx_MImageBody_download a { - color: $accent-color; - text-decoration: none; -} - -.mx_MImageBody_download object { - margin-left: -16px; - padding-right: 4px; - margin-top: -4px; - vertical-align: middle; - pointer-events: none; -} - -/* Remove the border and padding for iframes for download links. */ -.mx_MImageBody_download iframe { - margin: 0px; - padding: 0px; - border: none; - width: 100%; - /* Set the height of the iframe to be 1 line of text. - * Iframes don't automatically size themselves to fit their content. - * So either we have to fix the height of the iframe using CSS or - * use javascript's cross-origin postMessage API to communicate how - * big the content of the iframe is. */ - height: 1.5em; -}