Browse Source

Clean up handling of overflow

Steven Silvester 7 years ago
parent
commit
a315504bfd

+ 2 - 1
packages/inspector/style/index.css

@@ -83,11 +83,12 @@
 
 
 .jp-InspectorItem {
+  display: flex;
   border: none;
 }
 
+
 .jp-InspectorItem-content {
-  height: 100%;
   overflow: auto;
   padding: 8px;
 }

+ 6 - 0
packages/tooltip/src/widget.ts

@@ -35,6 +35,11 @@ import {
  */
 const TOOLTIP_CLASS = 'jp-Tooltip';
 
+/**
+ * The class name added to the tooltip content.
+ */
+const CONTENT_CLASS = 'jp-Tooltip-content';
+
 /**
  * The class added to the body when a tooltip exists on the page.
  */
@@ -82,6 +87,7 @@ class Tooltip extends Widget {
 
     this._content = this._rendermime.createRenderer(mimeType);
     this._content.renderModel(model);
+    this._content.addClass(CONTENT_CLASS);
     layout.addWidget(this._content);
   }
 

+ 3 - 3
packages/tooltip/style/index.css

@@ -11,12 +11,12 @@
   max-width: 650px;
   z-index: 10001;
   padding: 4px;
-  overflow: auto;
+  display: flex;
 }
 
 
-.jp-Tooltip > .jp-RenderedText {
-  overflow: visible;
+.jp-Tooltip-content {
+  overflow: auto;
 }