Browse Source

Add CSS to ensure the the content can scroll with a fixed toolbar

Steven Silvester 7 years ago
parent
commit
c7bbbe149d

+ 1 - 0
packages/apputils/src/mainareawidget.ts

@@ -39,6 +39,7 @@ class MainAreaWidget<T extends Widget = Widget> extends Widget {
     this.addClass('jp-MainAreaWidget');
     this.id = uuid();
     let content = this.content = options.content;
+    content.addClass('jp-MainAreaWidget-content');
     if (!content.id) {
       content.id = uuid();
     }

+ 11 - 0
packages/apputils/style/mainareawidget.css

@@ -4,6 +4,17 @@
 | Distributed under the terms of the Modified BSD License.
 |----------------------------------------------------------------------------*/
 
+ .jp-MainAreaWidget {
+   display: block;
+   height: 100%;
+ }
+
+
 .jp-MainAreaWidget > :focus {
   outline: none;
 }
+
+
+.jp-MainAreaWidget-content {
+    height: calc(100% - var(--jp-private-toolbar-height));
+}