|
2 | 2 | #HEADER |
3 | 3 | \*------------------------------------*/ |
4 | 4 |
|
5 | | -/** |
6 | | -* 1) Pattern Lab's header is fixed across the top of the viewport and |
7 | | -* contains the primary pattern navigation, viewport resizing items, |
8 | | -* and tools. |
9 | | -* 2) Display nav and controls horizontally |
10 | | -*/ |
11 | | -.pl-c-header { |
| 5 | +pl-header { |
12 | 6 | position: fixed; |
13 | 7 | position: sticky; |
14 | 8 | top: 0; |
|
18 | 12 | width: 100%; |
19 | 13 | background-color: $pl-color-black; |
20 | 14 | color: $pl-color-gray-50; |
| 15 | + |
| 16 | + @media all and (min-width: $pl-bp-med) { |
| 17 | + .pl-c-body--theme-sidebar & { |
| 18 | + /** |
| 19 | + * Header |
| 20 | + * 1) Set width to sidebar width defined above |
| 21 | + * 2) Make header 100% of the viewport height |
| 22 | + * 3) Stack header content stack on top of each other |
| 23 | + * 4) void bottom border for light theme |
| 24 | + */ |
| 25 | + width: $pl-sidebar-width; /* 1 */ |
| 26 | + height: 100vh; /* 2 */ |
| 27 | + overflow: auto; |
| 28 | + padding: 1rem; |
| 29 | + -webkit-overflow-scrolling: touch; |
| 30 | + border-bottom: 0; /* 4 */ |
| 31 | + } |
| 32 | + } |
| 33 | + |
| 34 | + .pl-c-body--theme-light & { |
| 35 | + border-right: 1px solid $pl-color-gray-20; |
| 36 | + background-color: $pl-color-white; |
| 37 | + border-bottom: 1px solid $pl-color-gray-20; |
| 38 | + } |
| 39 | +} |
| 40 | + |
| 41 | +/** |
| 42 | +* 1) Pattern Lab's header is fixed across the top of the viewport and |
| 43 | +* contains the primary pattern navigation, viewport resizing items, |
| 44 | +* and tools. |
| 45 | +* 2) Display nav and controls horizontally |
| 46 | +*/ |
| 47 | +.pl-c-header { |
| 48 | + display: flex; /* 2 */ |
| 49 | + flex-direction: row; |
| 50 | + width: 100%; |
21 | 51 | font-family: $pl-font; |
22 | 52 | font-size: $pl-font-size-sm; |
23 | 53 | min-height: 30px; // magic number -- needed for initial skeleton screen styles used in the critical CSS |
| 54 | + background-color: inherit; |
24 | 55 |
|
25 | 56 | @supports(padding: max(0px)) { |
26 | 57 | padding-left: env(safe-area-inset-left); |
27 | 58 | padding-right: env(safe-area-inset-right); |
28 | 59 | } |
| 60 | + |
| 61 | + @media all and (min-width: $pl-bp-med) { |
| 62 | + .pl-c-body--theme-sidebar & { |
| 63 | + flex-direction: column; /* 3 */ |
| 64 | + justify-content: space-between; |
| 65 | + } |
| 66 | + } |
29 | 67 | } |
30 | 68 |
|
31 | 69 | /** |
|
0 commit comments