wip: separate mobile and low width desktop modes

This commit is contained in:
outfoxxed 2024-10-13 03:19:40 -07:00
parent 9703f832b6
commit d42b26f0b6
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
7 changed files with 32 additions and 26 deletions

View file

@ -6,7 +6,6 @@ html {
font-weight: 400;
height: 100svh;
width: 100svw;
font-synthesis: none;
text-rendering: optimizeLegibility;

View file

@ -86,7 +86,7 @@ ul {
margin-block: 0 !important;
}
@media (min-width: 65rem) {
@media (min-width: 40rem) {
.docs-content {
margin-inline: 1.272rem;

View file

@ -96,7 +96,7 @@ html.dark .nav-shevron {
[data-part="item-content"]>div.__current-type-doc {
background-color: hsl(var(--nav-selected-bkg));
&>a {
& a {
color: hsl(var(--nav-selected-text));
}
}

View file

@ -13,14 +13,13 @@
max-height: 500px;
scrollbar-width: none;
-ms-overflow-style: none;
--width: 30rem;
--width: 25rem;
&::-webkit-scrollbar {
display: none;
}
& svg,
div {
& div {
height: max-content;
width: 100%;
}
@ -37,8 +36,7 @@
left: -1rem;
width: 0;
height: calc(100svh - 2.5rem);
font-size: 0.745rem;
font-weight: 600;
font-size: 1rem;
scrollbar-width: none;
-ms-overflow-style: none;
@ -73,8 +71,7 @@
text-wrap: nowrap;
& [data-part="item-trigger"] {
min-height: 3em;
max-width: 80%;
max-width: 90%;
}
& [data-part="item"] {
@ -94,11 +91,10 @@
}
& [data-part="item-content"] {
max-width: 70%;
max-width: 80%;
margin-left: 3.33em;
& > div {
min-height: 4em;
display: grid;
& a {
@ -115,15 +111,24 @@
}
}
@media (max-width: 55rem) {
.nav-toggle {
--width: 45svw;
}
}
@media (max-width: 38rem) {
@media (max-width: 40rem) {
.nav-toggle {
--width: 100svw;
& svg {
height: max-content;
width: 100%;
}
& .navtree {
& [data-part="item-trigger"] {
min-height: 3em;
}
& [data-part="item-content"] > div {
min-height: 4em;
}
}
}
}

View file

@ -387,7 +387,7 @@ button[data-close-modal] {
--search-cancel-space: 5rem;
}
@media (min-width: 85rem) {
@media (min-width: 40rem) {
/* difault styles */
.search-label {
display: block;

View file

@ -85,9 +85,9 @@
}
}
@media (max-width: 55rem) {
@media (min-width: 40rem) {
.toc-toggle {
--width: 25svw;
--width: 19rem;
}
.toc-wrapper {
@ -101,12 +101,12 @@
}
.toc-wrapper {
--width: 25svw;
--width: 19rem;
background-color: transparent;
display: block;
position: sticky;
top: 4rem;
min-width: max-content;
width: max-content;
max-height: calc(100svh - 8rem);
overflow-y: scroll;
z-index: 10;
@ -144,6 +144,6 @@
@media (min-width: 85rem) {
.toc-wrapper {
width: max-content;
width: 19rem;
}
}

View file

@ -186,11 +186,13 @@ footer {
}
}
@media (min-width: 85rem) {
@media (min-width: 40rem) {
html {
font-size: 16px;
}
}
@media (min-width: 85rem) {
.header-title {
display: block;
}