1 @import (reference) 'base-zindex-levels';
2 @import (reference) 'colors.less';
3 @import (reference) 'trp3Vars.less';
4 @import (reference) 'trpButtons.less';
6 @import '../controls/dropdown';
8 @chat-header-heading-font-size: 24px;
9 @chat-header-heading-line-height: 40px;
10 @chat-header-topic-font-size: 1em;
11 @chat-header-topic-line-height: 25px;
12 @chat-header-topic-color: white;
14 // The space above the chat header
15 @chat-header-space-to-heading: (
16 @chat-frame-desktop-header-height - @chat-header-heading-line-height
18 // The difference between line-height and font-size bounds
19 @chat-header-font-vertical-padding: (
20 @chat-header-heading-line-height - @chat-header-heading-font-size
22 // The extra amount needed to align the topic to the baseline of the heading
23 @vert-diff-baseline-offset-between-header-and-topic: @chat-header-font-vertical-padding ~'+' @chat-header-heading-font-size
24 ~'-' @chat-header-topic-line-height;
25 // Actual margin value to align the topic to the baseline of the heading
26 // Extra `.125` is for account for desenders to match baseline
27 // This needs to be split out of the calc so we can re-use it in a calc
28 @topic-margin-calc-value: @chat-header-space-to-heading ~'+' @vert-diff-baseline-offset-between-header-and-topic
30 @topic-margin-top: calc(@topic-margin-calc-value);
31 @topic-margin-bottom: calc(~'(' @topic-margin-calc-value ~')' ~'/' 2);
34 box-sizing: border-box;
38 background-image: linear-gradient(to left, @header-grad-bg-color, @header-base-bg-color);
39 border-bottom: 1px solid rgba(0, 0, 0, 0.05);
40 z-index: @zIndexChatHeader;
42 @media @large-screen-breakpoint {
43 padding-left: @desktop-menu-left-padding;
50 align-items: flex-start;
55 .chat-header__main-grouping {
58 // header can expand to fit long room topics/descriptions when hovered over
59 height: @chat-frame-desktop-header-height;
62 .chat-header__info-grouping {
63 .chat-header__main-grouping();
67 align-items: flex-start;
69 max-height: @chat-frame-desktop-header-height;
71 transition: max-height 0.3s ease;
75 // plenty of room to auto expand into
80 .chat-header__heading-sub-group {
86 .chat-header__heading {
87 box-sizing: border-box;
89 margin-top: (@chat-frame-desktop-header-height - @chat-header-heading-line-height) / 2;
98 display: inline-block;
102 font-size: @chat-header-heading-font-size;
103 line-height: @chat-header-heading-line-height;
105 text-overflow: ellipsis;
108 text-decoration: none;
112 .chat-header__topic-sub-group {
123 .chat-header__topic-wrapper {
124 box-sizing: border-box;
129 color: fade(@chat-header-topic-color, 0);
132 transition: color 0.2s ease;
138 /* Handle the edit icon */
145 margin-top: @topic-margin-top;
149 font-family: 'fontello';
153 .chat-header__info-grouping:hover &,
154 .chat-header__info-grouping:focus & {
155 color: @chat-header-topic-color;
160 .chat-header__topic {
161 box-sizing: border-box;
163 display: inline-block;
164 vertical-align: baseline;
165 // max height to allow height animations
166 max-height: @chat-header-topic-line-height;
168 // For the italic overflow
169 padding-right: 0.25rem;
173 font-size: @chat-header-topic-font-size;
174 line-height: @chat-header-topic-line-height;
175 text-overflow: ellipsis;
178 transition: max-height 0.3s ease-in-out;
181 margin-top: @topic-margin-top;
182 margin-bottom: @topic-margin-bottom;
185 /* Handle the placeholder description */
190 margin-top: @topic-margin-top;
191 margin-bottom: @topic-margin-bottom;
195 content: 'Double-click here to enter a description for your room.';
205 .chat-header__info-grouping:hover &,
206 .chat-header__info-grouping:focus & {
207 // plenty of room to auto expand into
211 word-wrap: break-word;
215 box-sizing: border-box;
224 .chat-header__topic a {
228 .chat-header__content h1 .octicon-lock:before {
236 .chat-header__content .icon-lock {
240 .chat-header__permission-icon,
241 .chat-header__title {
242 vertical-align: middle;
245 .chat-header__permission-icon {
250 .chat-header__action-grouping {
251 align-items: stretch;
254 .chat-header__org-page,
255 .chat-header__favourite,
256 .chat-header__settings,
257 .chat-header__left-menu-toggle {
262 box-sizing: content-box;
263 display: inline-block;
265 justify-content: center;
270 background-color: transparent;
279 transition: background-color 0.2s ease-in-out, color 0.1s ease;
283 color: rgba(255, 255, 255, 0.6);
286 & > .chat-header__action-icon {
287 background-color: rgba(0, 0, 0, 0.1);
292 .chat-header__action-icon {
294 stroke: currentColor;
302 .chat-header__action-icon {
305 transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
307 // Spacing that doesn't affect width
308 border-width: 4px 6px;
310 border-color: transparent;
314 .chat-header__action-icon-svg--settings {
318 .chat-header__action-matrix-icon {
323 .chat-header__org-page {
324 @media (max-width: 650px) {
328 .chat-header__action-icon {
329 /* To make the icon equal with the other font-icons */
331 margin-right: 0.18em;
335 .chat-header__favourite {
336 @media (max-width: 650px) {
345 .chat-header__left-menu-toggle-grouping {
346 @media @large-screen-breakpoint {
351 .chat-header__left-menu-toggle {
366 vector-effect: non-scaling-stroke;
370 .chat-header__avatar-grouping {
375 .chat-header__avatar {
379 box-sizing: border-box;
391 .chat-header__group-avatar-upload-input {
395 .chat-header__group-avatar-upload-label {
399 box-sizing: border-box;
403 background-color: white;
408 .chat-header__group-avatar-upload-progress {
415 background-color: fade(@caribbean, 75%);
416 border-bottom-left-radius: 4px;
417 border-bottom-right-radius: 4px;
419 transition: width 0.3s ease, background-color 0.2s ease;
421 animation-name: avatar-upload-progress-pulse;
422 animation-duration: 0.4s;
423 animation-iteration-count: infinite;
424 animation-timing-function: linear;
425 animation-direction: alternate;
428 @keyframes avatar-upload-progress-pulse {
430 background-color: fade(@caribbean, 40%);
434 .chat-header-wrapper {
438 .chat-and-toolbar-wrapper {
439 box-sizing: border-box;
441 justify-content: flex-end;
442 align-items: stretch;
444 padding-top: @chat-frame-desktop-header-height;
448 box-sizing: border-box;
453 flex-direction: column;
454 /* Sometimes `.chat-and-toolbar-wrapper` isn't a parent */
460 text-decoration: none;