webapp/src/components/Feed/Sidebar/Sidebar.module.scss
kvakazyambra 04978ebc7c
Feed style fixes (#450)
* Feed style fixes

* Change subscriptions list icon
2024-04-30 20:22:44 +03:00

213 lines
3.4 KiB
SCSS

.sidebar {
margin-top: -0.7rem;
max-height: calc(100vh - 120px);
overflow: auto;
top: 120px;
@include media-breakpoint-up(md) {
margin-top: 0;
position: sticky;
ul > li {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.sidebarItemName {
background: transparent;
align-items: center;
display: flex;
position: relative;
transition: background-color 0.2s;
}
.sidebarItemNameLabel {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.userpic {
margin-right: 1.2rem;
}
.selected {
font-weight: 700;
}
.counter {
@include font-size(1.2rem);
align-items: center;
align-self: flex-start;
background: #f6f6f6;
border-radius: 0.8rem;
display: inline-flex;
font-weight: bold;
justify-content: center;
min-width: 2em;
margin-left: 0.5em;
padding: 0.25em 0.5em 0.15em;
transition: background-color 0.2s;
}
.unread {
position: relative;
&::after {
background: #2638d9;
border-radius: 100%;
content: '';
display: inline-block;
height: 0.5em;
left: 100%;
margin-left: 0.3em;
position: absolute;
top: 0.5em;
width: 0.5em;
}
}
.settings {
display: flex;
justify-content: space-between;
margin: 2em 0;
@include media-breakpoint-down(md) {
margin: 0;
position: absolute;
right: 12px;
}
@include media-breakpoint-down(sm) {
right: 2px;
}
a {
border: none;
}
}
.settingsLabel {
@include media-breakpoint-down(sm) {
display: none;
}
}
a {
img {
transition: filter 0.3s;
}
&:hover {
.sidebarItemName,
.counter {
background: var(--background-color-invert);
}
img {
filter: invert(1);
}
}
}
.icon {
display: inline-block;
line-height: 1;
height: 2.4rem;
margin-right: 0.8rem;
min-width: 2.4rem;
text-align: center;
vertical-align: middle;
img {
height: 100%;
object-fit: contain;
object-position: center;
width: 100%;
}
}
h4 {
@include font-size(1.2rem);
font-weight: bold;
color: #9fa1a7;
cursor: pointer;
letter-spacing: 0.05em;
text-transform: uppercase;
position: relative;
.icon {
margin: 0;
min-width: 1.8rem;
position: absolute;
right: 1.7rem;
top: 50%;
transform: translateY(-50%) rotate(180deg);
transform-origin: center;
transition: transform 0.3s;
width: 1.8rem;
}
&.opened {
.icon {
right: 0;
transform: translateY(-50%);
}
}
}
.hidden {
display: none;
}
}
.feedFilters,
.subscriptions {
@include media-breakpoint-down(md) {
display: flex;
overflow: auto;
li {
margin-right: 3rem !important;
&:last-child {
margin-right: 0 !important;
}
}
&::-webkit-scrollbar {
height: 0;
width: 0;
}
&::-webkit-scrollbar-thumb {
background: none;
}
}
}
.feedFilters {
@include media-breakpoint-down(md) {
margin-bottom: 0 !important;
}
.sidebarItemName {
align-items: center;
}
}
.subscriptions {
.icon {
text-align: center;
img {
display: inline-block;
vertical-align: middle;
}
}
}