-
Notifications
You must be signed in to change notification settings - Fork 809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[toc2] make toc entries collapsible #1031
Changes from 1 commit
591585b
76f78df
c7551b6
a4aa82f
599e92c
3d5c84f
5fe9cb2
1b6d917
ba2678f
79d4d03
1e93d59
1bd906b
cb63154
84bf6f9
8b79b91
de7293d
973643e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,18 @@ | |
/*background color for links when you mouse over it | ||
This style is used on export, but can be overwritted in the livenotebook | ||
by selecting a color in the nbextension-configurator*/ | ||
#toc-wrapper li > span:hover { | ||
|
||
|
||
|
||
#toc-wrapper ul li span:hover { | ||
background-color: #DAA520; | ||
} | ||
|
||
#toc-level0 a { | ||
/*color: #333333;*/ /* now specified in js */ | ||
text-decoration: none; | ||
} | ||
#navigate_menu li > span:hover {background-color: #f1f1f1} | ||
#navigate_menu ul li span:hover {background-color: #f1f1f1} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see above There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok corrected |
||
|
||
|
||
/* Move menus and tooolbar to the left, following @Kevin-McIsaac suggestion | ||
|
@@ -38,13 +41,13 @@ padding-left: 20px; | |
} | ||
|
||
#navigate_menu li { | ||
padding-left: 2px; | ||
padding-left: 0px; | ||
clear: both; | ||
list-style-type: none; | ||
} | ||
|
||
#navigate_menu-level0 {padding-left: 10px;} | ||
#navigate_menu-level0 ul {padding-left: 10px;} | ||
#navigate_menu-level0 {padding-left: 0px;} | ||
#navigate_menu-level0 ul {padding-left: 0px;} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not familiar with any of the navigate_menu stuff (haven't had it enabled), but now that I've tried it, it seems a bit weird, and is coming out resizable. Perhaps it deserves altering to make it look like all the other notebook menus? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. although, any such modification should probably go into another, separate PR 😅 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes! |
||
|
||
|
||
.toc { | ||
|
@@ -69,6 +72,7 @@ padding-left: 20px; | |
|
||
.toc ul.toc-item { | ||
list-style-type: none; | ||
display: block; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is redundant, display is block anyway There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok |
||
padding: 0; | ||
margin: 0; | ||
} | ||
|
@@ -145,9 +149,18 @@ padding-left: 20px; | |
|
||
/* don't waste so much screen space... */ | ||
|
||
.toc .toc-item .toc-item { | ||
/*.toc .toc-item .toc-item { | ||
padding-left: 1em; | ||
} | ||
*/ | ||
.toc-item ul, li { margin:0; padding:0 } | ||
.toc-item li > span { display:block } | ||
.toc-item li > span { padding-left:0em } | ||
.toc-item li li > span { padding-left:1em } | ||
.toc-item li li li > span { padding-left:2em } | ||
.toc-item li li li li > span { padding-left:3em } | ||
.toc-item li li li li li > span { padding-left:4em } | ||
.toc-item li li li li li li > span { padding-left:5em } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are we adding extra padding, and why separately for various nesting levels?! If desired (is the regular indenting not sufficient?), could this not be handled by adjusting the Also note that this has set margin & padding for all There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks! |
||
|
||
.toc-item-num { | ||
font-style: normal; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, this isn't needed
li span
is sufficient & more efficient, since everyli
is in aul
anyway, while the>
prevents nested child spans from being selected (fewer css redraws, more efficient, hopefully)