From f6974407e30e358faa68e35eb6408125e60db1e9 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Fri, 3 Nov 2017 11:22:29 +0000 Subject: [PATCH 1/2] CSS for Your Communities scrollbar and also attempt to fix GroupTile flex weirdness. --- .../structures/_MyGroups.scss | 35 +++++++++++++++---- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/src/skins/vector/css/matrix-react-sdk/structures/_MyGroups.scss b/src/skins/vector/css/matrix-react-sdk/structures/_MyGroups.scss index ddcf46fb4..a9c7a5f03 100644 --- a/src/skins/vector/css/matrix-react-sdk/structures/_MyGroups.scss +++ b/src/skins/vector/css/matrix-react-sdk/structures/_MyGroups.scss @@ -18,6 +18,9 @@ limitations under the License. max-width: 960px; margin-left: auto; margin-right: auto; + + display: flex; + flex-direction: column; } .mx_MyGroups .mx_RoomHeader_simpleHeader { @@ -61,10 +64,21 @@ limitations under the License. /* Until the button is wired up */ .mx_MyGroups_joinBox { visibility: hidden; + height: 0px; + margin: 0px; } .mx_MyGroups_content { margin-left: 2px; + + flex: 1 0 0; + + display: flex; + flex-direction: column; +} + +.mx_MyGroups_content h3 { + margin-bottom: 10px; } .mx_MyGroups_placeholder { @@ -75,19 +89,22 @@ limitations under the License. text-align: center; } -.mx_MyGroups_joinedGroups { +.mx_MyGroups_joinedGroups .gm-scroll-view { + border-top: 1px solid $primary-hairline-color; + overflow-x: hidden; + display: flex; flex-direction: row; flex-flow: wrap; - justify-content: space-around; + align-content: flex-start; } -.mx_MyGroups_joinedGroups .mx_GroupTile { +.mx_MyGroups_joinedGroups .gm-scroll-view .mx_GroupTile { min-width: 300px; - flex: 1 0 25%; + max-width: 33%; + flex: 1 0 300px; height: 75px; - margin-bottom: 15px; - margin-right: 10px; + margin: 10px 0px; display: flex; align-items: flex-start; cursor: pointer; @@ -100,6 +117,12 @@ limitations under the License. justify-content: center; } +.mx_GroupTile_profile h3.mx_GroupTile_name, +.mx_GroupTile_profile .mx_GroupTile_groupId, +.mx_GroupTile_profile .mx_GroupTile_desc { + padding-right: 10px; +} + .mx_GroupTile_profile h3.mx_GroupTile_name { margin: 0px; font-size: 15px; From 4d11e739b555c71177bb0a9b5379315ffd400d89 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Fri, 3 Nov 2017 11:42:06 +0000 Subject: [PATCH 2/2] Comment 0px height and margin on joinBox --- .../vector/css/matrix-react-sdk/structures/_MyGroups.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/skins/vector/css/matrix-react-sdk/structures/_MyGroups.scss b/src/skins/vector/css/matrix-react-sdk/structures/_MyGroups.scss index a9c7a5f03..d7cbda9a9 100644 --- a/src/skins/vector/css/matrix-react-sdk/structures/_MyGroups.scss +++ b/src/skins/vector/css/matrix-react-sdk/structures/_MyGroups.scss @@ -64,6 +64,11 @@ limitations under the License. /* Until the button is wired up */ .mx_MyGroups_joinBox { visibility: hidden; + + /* When joinBox wraps onto its own row, it should take up zero height so + that there isn't an awkward gap between MyGroups_createBox and + MyGroups_content. + */ height: 0px; margin: 0px; }