element-call-Github/src/Header.module.css

128 lines
2.3 KiB
CSS
Raw Normal View History

2023-01-04 00:58:38 +08:00
/*
Copyright 2022 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
2021-08-20 08:49:45 +08:00
.header {
position: relative;
display: flex;
2021-11-30 08:19:48 +08:00
justify-content: space-between;
2021-08-20 08:49:45 +08:00
align-items: center;
user-select: none;
2021-08-21 07:23:12 +08:00
flex-shrink: 0;
2021-08-20 08:49:45 +08:00
}
2021-11-30 08:19:48 +08:00
.nav {
display: flex;
2021-12-11 02:54:18 +08:00
flex: 1;
2021-11-30 08:19:48 +08:00
align-items: center;
white-space: nowrap;
padding-inline: var(--inline-content-inset);
height: 80px;
2021-08-20 08:49:45 +08:00
}
2021-12-24 06:40:23 +08:00
.headerLogo {
display: none;
2021-08-20 08:49:45 +08:00
align-items: center;
text-decoration: none;
}
2021-12-24 06:40:23 +08:00
.leftNav.hideMobile {
display: none;
}
2021-11-30 08:19:48 +08:00
.leftNav > * {
margin-right: 12px;
2021-08-21 07:23:12 +08:00
}
2021-12-24 06:40:23 +08:00
.leftNav h3 {
2022-01-06 03:52:23 +08:00
margin: 0;
2021-12-24 06:40:23 +08:00
}
2021-12-11 02:54:18 +08:00
.rightNav {
justify-content: flex-end;
}
2021-11-11 09:03:32 +08:00
.rightNav > * {
margin-right: 24px;
}
2022-01-05 08:00:13 +08:00
.rightNav.hideMobile {
display: none;
}
2021-11-30 08:19:48 +08:00
.nav > :last-child {
margin-right: 0;
}
.roomHeaderInfo {
display: grid;
column-gap: var(--cpd-space-4x);
grid-template-columns: auto auto;
grid-template-rows: 1fr auto;
}
.roomHeaderInfo[data-size="sm"] {
grid-template-areas: "avatar name" ". participants";
}
.roomHeaderInfo[data-size="lg"] {
grid-template-areas: "avatar name" "avatar participants";
}
2021-11-30 08:19:48 +08:00
.roomAvatar {
align-self: flex-start;
grid-area: avatar;
2021-11-30 08:19:48 +08:00
}
.nameLine {
grid-area: name;
flex-grow: 1;
display: flex;
align-items: center;
gap: var(--cpd-space-1x);
2021-11-30 08:19:48 +08:00
}
.nameLine > h1 {
margin: 0;
/* XXX I can't actually get this ellipsis overflow to trigger, because
constraint propagation in a nested flexbox layout is a massive pain */
2021-08-21 07:23:12 +08:00
overflow: hidden;
text-overflow: ellipsis;
2021-08-21 07:23:12 +08:00
}
.nameLine > svg {
flex-shrink: 0;
}
.participantsLine {
grid-area: participants;
display: flex;
align-items: center;
gap: var(--cpd-space-1-5x);
font: var(--cpd-font-body-sm-medium);
}
2021-11-11 09:03:32 +08:00
@media (min-width: 800px) {
2021-12-24 06:40:23 +08:00
.headerLogo,
2022-01-05 08:00:13 +08:00
.leftNav.hideMobile,
.rightNav.hideMobile {
2021-12-24 06:40:23 +08:00
display: flex;
}
.leftNav h3 {
font-size: var(--font-size-subtitle);
2021-12-24 06:40:23 +08:00
}
2021-11-11 09:03:32 +08:00
}