Bladeren bron

Add application base css file (defines SideBar defaults).

Afshin Darian 8 jaren geleden
bovenliggende
commit
5f76acf0bd
3 gewijzigde bestanden met toevoegingen van 20 en 0 verwijderingen
  1. 12 0
      src/application/base.css
  2. 7 0
      src/application/shell.ts
  3. 1 0
      src/default-theme/index.css

+ 12 - 0
src/application/base.css

@@ -0,0 +1,12 @@
+/*-----------------------------------------------------------------------------
+| Copyright (c) 2014-2016, Jupyter Development Team.
+|
+| Distributed under the terms of the Modified BSD License.
+|----------------------------------------------------------------------------*/
+.jp-SideBar {
+  margin: 0;
+  padding: 0;
+  display: flex;
+  align-items: stretch;
+  list-style-type: none;
+}

+ 7 - 0
src/application/shell.ts

@@ -46,6 +46,11 @@ import {
  */
 const APPLICATION_SHELL_CLASS = 'jp-ApplicationShell';
 
+/**
+ * The class name added to side bar instances.
+ */
+const SIDEBAR_CLASS = 'jp-SideBar';
+
 
 /**
  * The options for adding a widget to a side area of the shell.
@@ -88,7 +93,9 @@ class ApplicationShell extends Widget {
 
     topPanel.id = 'jp-top-panel';
     hsplitPanel.id = 'jp-main-split-panel';
+    leftHandler.sideBar.addClass(SIDEBAR_CLASS);
     leftHandler.sideBar.addClass('jp-mod-left');
+    rightHandler.sideBar.addClass(SIDEBAR_CLASS);
     rightHandler.sideBar.addClass('jp-mod-right');
     leftHandler.stackedPanel.id = 'jp-left-stack';
     rightHandler.stackedPanel.id = 'jp-right-stack';

+ 1 - 0
src/default-theme/index.css

@@ -2,6 +2,7 @@
 | Copyright (c) Jupyter Development Team.
 | Distributed under the terms of the Modified BSD License.
 |----------------------------------------------------------------------------*/
+@import url('~jupyterlab/lib/application/base.css');
 @import url('~jupyterlab/lib/console/base.css');
 @import url('~jupyterlab/lib/notebook/index.css');
 @import url('~jupyterlab/lib/notebook/theme.css');