@@ -21,21 +21,24 @@ body {
2121 height : 100% ;
2222
2323 #edit-layout {
24- flex : 1 ;
2524 display : flex ;
2625 flex-direction : row ;
26+ overflow : auto ;
27+ flex-grow : 1 ;
2728
2829 #edit-sidebar {
2930 width : 0 ;
3031 display : flex ;
3132 overflow : visible ;
3233 flex-direction : column ;
34+ align-self : stretch ;
3335
3436 // When expanded, expand #edit-sidebar-inner.
35- & .expanded {
36- #edit-sidebar-inner {
37- width : 300px ;
38- }
37+ #edit-sidebar-inner {
38+ width : 0 ;
39+ }
40+ & .expanded #edit-sidebar-inner {
41+ width : 300px ;
3942 }
4043
4144 #edit-sidebar-inner {
@@ -45,98 +48,103 @@ body {
4548 background : #eee ;
4649 z-index : 1000 ;
4750 border-right : 1px #999 solid ;
51+
4852 display : flex ;
49- flex : 1 ;
5053 flex-direction : column ;
54+ height : 100% ;
5155
52- width : 0 ;
53-
56+ // To fix all contents at 300px even when animating the drawer
57+ // opening, this inner item re-fixes the width at 300px.
5458 #edit-sidebar-inner-inner {
55- box-sizing : border-box ;
5659 width : 300px ;
5760 display : flex ;
5861 flex : 1 ;
5962 flex-direction : column ;
63+ overflow : auto ;
6064
61- #recently-viewed {
62- padding : 1px 20px ;
63- flex : 1 ;
64- overflow : auto ;
65- }
66-
67- #edit-sidebar-footer {
68- flex : 0 ;
69- margin : 0 15px ;
70- }
65+ // Scrollable contents inside here.
7166 }
7267 }
68+ }
7369
74- #edit-sidebar-footer {
75- border-top : 1px solid #ccc ;
76- padding : 9px 10px 17px ;
77- text-align : center ;
78- font-size : 0.9em ;
79- opacity : 0.6 ;
80- }
70+ #edit-outer {
71+ flex : 1 ;
72+ overflow : auto ;
73+ }
74+ }
75+ }
8176
82- #recently-viewed {
83- p {
84- font-size : 1.2em ;
85- margin : 1.3em 0 0.5em ;
86- font-weight : 500 ;
87- color : #444 ;
88- }
77+ // Edit sidebar styling
78+ #edit-sidebar {
79+ #edit-sidebar-footer {
80+ flex : 0 ;
81+ margin : 0 15px ;
82+ border-top : 1px solid #ccc ;
83+ padding : 9px 10px 17px ;
84+ text-align : center ;
85+ font-size : 0.9em ;
86+ opacity : 0.6 ;
87+ }
8988
90- #edit-sidebar-new {
91- float : right ;
92- margin-top : -4px ;
93-
94- button {
95- border : 1px solid #aaa ;
96- background : #fff ;
97- font-size : 12px ;
98- padding : 5px 10px ;
99- text-transform : uppercase ;
100- box-shadow : 2px 2px 2px rgba (0 , 0 , 0 , 0.1 );
101- cursor : pointer ;
102- }
103- }
89+ #edit-sidebar-scrollable {
90+ overflow : auto ;
91+ flex-grow : 1 ;
10492
105- #recently-viewed-list :empty ::after {
106- content : ' No documents to display.' ;
93+ #recently-viewed {
94+ padding : 1px 20px ;
95+ margin-bottom : 20px ;
96+
97+ p {
98+ font-size : 1.2em ;
99+ margin : 1.3em 0 0.5em ;
100+ font-weight : 500 ;
101+ color : #444 ;
102+ }
103+
104+ #edit-sidebar-new {
105+ float : right ;
106+ margin-top : -4px ;
107+
108+ button {
109+ border : 1px solid #aaa ;
110+ background : #fff ;
111+ font-size : 12px ;
112+ padding : 5px 10px ;
113+ text-transform : uppercase ;
114+ box-shadow : 2px 2px 2px rgba (0 , 0 , 0 , 0.1 );
115+ cursor : pointer ;
107116 }
117+ }
108118
109- #recently-viewed-list > * {
110- a { text-decoration : none ; }
111- & :hover a { text-decoration : underline ; }
119+ #recently-viewed-list :empty ::after {
120+ content : ' No documents to display. ' ;
121+ }
112122
113- a {
114- display : block ;
115- text-overflow : ellipsis ;
116- white-space : nowrap ;
117- overflow : hidden ;
123+ #recently-viewed-list > * {
124+ a { text-decoration : none ; }
125+ & :hover a { text-decoration : underline ; }
118126
119- padding : 0.5em 0 0.25em 0.4em ;
127+ a {
128+ display : block ;
129+ text-overflow : ellipsis ;
130+ white-space : nowrap ;
131+ overflow : hidden ;
120132
121- font-size : 18px ;
122- & :not (:hover ) {
123- color : #000000 ;
124- }
125- }
133+ padding : 0.5em 0 0.25em 0.4em ;
126134
127- a ::before {
128- content : ' \01F4CB ' ;
129- margin-right : 13px ;
130- filter : grayscale (60% ) contrast (130% );
131- opacity : 0.8 ;
135+ font-size : 18px ;
136+ & :not (:hover ) {
137+ color : #000000 ;
132138 }
133139 }
134- }
135- }
136140
137- #edit-outer {
138- flex : 1 ;
139- overflow : auto ;
141+ a ::before {
142+ content : ' \01F4CB ' ;
143+ margin-right : 13px ;
144+ filter : grayscale (60% ) contrast (130% );
145+ opacity : 0.8 ;
146+ }
147+ }
140148 }
141149 }
142150}
0 commit comments