From 2c186aafaee56a50cd16be55e30806d675c433ac Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 16 Jun 2017 11:36:24 +0100 Subject: [PATCH] Fix h2 in markdown being weird Date separator style was just define don any h2 in the message list, so got picked up by any h2s in markdown too. Give date separators their own class. Fixes https://github.com/vector-im/riot-web/issues/4328 --- .../views/messages/DateSeparator.js | 2 +- src/skins/vector/css/_components.scss | 1 + .../structures/_RoomView.scss | 9 ------- .../views/messages/_DateSeparator.scss | 25 +++++++++++++++++++ 4 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 src/skins/vector/css/vector-web/views/messages/_DateSeparator.scss diff --git a/src/components/views/messages/DateSeparator.js b/src/components/views/messages/DateSeparator.js index 3f75c3e74..84d63dd5f 100644 --- a/src/components/views/messages/DateSeparator.js +++ b/src/components/views/messages/DateSeparator.js @@ -53,7 +53,7 @@ module.exports = React.createClass({ } return ( -

{ label }

+

{ label }

); } }); diff --git a/src/skins/vector/css/_components.scss b/src/skins/vector/css/_components.scss index 4c4d7cc2a..aef7f6db7 100644 --- a/src/skins/vector/css/_components.scss +++ b/src/skins/vector/css/_components.scss @@ -77,6 +77,7 @@ @import "./vector-web/views/elements/_ImageView.scss"; @import "./vector-web/views/elements/_Spinner.scss"; @import "./vector-web/views/globals/_MatrixToolbar.scss"; +@import "./vector-web/views/messages/_DateSeparator.scss"; @import "./vector-web/views/messages/_MessageTimestamp.scss"; @import "./vector-web/views/messages/_SenderProfile.scss"; @import "./vector-web/views/rooms/_RoomDropTarget.scss"; diff --git a/src/skins/vector/css/matrix-react-sdk/structures/_RoomView.scss b/src/skins/vector/css/matrix-react-sdk/structures/_RoomView.scss index 6fd44d26f..ae7735de8 100644 --- a/src/skins/vector/css/matrix-react-sdk/structures/_RoomView.scss +++ b/src/skins/vector/css/matrix-react-sdk/structures/_RoomView.scss @@ -127,15 +127,6 @@ limitations under the License. clear: both; } -.mx_RoomView_MessageList h2 { - clear: both; - margin-top: 32px; - margin-bottom: 8px; - margin-left: 63px; - padding-bottom: 6px; - border-bottom: 1px solid $primary-hairline-color; -} - .mx_RoomView_invitePrompt { order: 2; diff --git a/src/skins/vector/css/vector-web/views/messages/_DateSeparator.scss b/src/skins/vector/css/vector-web/views/messages/_DateSeparator.scss new file mode 100644 index 000000000..f676d24be --- /dev/null +++ b/src/skins/vector/css/vector-web/views/messages/_DateSeparator.scss @@ -0,0 +1,25 @@ +/* +Copyright 2017 Vector Creations 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_DateSeparator { + clear: both; + margin-top: 32px; + margin-bottom: 8px; + margin-left: 63px; + padding-bottom: 6px; + border-bottom: 1px solid $primary-hairline-color; +} +