浏览代码

Change color on hover

Martha Cryan 4 年之前
父节点
当前提交
15679c5b88
共有 2 个文件被更改,包括 4 次插入1 次删除
  1. 1 0
      packages/toc/src/toc.tsx
  2. 3 1
      packages/toc/style/index.css

+ 1 - 0
packages/toc/src/toc.tsx

@@ -72,6 +72,7 @@ export class TableOfContents extends Widget {
       this._monitor.dispose();
       this._monitor = null;
     }
+    console.log(this._current);
     // If we are wiping the ToC, update and return...
     if (!this._current) {
       this.update();

+ 3 - 1
packages/toc/style/index.css

@@ -173,7 +173,9 @@
 }
 
 .toc-entry-holder:hover .toc-Collapser-child {
-  background: var(--jp-layout-color2);
+  box-shadow: var(--jp-elevation-z2);
+  background: var(--jp-brand-color1);
+  opacity: var(--jp-cell-collapser-not-active-hover-opacity);
 }
 
 .toc-active-cell .toc-Collapser-child {