Skip to content

Commit 2c186aa

Browse files
committed
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 element-hq#4328
1 parent 584e4c0 commit 2c186aa

4 files changed

Lines changed: 27 additions & 10 deletions

File tree

‎src/components/views/messages/DateSeparator.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ module.exports = React.createClass({
5353
}
5454

5555
return (
56-
<h2>{ label }</h2>
56+
<h2 className="mx_DateSeparator">{ label }</h2>
5757
);
5858
}
5959
});

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
@import "./vector-web/views/elements/_ImageView.scss";
7878
@import "./vector-web/views/elements/_Spinner.scss";
7979
@import "./vector-web/views/globals/_MatrixToolbar.scss";
80+
@import "./vector-web/views/messages/_DateSeparator.scss";
8081
@import "./vector-web/views/messages/_MessageTimestamp.scss";
8182
@import "./vector-web/views/messages/_SenderProfile.scss";
8283
@import "./vector-web/views/rooms/_RoomDropTarget.scss";

‎src/skins/vector/css/matrix-react-sdk/structures/_RoomView.scss‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,6 @@ limitations under the License.
127127
clear: both;
128128
}
129129

130-
.mx_RoomView_MessageList h2 {
131-
clear: both;
132-
margin-top: 32px;
133-
margin-bottom: 8px;
134-
margin-left: 63px;
135-
padding-bottom: 6px;
136-
border-bottom: 1px solid $primary-hairline-color;
137-
}
138-
139130
.mx_RoomView_invitePrompt {
140131
order: 2;
141132

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
Copyright 2017 Vector Creations 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_DateSeparator {
18+
clear: both;
19+
margin-top: 32px;
20+
margin-bottom: 8px;
21+
margin-left: 63px;
22+
padding-bottom: 6px;
23+
border-bottom: 1px solid $primary-hairline-color;
24+
}
25+

0 commit comments

Comments
 (0)