Skip to content

Commit ffac300

Browse files
committed
rejig css:
* sans-serif font * use display: table for the message list so that everything lines up nicely * switch to flexbox layout rather than position absolutes to avoid assuming a full screen UI and improve maintainability (and better match atomify) * neutralise the colouring and styling of highlighted rooms in the recents list * switch from ul + li's to a series of divs in some places where the li's are achieving nothing but adding more complexity to the DOM * add mx_MessageTileType as a generic css base class for all message tiles
1 parent aaa38d9 commit ffac300

15 files changed

Lines changed: 134 additions & 83 deletions

File tree

‎skins/base/css/atoms/MessageTimestamp.css‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ limitations under the License.
1515
*/
1616

1717
.mx_MessageTimestamp {
18-
width: 75px;
19-
display: inline-block;
18+
display: table-cell;
19+
white-space: pre;
2020
}

‎skins/base/css/common.css‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
body {
18+
font-family: Helvetica, Arial, Sans-Serif;
19+
}
20+
1721
div.error {
1822
color: red;
1923
}

‎skins/base/css/molecules/MessageComposer.css‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
.mx_MessageComposer {
18-
}
19-
2017
.mx_MessageComposer textarea {
21-
position: absolute;
2218
width: 100%;
23-
margin-left: auto;
24-
margin-right: auto;
25-
padding: 0px;
19+
margin: auto;
2620
}

‎skins/base/css/molecules/MessageTile.css‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ limitations under the License.
1515
*/
1616

1717
.mx_MessageTile {
18+
display: table-row;
19+
}
20+
21+
.mx_MessageTile .mx_MessageTileType {
22+
display: table-cell;
1823
}
1924

2025
.mx_MessageTile.sending {

‎skins/base/css/molecules/RoomTile.css‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@ limitations under the License.
2323
}
2424

2525
.mx_RoomTile.selected {
26-
border: 2px inset #eee;
26+
text-decoration: underline;
2727
}
2828

2929
.mx_RoomTile_name {
30-
font-size: 80%;
31-
font-weight: bold;
3230
}
3331

3432
.mx_RoomTile div {
@@ -37,11 +35,11 @@ limitations under the License.
3735
}
3836

3937
.mx_RoomTile.unread {
40-
background-color: #66e;
38+
font-weight: bold;
4139
}
4240

4341
.mx_RoomTile.invited {
44-
background-color: #6e6;
42+
font-weight: bold;
4543
}
4644

