matrix.org/sass/_docs.scss
Moritz Stückler d66ea87056
fix: clipped information banner on small viewports (#2878)
* fix: clipped information banner on small viewports

Signed-off-by: Moritz Stückler <moritz@bitbetter.de>

* fix: remove unused css

Signed-off-by: Moritz Stückler <moritz@bitbetter.de>

* fix: remove empty lines

* fix: remove empty lines

* fix: remove empty lines

* fix: remove empty lines

* fix: show toc on mobile

* fix: toc order

* fix: wrong order

* Update sass/_docs.scss

Co-authored-by: Kim Brose <2803622+HarHarLinks@users.noreply.github.com>

* Update sass/_docs.scss

Co-authored-by: Kim Brose <2803622+HarHarLinks@users.noreply.github.com>

---------

Signed-off-by: Moritz Stückler <moritz@bitbetter.de>
Co-authored-by: Kim Brose <2803622+HarHarLinks@users.noreply.github.com>
2025-08-14 11:00:44 +02:00

169 lines
3 KiB
SCSS

header {
margin-bottom: 1em;
h1 {
margin-bottom: 0;
}
.metadata {
font-size: 0.8rem;
}
}
.docs-body {
width: 100%;
display: flex;
flex-direction: column;
align-items: start;
@media (min-width: 767px) {
flex-direction: row;
}
--docs-menu-width: 18rem;
}
.docs-menu {
position: static;
overflow-y: auto;
background-color: #fff;
border-bottom: 1px solid var(--borders-color);
width: 100%;
order: 2;
@media (min-width: 767px) {
border-bottom: 0;
border-right: 1px solid var(--borders-color);
flex-direction: row;
position: sticky;
top: 95px;
height: 100svh;
max-width: var(--docs-menu-width);
order: 1;
}
.docs-menu-inner {
padding: 1.5rem;
}
.submenu-checkbox {
display: none;
&:not(:checked) ~ .section-submenu-wrap {
display: none;
}
&:not(:checked) ~ .submenu-title {
.arrow {
background-image: url("/assets/down-arrow.svg");
width: 1rem;
height: 1rem;
margin: auto 0;
}
}
&:checked ~ .submenu-title {
.arrow {
background-image: url("/assets/up-arrow.svg");
width: 1rem;
height: 1rem;
margin: auto 0;
}
}
}
.submenu-title {
display: flex;
flex-direction: row;
gap: 0.8rem;
font-size: 1.2rem;
font-weight: 700;
cursor: pointer;
user-select: none;
}
ul {
padding-inline-start: 0;
list-style: none;
li {
margin-inline-start: 1em;
margin-block: 0.5em;
ul {
border-left: 1px solid #bbb;
li:hover {
color: var(--color-link);
text-decoration: underline;
}
}
}
a {
color: var(--color-text);
}
}
}
.docs-content {
flex: 1;
order: 2;
@media (min-width: 767px) {
order: 1;
}
article p img {
max-width: 100%;
margin-inline: auto;
}
}
#docs-menu-checkbox:not(:checked) ~ .docs-menu {
@media (max-width: 767px) {
display: none;
}
}
#docs-menu-checkbox:checked ~ .docs-content {
@media (max-width: 767px) {
display: none;
}
}
.mjolnir_button {
border: 1px solid rgb(217, 217, 217);
border-radius: 1000px;
padding: 0 0.4rem;
background-color: rgb(242, 247, 252);
}
figure {
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
margin-inline: 0;
padding: 1rem;
border: 1px solid #dedede;
border-radius: 4px;
img {
max-width: 100%;
max-height: 100%;
}
figcaption {
font-size: 0.8rem;
text-align: center;
}
}
.hidden {
display: none;
}