Skip to content

Commit de99bdd

Browse files
committed
style
1 parent a781b29 commit de99bdd

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

src/Elastic.Markdown/Assets/styles.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,17 @@
3737

3838
scrollbar-gutter: stable;
3939
}
40+
41+
42+
#pages-nav li.current {
43+
position: relative;
44+
&::before {
45+
content: "";
46+
position: absolute;
47+
top: 50%;
48+
left: -1px;
49+
width: calc(var(--spacing) * 6);
50+
height: 1px;
51+
background-color: var(--color-gray-300);
52+
}
53+
}

src/Elastic.Markdown/Slices/Layout/_TocTreeNav.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
{
1010
var f = file.File;
1111
var isCurrent = f == Model.CurrentDocument;
12-
<li class="block ml-2 pl-2 w-full border-l-1 @(isCurrent ? "current border-l-gray-400" : "border-l-gray")">
12+
<li class="block ml-2 pl-2 w-full border-l-1 group @(isCurrent ? "current border-l-gray-300" : "border-l-gray-300")">
1313
<div class="flex">
1414
<div class="w-5">
1515
</div>
1616
<a
17-
class="block py-1 text-sm leading-[1.2em] tracking-[-0.02em] hover:text-ink-dark @(isCurrent ? "text-blue-elastic!" : string.Empty)"
17+
class="block py-1 text-sm leading-[1.2em] tracking-[-0.02em] group-[.current]:text-blue-elastic! hover:text-ink-dark"
1818
href="@f.Url">
1919
@f.NavigationTitle
2020
</a>
@@ -29,7 +29,7 @@
2929
const int initialExpandLevel = 1;
3030
var containsCurrent = g.HoldsCurrent(Model.CurrentDocument) || g.ContainsCurrentPage(Model.CurrentDocument);
3131
var shouldInitiallyExpand = containsCurrent || g.Depth <= initialExpandLevel;
32-
<li class="flex flex-wrap ml-2 pl-2 @(g.Depth > 1 ? "border-l-1 border-l-gray" : string.Empty)">
32+
<li class="flex flex-wrap ml-2 pl-2 @(g.Depth > 1 ? "border-l-1 border-l-gray-300" : string.Empty)">
3333
<label for="@slug" class="peer group flex items-center mr-1">
3434
<svg
3535
xmlns="http://www.w3.org/2000/svg"

0 commit comments

Comments
 (0)