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
This commit is contained in:
David Baker 2017-06-16 11:36:24 +01:00
parent 584e4c04da
commit 2c186aafae
4 changed files with 27 additions and 10 deletions

View File

@ -53,7 +53,7 @@ module.exports = React.createClass({
} }
return ( return (
<h2>{ label }</h2> <h2 className="mx_DateSeparator">{ label }</h2>
); );
} }
}); });

View File

@ -77,6 +77,7 @@
@import "./vector-web/views/elements/_ImageView.scss"; @import "./vector-web/views/elements/_ImageView.scss";
@import "./vector-web/views/elements/_Spinner.scss"; @import "./vector-web/views/elements/_Spinner.scss";
@import "./vector-web/views/globals/_MatrixToolbar.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/_MessageTimestamp.scss";
@import "./vector-web/views/messages/_SenderProfile.scss"; @import "./vector-web/views/messages/_SenderProfile.scss";
@import "./vector-web/views/rooms/_RoomDropTarget.scss"; @import "./vector-web/views/rooms/_RoomDropTarget.scss";

View File

@ -127,15 +127,6 @@ limitations under the License.
clear: both; 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 { .mx_RoomView_invitePrompt {
order: 2; order: 2;

View File

@ -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;
}