cinny/src/app/molecules/room-selector/RoomSelector.scss

96 lines
1.7 KiB
SCSS
Raw Normal View History

2021-08-31 15:13:31 +02:00
.room-selector-flex {
2021-08-29 10:27:55 +02:00
display: flex;
align-items: center;
}
2021-08-31 15:13:31 +02:00
.room-selector-flexItem {
2021-08-29 10:27:55 +02:00
flex: 1;
min-width: 0;
min-height: 0;
}
2021-08-31 15:13:31 +02:00
.room-selector {
@extend .room-selector-flex;
2021-08-29 10:27:55 +02:00
2021-07-28 15:15:52 +02:00
border: 1px solid transparent;
2021-08-29 10:27:55 +02:00
border-radius: var(--bo-radius);
2021-07-28 15:15:52 +02:00
cursor: pointer;
2021-09-09 14:05:39 +02:00
&--unread {
.room-selector__content > .text {
color: var(--tc-surface-high);
}
}
2021-08-29 10:27:55 +02:00
&--selected {
background-color: var(--bg-surface);
border-color: var(--bg-surface-border);
2021-07-28 15:15:52 +02:00
2021-08-31 15:13:31 +02:00
& .room-selector__options {
2021-08-29 10:27:55 +02:00
display: flex;
2021-07-28 15:15:52 +02:00
}
}
@media (hover: hover) {
&:hover {
background-color: var(--bg-surface-hover);
2021-08-31 15:13:31 +02:00
& .room-selector__options {
2021-08-29 10:27:55 +02:00
display: flex;
}
2021-07-28 15:15:52 +02:00
}
}
2021-09-03 14:28:01 +02:00
&:focus-within {
2021-07-28 15:15:52 +02:00
background-color: var(--bg-surface-hover);
2021-09-03 14:28:01 +02:00
& button {
outline: none;
}
2021-07-28 15:15:52 +02:00
}
&:active {
background-color: var(--bg-surface-active);
}
2021-08-29 10:27:55 +02:00
&--selected:hover,
&--selected:focus,
&--selected:active {
background-color: var(--bg-surface);
}
2021-07-28 15:15:52 +02:00
}
2021-08-31 15:13:31 +02:00
.room-selector__content {
@extend .room-selector-flexItem;
@extend .room-selector-flex;
2021-08-29 10:27:55 +02:00
padding: 0 var(--sp-extra-tight);
min-height: 40px;
cursor: inherit;
& > .avatar-container .avatar__bordered {
box-shadow: none;
2021-07-28 15:15:52 +02:00
}
2021-08-29 10:27:55 +02:00
& > .text {
2021-08-31 15:13:31 +02:00
@extend .room-selector-flexItem;
2021-07-28 15:15:52 +02:00
margin: 0 var(--sp-extra-tight);
color: var(--tc-surface-normal-low);
2021-08-29 10:27:55 +02:00
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
2021-07-28 15:15:52 +02:00
}
}
2021-08-31 15:13:31 +02:00
.room-selector__options {
@extend .room-selector-flex;
2021-08-29 10:27:55 +02:00
display: none;
margin-right: var(--sp-ultra-tight);
2021-07-28 15:15:52 +02:00
2021-08-29 10:27:55 +02:00
[dir=rtl] & {
margin-right: 0;
margin-left: var(--sp-ultra-tight);
}
&:empty {
margin: 0 !important;
}
2021-09-05 15:26:34 +02:00
& .ic-btn {
2021-08-29 10:27:55 +02:00
padding: 6px;
border-radius: calc(var(--bo-radius) / 2);
}
2021-07-28 15:15:52 +02:00
}