|
1 | | -@import '../../../styles/constants'; |
2 | | - |
| 1 | +$sidenav-spacing-unit: 8px; |
3 | 2 | $sidenav-width: 240px; |
4 | 3 |
|
| 4 | +app-component-sidenav { |
| 5 | + display: flex; |
| 6 | +} |
| 7 | + |
5 | 8 | .docs-component-viewer-sidenav-container { |
6 | | - box-sizing: border-box; |
| 9 | + width: 100%; |
| 10 | + |
| 11 | + .mat-drawer-content { |
| 12 | + position: absolute; |
| 13 | + right: 0; |
| 14 | + left: 0; |
| 15 | + } |
7 | 16 | } |
8 | 17 |
|
9 | 18 | .docs-component-viewer-sidenav { |
| 19 | + box-shadow: 3px 0 6px rgba(0, 0, 0, .24); |
| 20 | + padding-bottom: 72px; |
| 21 | + width: $sidenav-width; |
| 22 | + bottom: 0; |
10 | 23 | overflow: auto; |
11 | | -} |
| 24 | + height: 100%; |
12 | 25 |
|
13 | | -.docs-component-sidenav-inner-content { |
14 | | - display: flex; |
15 | | - flex-direction: row; |
| 26 | + &.mat-sidenav-opened { |
| 27 | + box-shadow: 3px 0 6px rgba(0, 0, 0, .24); |
| 28 | + } |
16 | 29 |
|
17 | | - // The rule will match the element following the router-outlet which will be the routed component. |
18 | | - router-outlet + * { |
19 | | - flex-grow: 1; |
| 30 | + // Section divider |
| 31 | + h3 { |
| 32 | + border: none; |
| 33 | + font-size: 10px; |
| 34 | + letter-spacing: 1px; |
| 35 | + line-height: $sidenav-spacing-unit * 3; |
| 36 | + text-transform: uppercase; |
| 37 | + font-weight: 400; |
| 38 | + margin: 0; |
| 39 | + padding: 0 ($sidenav-spacing-unit * 2); |
20 | 40 | } |
21 | | -} |
22 | 41 |
|
23 | | -.mat-drawer { |
24 | | - &::-webkit-scrollbar { |
25 | | - height: 4px; |
26 | | - width: 4px; |
| 42 | + ul { |
| 43 | + list-style-type: none; |
| 44 | + margin: 0; |
| 45 | + padding: 0; |
27 | 46 | } |
28 | | -} |
29 | 47 |
|
30 | | -.docs-component-viewer-nav { |
31 | | - position: sticky; |
32 | | - top: 25px; |
| 48 | + // Sidenav navigation item |
| 49 | + li { |
| 50 | + border-bottom-width: 1px; |
| 51 | + border-bottom-style: solid; |
| 52 | + margin: 0; |
| 53 | + padding: 0; |
33 | 54 |
|
34 | | - .docs-component-viewer-nav-content { |
35 | | - margin: 25px; |
36 | | - width: $sidenav-width; |
37 | | - max-height: 75vh; |
38 | | - overflow: auto; |
39 | 55 |
|
40 | | - &::-webkit-scrollbar { |
41 | | - height: 4px; |
42 | | - width: 4px; |
| 56 | + // Hide the border on the last item |
| 57 | + &:last-child { |
| 58 | + border-color: transparent; |
43 | 59 | } |
44 | 60 |
|
45 | | - button { |
46 | | - padding: 10px 15px; |
47 | | - font-weight: 700; |
48 | | - line-height: 16px; |
49 | | - margin: 0; |
50 | | - font-size: 13px; |
51 | | - cursor: pointer; |
52 | | - position: relative; |
| 61 | + > a { |
| 62 | + box-sizing: border-box; |
53 | 63 | display: block; |
54 | | - width: 100%; |
55 | | - text-align: left; |
56 | | - background: none; |
57 | | - border: none; |
58 | | - |
59 | | - &:focus { |
60 | | - outline: none; |
61 | | - } |
| 64 | + font-size: 14px; |
| 65 | + font-weight: 400; |
| 66 | + line-height: ($sidenav-spacing-unit * 6) - 1; |
| 67 | + text-decoration: none; |
| 68 | + transition: all .3s; |
| 69 | + padding: 0 ($sidenav-spacing-unit * 2); |
| 70 | + position: relative; |
62 | 71 |
|
63 | | - .mat-icon { |
64 | | - position: absolute; |
65 | | - right: 5px; |
66 | | - font-size: 18px; |
| 72 | + &.docs-component-viewer-sidenav-item-selected { |
| 73 | + font-weight: 600; |
67 | 74 | } |
68 | 75 | } |
69 | | - |
70 | | - hr { |
71 | | - padding: 0; |
72 | | - margin: 0; |
73 | | - } |
74 | | - |
75 | | - ul { |
76 | | - list-style-type: none; |
77 | | - margin: -5px 0 5px 0; |
78 | | - padding: 0; |
79 | | - overflow: hidden; |
80 | | - } |
81 | | - |
82 | | - li { |
83 | | - font-size: 13px; |
84 | | - line-height: 16px; |
85 | | - margin: 0; |
86 | | - padding: 5px 15px 5px 20px; |
87 | | - } |
88 | | - |
89 | | - a { |
90 | | - display: block; |
91 | | - text-decoration: none; |
92 | | - } |
93 | 76 | } |
94 | 77 | } |
95 | 78 |
|
96 | 79 | .docs-component-sidenav-content { |
| 80 | + min-height: 100%; |
97 | 81 | display: flex; |
98 | 82 | flex-direction: column; |
99 | | -} |
100 | | - |
101 | | -// Add specific rule to prevent default rule conflict |
102 | | -.docs-component-viewer-sidenav-container.mat-drawer-container{ |
103 | | - display: block; |
104 | | - overflow: hidden; |
105 | | - position: absolute; |
106 | | - // Offset the top by the toolbar height |
107 | | - top: 50px; |
108 | | - bottom: 0; |
109 | | - left: 0; |
110 | | - right: 0; |
111 | | -} |
112 | | - |
113 | | -.docs-component-sidenav-inner-content { |
114 | | - display: flex; |
115 | | - flex-direction: column; |
116 | | -} |
117 | | - |
118 | | -.docs-component-sidenav-body-content { |
119 | | - display: flex; |
120 | | - // footer should always reside at the bottom of the screen. |
121 | | - // if container not 100vh, push min height to that minus |
122 | | - // the offset of the top bar and the footer height |
123 | | - min-height: calc(100vh - 264px); |
124 | | -} |
125 | | - |
126 | | -@media (max-width: $small-breakpoint-width) { |
127 | | - // Add specific rule to prevent default rule conflict |
128 | | - .docs-component-viewer-sidenav-container .docs-component-viewer-sidenav { |
129 | | - // offset the top by the header + tabs on a small screen |
130 | | - top: 42px; |
131 | | - } |
132 | | - |
133 | | - .mat-sidenav-content { |
134 | | - // offset the top by the header + tabs on a small screen |
135 | | - margin-top: 42px; |
136 | | - } |
137 | | - |
138 | | - .docs-component-viewer-nav { |
139 | | - position: relative; |
140 | | - top: 0; |
141 | 83 |
|
142 | | - .docs-component-viewer-nav-content { |
143 | | - box-sizing: border-box; |
144 | | - margin: 0; |
145 | | - max-height: initial; |
146 | | - box-sizing: border-box; |
147 | | - } |
| 84 | + // The rule will match the element following the router-outlet which will be the routed component. |
| 85 | + router-outlet + * { |
| 86 | + flex-grow: 1; |
148 | 87 | } |
149 | 88 | } |
0 commit comments