-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathd2l-navigation-main-header.js
67 lines (57 loc) · 1.42 KB
/
d2l-navigation-main-header.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { css, html, LitElement } from 'lit';
import { navigationSharedStyle } from './d2l-navigation-shared-styles.js';
class NavigationMainHeader extends LitElement {
static get styles() {
return [navigationSharedStyle, css`
:host {
display: block;
}
.d2l-navigation-header-container {
align-items: center;
display: flex;
height: 90px;
}
@media (max-width: 767px) {
.d2l-navigation-header-container {
height: 72px;
}
}
div ::slotted(.d2l-navigation-header-left),
div ::slotted(.d2l-navigation-header-right) {
align-items: center;
display: flex;
height: 100%;
}
div ::slotted(.d2l-navigation-header-left) {
flex: 0 1 auto;
}
div ::slotted(.d2l-navigation-header-right) {
flex: 0 0 auto;
}
.d2l-navigation-gutter {
display: inline-block;
flex: 1 1 auto;
min-width: var(--d2l-navigation-margin-regular);
}
@media (max-width: 615px) {
.d2l-navigation-gutter {
min-width: var(--d2l-navigation-margin-regular) / 2;
}
}
`];
}
render() {
return html`
<div class="d2l-navigation-centerer">
<div class="d2l-navigation-gutters">
<div class="d2l-navigation-header-container">
<slot name="left"></slot>
<div class="d2l-navigation-gutter"></div>
<slot name="right"></slot>
</div>
</div>
</div>
`;
}
}
customElements.define('d2l-navigation-main-header', NavigationMainHeader);