discourse/plugins/chat/assets/stylesheets/common/chat-browse.scss
Joffrey JAFFEUX 5ce0697348
FIX: limits max height to viewport on channel only (#21539)
Before this commit chat was applying a fixed height on everything under the `/chat` route. It's only really needed on the channel page with the composer at the bottom of the page.

This commits makes the following changes:
- moves height limitation from `#main-outlet-wrapper` to `.chat-channel`
- makes browse channel page and members list page full height and rely on main document scrollbar
- adds height computation for draft header and direct message creator block to ensure the height is correct when creating a draft channel
- makes chat index full height to rely on the browser scrollbar. As a result the <kbd> + </kbd> button used on mobile to create a direct message as been moved out of `<ChannelsList>` into the chat index template
- sidebar height was relying on chat setting a max height, as a result the height computation of sidebar has been changed to work correctly, especially with an opened keyboard on mobile or ipad
2023-05-15 11:46:33 +02:00

107 lines
1.7 KiB
SCSS

.chat-browse-view {
position: relative;
box-sizing: border-box;
padding: 1rem;
&__header {
display: flex;
align-items: center;
justify-content: flex-start;
.new-channel-btn {
margin-left: auto;
}
}
&__title {
box-sizing: border-box;
margin-bottom: 0;
}
&__content_wrapper {
box-sizing: border-box;
margin-top: 1rem;
}
&__cards {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-gap: 2rem;
@include breakpoint(tablet) {
grid-template-columns: repeat(1, 1fr);
grid-gap: 1.5rem;
}
}
&__actions {
display: flex;
justify-content: space-between;
align-items: end;
@include breakpoint(tablet) {
flex-direction: column;
.dc-filter-input-container {
margin-top: 1rem;
}
.dc-filter-input-container,
nav {
width: 100%;
}
}
}
&__filters {
display: flex;
align-items: center;
margin: 0;
&:before {
content: none; //there is a strange thing applied on nav-pills and this resets it
}
@include breakpoint(mobile-large) {
justify-content: space-between;
}
}
&__filter {
display: inline;
margin-right: 1em;
&:last-of-type {
margin-right: 0;
}
@include breakpoint(mobile-large) {
margin: 0;
}
}
&__filter-link,
&__filter-link:visited {
color: var(--primary);
font-size: var(--font-up-2);
padding: 0 0.25rem;
@include breakpoint(tablet) {
font-size: var(--font-up-1);
}
}
.chat-channel-card {
.chat-channel-card__leave-btn {
padding: 0;
&:hover,
&:focus {
background: none;
}
&:focus {
@include default-focus;
}
}
}
}