Skip to content
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

Fix 'Show/Hide TOC' glitch in dark mode #2

Merged
merged 1 commit into from
Apr 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.PHONY: \
all docs
all docs release

all: docs

Expand All @@ -22,3 +22,6 @@ docs-serve:
docfx/docfx.exe:
wget -qO- https://github.com/dotnet/docfx/releases/download/v2.51/docfx.zip | busybox unzip - -d docfx
chmod +x docfx/docfx.exe

release: all
zip -9r darkerfx-`git describe --tags --abbrev=0`.zip darkerfx/
10 changes: 10 additions & 0 deletions darkerfx/partials/toc.tmpl.partial
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}

<div class="sidenav hide-when-search">
<div class="toc-toggle">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
</div>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
32 changes: 31 additions & 1 deletion darkerfx/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ body.theme-dark {
--theme-sidenav-border: #404040;
--theme-sidenav-background: #2d2d30;
--theme-sidenav-filter-background: #1d1d1d;
--theme-sidenav-toc-toggle-background: #1d1d1d;
--theme-sidenav-toc-toggle-hover: #fff;
--theme-toc-hover: #fff;
--theme-background: #2d2d30;
--theme-body-background: #171717;
Expand Down Expand Up @@ -54,6 +56,8 @@ body.theme-light {
--theme-sidenav-border: #e7e7e7;
--theme-sidenav-background: #f1f1f1;
--theme-sidenav-filter-background: #ffffff;
--theme-sidenav-toc-toggle-background: #f1f1f1;
--theme-sidenav-toc-toggle-hover: #337ab7;
--theme-toc-hover: #4c4c4c;
--theme-background: #ffffff;
--theme-body-background: #ffffff;
Expand Down Expand Up @@ -138,8 +142,34 @@ article h4 {
background-color: var(--theme-sidenav-background);
}

.sidenav {
background-color: var(--theme-sidenav-background);
padding-top: 0;
}

.sidenav>div.toc-toggle {
background-color: var(--theme-sidenav-toc-toggle-background);
margin: 0;
padding-top: 0px;
}

.sidenav a.toc-toggle {
color: var(--theme-navbar);
}

.sidenav a.toc-toggle:focus,
.sidenav a.toc-toggle:hover {
color: var(--theme-sidenav-toc-toggle-hover);
}

.sidenav>.sidetoggle {
background-color: var(--theme-sidenav-background);
}

body.theme-dark {
button, a {

button,
a {
color: #5999d8;
}

Expand Down