Skip to content

Commit

Permalink
Merge pull request #7880 from RocketChat/fix-sidebar-alignments
Browse files Browse the repository at this point in the history
[FIX] sidebar paddings
  • Loading branch information
gdelavald authored and rodrigok committed Aug 25, 2017
1 parent 3309949 commit a286fec
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@

&__type {
margin-bottom: 0.5rem;
margin-left: calc(var(--sidebar-default-padding) - calc(var(--sidebar-default-padding) / 3));

color: var(--rooms-list-title-color);

font-size: var(--rooms-list-title-text-size);
}

&__empty-room {
margin-left: calc(var(--sidebar-default-padding) - calc(var(--sidebar-default-padding) / 3));

color: var(--rooms-list-empty-text-color);

Expand All @@ -43,3 +45,12 @@
background-color: var(--sidebar-background);
}
}

@media (width <= 400px) {
.rooms-list {
&__type,
&__empty-room {
margin-left: 0;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
flex: 1;

max-width: 160px;
max-width: fit-content;
height: calc(var(--sidebar-account-username-size) + 0.1rem);
margin-bottom: 0.5rem;

Expand Down Expand Up @@ -147,7 +148,6 @@

&-username {
width: auto;
max-width: 160px;
margin: 0 0.65rem;

font-weight: var(--sidebar-small-account-username-weight);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
.sidebar-item {

position: relative;

display: flex;

height: var(--sidebar-item-height);

padding-left: calc(var(--sidebar-default-padding) - calc(var(--sidebar-default-padding) / 3));

cursor: pointer;

border-radius: var(--sidebar-item-radius);
Expand Down Expand Up @@ -55,6 +56,7 @@

&__icon {
margin: 0 auto;

font-size: 1.25rem;
fill: currentColor;
}
Expand All @@ -66,7 +68,7 @@

&__user-status {
position: absolute;
right: calc(100% + var(--sidebar-item-user-status-size));
left: 4px;

width: var(--sidebar-item-user-status-size);
height: var(--sidebar-item-user-status-size);
Expand Down Expand Up @@ -110,8 +112,11 @@

@media (width <= 400px) {
.sidebar-item {
padding-left: 0;

&__user-status {
right: calc(100% + var(--sidebar-small-item-user-status-size));
left: auto;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@
display: none;
}

& .rooms-list,
& .unread-rooms {
padding: 0 var(--sidebar-default-padding) var(--sidebar-default-padding) var(--sidebar-default-padding);
& .rooms-list {
padding: 0 calc(var(--sidebar-default-padding) / 3);
}
}

Expand Down Expand Up @@ -98,6 +97,10 @@
padding: 0 var(--sidebar-small-default-padding) var(--sidebar-small-default-padding) var(--sidebar-small-default-padding);
}

&__footer {
display: none;
}

&:not(&--light) {
transform: translate3d(-100%, 0, 0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

&__icon {
&--plus {
font-size: 1.25rem;
}
font-size: 1.25rem;
}
}

& .rc-input {
Expand Down Expand Up @@ -69,8 +69,9 @@
}

&-svg--plus {
font-size: 1rem;
transform: rotate(45deg);

font-size: 1rem;
}
}
}
Expand Down

0 comments on commit a286fec

Please sign in to comment.