You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
docs/sass/elements.scss

308 lines
5.8 KiB
SCSS

@import "colors";
body.search-mode {
.ariane { display: none; }
.toc { display: none; }
.page-title { display: none; }
.linktable { display: none; }
.ref-block { display: none; }
.alert { display: none; }
}
.alert {
&.alert-wip {
background-color: $alert-wip;
}
&.alert-deprecated {
background-color: $alert-deprecated;
}
&.alert-todo {
background-color: $alert-todo;
}
background-color: $dark-3;
border-radius: 20px;
text-align: center;
padding: 2rem;
margin: 2rem 0;
.alert-title {
font-weight: bold;
font-size: 22px;
}
}
.markdown {
line-height: 1.8;
> p > img, > p > a > img {
max-width: 100%;
display: block;
margin: auto;
}
> table {
width: 100%;
text-align: left;
border-collapse: collapse;
margin-bottom: 3rem;
th {
border-top: 1px solid gray;
border-bottom: 1px solid gray;
}
td:first-child, th:first-child {
border-left: 1px solid gray;
}
tbody:first-child {
border-top: 1px solid gray;
}
tr:last-child > th, tr:last-child > td {
border-bottom: 1px solid gray;
}
td, th {
border-right: 1px solid gray;
border-bottom: 1px solid #77777739;
padding: 2px;
padding-left: 8px;
}
tr:nth-child(even) {
background-color: $dark-3;
}
}
&.links {
.zola-anchor {
opacity: 0;
transition: all 0.4s;
margin-right: 6px;
font-size: 20px;
}
h1:hover, h2:hover, h3:hover, h4:hover, h5:hover, h6:hover {
.zola-anchor {
opacity: 0.75;
}
}
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
margin-left: -26px;
}
> h1 { font-size: 38px; }
> h2 { font-size: 35px; }
> h3 { font-size: 33px; }
> h4 { font-size: 28px; }
> h5 { font-size: 25px; }
> h6 { font-size: 22px; }
}
pre {
background-color: $dark-3 !important;
padding: 10px;
border-radius: 4px;
code {
padding: 0;
background-color: transparent;
}
line-height: 1.25;
overflow-x: auto;
}
code {
display: initial;
background-color: $dark-3;
padding: 3px;
border-radius: 2px;
}
blockquote {
border-left: grey 0.2em solid;
padding: 0 0 0 1.6em;
margin: 1.6em 0 1.6em;
border-radius: 2px;
}
ul, li {
line-height: 1.7;
}
a, .page__content a {
color: $link;
transition: color 0.2s linear, background-size 350ms;
&:hover {
text-decoration: none;
}
&.deadlink {
color: $deadlink;
background: linear-gradient(0deg, $deadlink, $deadlink) no-repeat right bottom / 0 1px !important;
}
&:not([class]), &.tag, &.deadlink {
background: linear-gradient(0deg, $link, $link) no-repeat right bottom / 0 1px;
&:where(:hover, :focus-visible) {
background-size: 100% 1px !important;
background-position-x: left !important;
}
}
&.white {
color: whitesmoke;
&:hover {
color: whitesmoke;
}
&.visible:hover {
color: darken(whitesmoke, 20%);
}
}
}
}
.ref-block {
background-color: $dark-3;
padding: 10px;
border-radius: 2px;
}
.markdown .linktable {
margin-bottom: 0;
th {
font-size: 18px;
}
th.table-head {
font-size: 20px;
}
th.longrow {
text-align: center;
}
th:not(.table-head) {
}
th, td {
border-top: 1px solid gray;
border-bottom: 1px solid gray;
}
}
.menu {
height: calc(100% - 64px);
background: $dark-3-opaque;
color: whitesmoke;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.08),0 4px 4px rgba(0, 0, 0, 0.08);
ul li.section-title {
font-size: 18px;
text-align: center;
}
ul li.active > a {
color: whitesmoke;
font-weight: bold;
background-color: $dark-1;
}
ul a {
color: whitesmoke;
&.deadlink {
background-color: $deadlink-bg;
}
}
}
.no-menu {
display: none;
~ .page {
width: 100%;
left: 0;
.menu-icon {
display: none;
}
}
}
.menu-hidden ~ .page {
left: 0;
width: 100%;
}
.page {
background: $dark-2;
color: whitesmoke;
height: calc(100% - 64px);
}
.page__content code {
background: $dark-3-opaque;
color: whitesmoke;
}
.page__header {
position: sticky;
top: 0;
}
.page__header .menu-icon span {
background-color: rgba(255,255,255, 0.6);
}
.page__header .menu-icon:hover span {
background-color: rgba(255,255,255, 0.75);
}
.page__header .edit-icon a {
margin: 2rem;
color: white;
opacity: 0.5;
transition: all 0.2s;
text-decoration: none;
&:hover {
opacity: 0.8;
}
}
.menu-flex {
display: flex;
justify-content: space-between;
align-items: center;
}
.search-container #search {
border: #333;
background-color: $dark-3-opaque;
color: whitesmoke;
}
.toc {
background-color: $dark-3;
border-radius: 10px;
padding: 1.5rem 2rem;
margin-bottom: 2.5rem;
.toc-title {
text-align: center;
font-size: 24px;
width: 100%;
}
}
.ariane {
background-color: $dark-3;
border-radius: 10px;
padding: 1.5rem 2rem;
margin-bottom: 2.5rem;
}
.page .previous:hover, .page .next:hover {
color: #fff;
}
body {
height: calc(100% - 64px);
}