align room sub list header with design
also make css more maintainable with less hardcoded dimensions
This commit is contained in:
parent
3ce52d104c
commit
3bd0bcde4b
2 changed files with 26 additions and 49 deletions
|
@ -22,7 +22,7 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomSubList_nonEmpty {
|
.mx_RoomSubList_nonEmpty {
|
||||||
margin-bottom: 8px;
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomSubList_labelContainer {
|
.mx_RoomSubList_labelContainer {
|
||||||
|
@ -30,34 +30,30 @@ limitations under the License.
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
margin: 8px 19px 0 0;
|
margin: 0 16px;
|
||||||
|
height: 36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomSubList_label {
|
.mx_RoomSubList_label {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
position: relative;
|
cursor: pointer;
|
||||||
|
background-color: $secondary-accent-color;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_RoomSubList_label > span {
|
||||||
|
flex: 1 1 auto;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
color: $roomsublist-label-fg-color;
|
color: $roomsublist-label-fg-color;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
margin-left: 16px;
|
margin-left: 8px;
|
||||||
padding-left: 16px; /* gutter */
|
|
||||||
padding-right: 16px; /* gutter */
|
|
||||||
padding-top: 6px;
|
|
||||||
padding-bottom: 6px;
|
|
||||||
cursor: pointer;
|
|
||||||
background-color: $secondary-accent-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_RoomSubList_label.mx_RoomSubList_fixed {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
z-index: 5;
|
|
||||||
/* pointer-events: none; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomSubList_badge {
|
.mx_RoomSubList_badge {
|
||||||
flex: 0 1 content;
|
flex: 0 0 auto;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
color: $accent-fg-color;
|
color: $accent-fg-color;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
@ -66,12 +62,8 @@ limitations under the License.
|
||||||
background-color: $accent-color;
|
background-color: $accent-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomSubList_label .mx_RoomSubList_badge:hover {
|
|
||||||
filter: brightness($focus-brightness);
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_RoomSubList_addRoom, .mx_RoomSubList_badge {
|
.mx_RoomSubList_addRoom, .mx_RoomSubList_badge {
|
||||||
margin: 5px;
|
margin-left: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomSubList_addRoom {
|
.mx_RoomSubList_addRoom {
|
||||||
|
@ -84,7 +76,6 @@ limitations under the License.
|
||||||
height: 16px;
|
height: 16px;
|
||||||
flex: 0 0 16px;
|
flex: 0 0 16px;
|
||||||
background-clip: content-box;
|
background-clip: content-box;
|
||||||
padding: 2px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomSubList_badgeHighlight {
|
.mx_RoomSubList_badgeHighlight {
|
||||||
|
@ -92,15 +83,14 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomSubList_chevron {
|
.mx_RoomSubList_chevron {
|
||||||
left: 0px;
|
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
position: absolute;
|
|
||||||
top: 11px;
|
|
||||||
width: 10px;
|
|
||||||
height: 6px;
|
|
||||||
background-image: url('../../img/topleft-chevron.svg');
|
background-image: url('../../img/topleft-chevron.svg');
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
transition: transform 0.2s ease-in;
|
transition: transform 0.2s ease-in;
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
background-position: center;
|
||||||
|
margin-left: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomSubList_chevronDown {
|
.mx_RoomSubList_chevronDown {
|
||||||
|
@ -126,31 +116,18 @@ limitations under the License.
|
||||||
.mx_RoomSubList_scroll {
|
.mx_RoomSubList_scroll {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.mx_RoomSubList_label {
|
|
||||||
height: 17px;
|
|
||||||
padding-right: 0;
|
|
||||||
width: 28px; /* collapsed LHS Panel width */
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_RoomSubList_labelContainer {
|
.mx_RoomSubList_labelContainer {
|
||||||
width: 28px; /* collapsed LHS Panel width */
|
margin-right: 14px;
|
||||||
|
margin-left: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomSubList_line {
|
.mx_RoomSubList_addRoom {
|
||||||
display: none;
|
margin-left: 3px;
|
||||||
|
margin-right: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomSubList_moreBadge {
|
.mx_RoomSubList_label > span {
|
||||||
position: static;
|
|
||||||
margin-left: 16px;
|
|
||||||
margin-top: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_RoomSubList_ellipsis {
|
|
||||||
height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_RoomSubList_more {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -325,7 +325,7 @@ const RoomSubList = React.createClass({
|
||||||
<div className="mx_RoomSubList_labelContainer" title={ title } ref="header">
|
<div className="mx_RoomSubList_labelContainer" title={ title } ref="header">
|
||||||
<AccessibleButton onClick={ this.onClick } className="mx_RoomSubList_label" tabIndex={tabindex}>
|
<AccessibleButton onClick={ this.onClick } className="mx_RoomSubList_label" tabIndex={tabindex}>
|
||||||
{ chevron }
|
{ chevron }
|
||||||
{ this.props.collapsed ? '' : this.props.label }
|
<span>{this.props.label}</span>
|
||||||
{ incomingCall }
|
{ incomingCall }
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
{ badge }
|
{ badge }
|
||||||
|
|
Loading…
Reference in a new issue