Adjust styles to look like existing spacing

This commit is contained in:
Alex Shpak 2025-05-31 00:54:49 +02:00
parent 2acd86a6c2
commit 24d3465980
3 changed files with 15 additions and 9 deletions

View File

@ -49,11 +49,11 @@ aside nav ul {
list-style: none; list-style: none;
li { li {
margin: 1em 0;
position: relative; position: relative;
} }
a { a, span {
padding: .5em 0;
display: block; display: block;
} }
@ -136,10 +136,12 @@ a .book-icon {
input.toggle + label::after { input.toggle + label::after {
content: ""; content: "";
align-self: center;
} }
input.toggle:checked + label::after { input.toggle:checked + label::after {
content: ""; content: "";
align-self: center;
} }
} }
@ -155,7 +157,7 @@ body[dir="rtl"] .book-menu {
} }
.book-section-flat { .book-section-flat {
margin: $padding-16 * 2 0; margin: $padding-16 0;
> a, > a,
> span, > span,
@ -210,7 +212,7 @@ body[dir="rtl"] .book-menu {
.book-search { .book-search {
position: relative; position: relative;
margin: $padding-16 0; margin: $padding-8 0;
border-bottom: 1px solid transparent; border-bottom: 1px solid transparent;
input { input {
@ -244,6 +246,10 @@ body[dir="rtl"] .book-menu {
@include spin(1s); @include spin(1s);
} }
ul a {
padding-bottom: 0;
}
small { small {
opacity: 0.5; opacity: 0.5;
} }
@ -280,7 +286,7 @@ body[dir="rtl"] .book-menu {
} }
.book-languages { .book-languages {
margin-block-end: $padding-16 * 2; margin-bottom: $padding-16;
ul { ul {
padding-inline-start: 1.5em; padding-inline-start: 1.5em;

View File

@ -13,8 +13,8 @@
<ul class="book-languages"> <ul class="book-languages">
<li> <li>
<input type="checkbox" id="languages" class="toggle" /> <input type="checkbox" id="languages" class="toggle" />
<label for="languages" class="flex justify-between"> <label for="languages" class="flex">
<a role="button" class="flex align-center"> <a role="button" class="flex flex-auto">
<img src="{{ "svg/translate.svg" | relURL }}" class="book-icon" alt="Languages" /> <img src="{{ "svg/translate.svg" | relURL }}" class="book-icon" alt="Languages" />
{{ $.Site.Language.LanguageName }} {{ $.Site.Language.LanguageName }}
</a> </a>

View File

@ -30,8 +30,8 @@
{{ if .Page.Params.BookCollapseSection }} {{ if .Page.Params.BookCollapseSection }}
<input type="checkbox" id="section-{{ md5 .Page }}" class="toggle" {{ if or $current $ancestor }}checked{{ end }} /> <input type="checkbox" id="section-{{ md5 .Page }}" class="toggle" {{ if or $current $ancestor }}checked{{ end }} />
<label for="section-{{ md5 .Page }}" class="flex justify-between"> <label for="section-{{ md5 .Page }}" class="flex">
<a {{ if .Page.Content }}href="{{ .Page.RelPermalink }}"{{ else }}role="button"{{ end }} class="{{ if $current }}active{{ end }}"> <a {{ if .Page.Content }}href="{{ .Page.RelPermalink }}"{{ else }}role="button"{{ end }} class="flex-auto {{ if $current }}active{{ end }}">
{{- partial "docs/title" .Page -}} {{- partial "docs/title" .Page -}}
</a> </a>
</label> </label>