4745
.mx_RoomTile:hover {

‎skins/base/css/molecules/SenderProfile.css‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ limitations under the License.
1515
*/
1616

1717
.mx_SenderProfile {
18-
display: inline-block;
19-
width: 150px;
18+
display: table-cell;
19+
padding: 0px 1em 0em 1em;
2020
}

‎skins/base/css/organisms/RoomList.css‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,3 @@ limitations under the License.
1616

1717
.mx_RoomList {
1818
}
19-
20-
.mx_RoomList ul {
21-
padding: 0px;
22-
margin: 0px;
23-
}
24-
25-
.mx_RoomList ul li {
26-
list-style-type: none;
27-
}

‎skins/base/css/organisms/RoomView.css‎

Lines changed: 45 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,52 +16,67 @@ limitations under the License.
1616

1717
.mx_RoomView {
1818
word-wrap: break-word;
19+
position: relative;
1920
}
2021

21-
.mx_RoomView .mx_RoomHeader {
22-
position: absolute;
23-
top: 0px;
24-
width: 100%;
22+
.mx_RoomHeader {
2523
height: 30px;
2624
}
2725

28-
.mx_RoomView .mx_RoomView_MessageList {
29-
padding: 0px;
30-
margin: 0px;
26+
.mx_RoomView_roomWrapper {
27+
display: -webkit-box;
28+
display: -moz-box;
29+
display: -ms-flexbox;
30+
display: -webkit-flex;
31+
display: flex;
3132
position: absolute;
32-
top: 35px;
33-
bottom: 40px;
34-
left: 0px;
35-
right: 150px;
36-
overflow-y: scroll;
33+
width: 100%;
34+
top: 32px;
35+
bottom: 0px;
3736
}
3837

39-
.mx_RoomView ul li {
40-
list-style-type: none;
38+
.mx_RoomView_messagePanel {
39+
-webkit-box-ordinal-group: 1;
40+
-moz-box-ordinal-group: 1;
41+
-ms-flex-order: 1;
42+
-webkit-order: 1;
43+
order: 1;
44+
width: 100%;
45+
height: 100%;
46+
/* background-color: #ff0; */
4147
}
4248

43-
.mx_RoomView .mx_RoomView_invitePrompt {
49+
.mx_RoomView_messageListWrapper {
50+
height: 100%;
51+
overflow-y: scroll;
4452
}
4553

46-
.mx_RoomView .mx_MemberList {
47-
position: absolute;
48-
top: 35px;
49-
bottom: 40px;
50-
right: 0px;
51-
width: 150px;
52-
margin: 0px;
53-
padding: 0px;
54+
.mx_RoomView_MessageList {
55+
display: table;
56+
}
57+
58+
.mx_RoomView_invitePrompt {
5459
}
5560

56-
.mx_RoomView .mx_MemberList ul {
61+
.mx_MemberList {
62+
-webkit-box-ordinal-group: 2;
63+
-moz-box-ordinal-group: 2;
64+
-ms-flex-order: 2;
65+
-webkit-order: 2;
66+
order: 2;
67+
68+
/* background-color: #0f0; */
69+
width: 250px;
70+
overflow-y: scroll;
71+
height: 100%;
72+
}
73+
74+
.mx_MemberList ul {
5775
margin: 0px;
5876
padding: 0px;
5977
}
6078

61-
.mx_RoomView .mx_MessageComposer {
62-
position: absolute;
63-
bottom: 5px;
64-
right: 0px;
65-
left: 0px;
66-
height: 36px;
79+
.mx_MessageComposer {
80+
width: 100%;
81+
bottom: 0px;
6782
}

‎skins/base/css/pages/MatrixChat.css‎

Lines changed: 52 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,69 @@ limitations under the License.
2020
height: 100%;
2121
}
2222

23-
.mx_MatrixChat_leftPanel {
23+
.mx_MatrixChat_chatWrapper {
24+
display: -webkit-box;
25+
display: -moz-box;
26+
display: -ms-flexbox;
27+
display: -webkit-flex;
28+
display: flex;
2429
position: absolute;
25-
left: 0px;
30+
width: 100%;
31+
top: 0px;
32+
bottom: 42px;
33+
}
34+
35+
.mx_MatrixChat_leftPanel {
36+
-webkit-box-ordinal-group: 1;
37+
-moz-box-ordinal-group: 1;
38+
-ms-flex-order: 1;
39+
-webkit-order: 1;
40+
order: 1;
41+
42+
display: -webkit-box;
43+
display: -moz-box;
44+
display: -ms-flexbox;
45+
display: -webkit-flex;
46+
display: flex;
47+
flex-direction: column;
48+
49+
/* background-color: #f00; */
2650
width: 250px;
2751
height: 100%;
2852
}
2953

3054
.mx_MatrixChat_leftPanel .mx_MatrixToolbar {
31-
position: absolute;
32-
height: 20px;
55+
-webkit-box-ordinal-group: 1;
56+
-moz-box-ordinal-group: 1;
57+
-ms-flex-order: 1;
58+
-webkit-order: 1;
59+
order: 1;
60+
61+
width: 100%;
62+
height: 40px;
3363
}
3464

3565
.mx_MatrixChat_leftPanel .mx_RoomList {
36-
position: absolute;
37-
top: 20px;
38-
bottom: 0px;
39-
width: 250px;
66+
-webkit-box-ordinal-group: 2;
67+
-moz-box-ordinal-group: 2;
68+
-ms-flex-order: 2;
69+
-webkit-order: 2;
70+
order: 2;
71+
72+
/* background-color: #0ff; */
73+
width: 100%;
74+
height: 100%;
4075
overflow-y: scroll;
4176
}
4277

4378
.mx_MatrixChat .mx_RoomView {
44-
position: absolute;
45-
left: 255px;
46-
right: 0px;
47-
height: 100%;
79+
-webkit-box-ordinal-group: 2;
80+
-moz-box-ordinal-group: 2;
81+
-ms-flex-order: 2;
82+
-webkit-order: 2;
83+
order: 2;
84+
85+
/* background-color: #00f; */
86+
width: 100%;
87+
height: 100%;
4888
}

‎skins/base/views/molecules/MEmoteTile.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module.exports = React.createClass({
2929
var content = mxEvent.getContent();
3030
var name = mxEvent.sender ? mxEvent.sender.name : mxEvent.getSender();
3131
return (
32-
<span className="mx_MEmoteTile">
32+
<span className="mx_MEmoteTile mx_MessageTileType">
3333
{name} {content.body}
3434
</span>
3535
);

0 commit comments

Comments
 (0)