wiki/assets/css/style.scss
Pk11 aaedb9c3fd Add installing and updating index pages to sidebar
I'm really not sure where's best to put these... For now I've put them in an "Indexes" section, but other ideas are welcome
2021-03-25 00:08:49 -05:00

514 lines
8.4 KiB
SCSS

---
---
@import url("light.css");
@import url("dark.css") (prefers-color-scheme: dark);
// For the bottom aligned footer
html, body {
height: 100%;
}
body {
display: flex;
flex-direction: column;
}
.content {
flex: 1 0 auto;
}
footer {
flex-shrink: 0;
padding-top: 20px;
}
body {
color: var(--main-color);
background-color: var(--main-bg);
}
h1, h2, h3, h4, h5, h6 {
color: var(--header-color);
}
h2 {
border-bottom: 1px solid var(--borders);
}
blockquote {
color: var(--blockquote-color);
margin-bottom: 20px;
padding: 0 0 0 20px;
border-left: 3px solid var(--borders);
}
code {
color: var(--code-color);
background-color: var(--code-bg);
padding: 3px;
border-radius: 0.25rem;
white-space: nowrap;
}
// .a is for making other things look like <a>s
a, .a {
text-decoration: none;
text-decoration-thickness: 1px;
color: var(--a-color);
cursor: pointer;
}
a:hover, .a:hover {
text-decoration: underline;
}
a.clean {
text-decoration: none;
}
footer a {
color: inherit;
font-weight: bold;
text-decoration: underline;
}
footer a:hover {
color: inherit;
opacity: 50%;
}
small {
font-size: 75%;
color: var(--small-color);
}
img {
max-width: 100%;
height: auto;
}
.btn, .btn a, a.btn {
text-decoration: none;
}
.btn:focus {
box-shadow: none;
}
div .btn-primary:hover {
background-color: inherit;
opacity: inherit;
}
// Override bootstraps primary color
.bg-primary {
background-color: var(--primary)!important;
}
.btn-primary, .btn-primary:focus {
color: var(--nav-link-color);
background-color: var(--primary)!important;
border-color: var(--primary)!important;
}
.btn-primary:hover, .btn-primary:active {
color: var(--nav-link-color)!important;
opacity: 0.8;
}
.btn-outline-primary {
color: var(--primary);
border-color: var(--primary);
}
.btn-outline-primary:hover, .btn-outline-primary:active {
background-color: var(--primary)!important;
border-color: var(--primary)!important;
}
.text-primary {
background-color: var(--primary)!important;
}
// Override the secondary text color
.btn-outline-secondary {
color: var(--main-color);
}
.alert-secondary {
color: var(--code-color);
background-color: var(--alert-secondary-bg);
border-color: var(--alert-secondary-border);
}
// Override the dark text too
.text-dark {
color: var(--dark)!important;
}
// And the light bg
.bg-light {
background-color: var(--light)!important;
border-color: var(--light-border)!important;
}
.bg-light::placeholder {
color: var(--light-placeholder);
}
// No underline on navbar links
.navbar a {
text-decoration: none;
}
// Dim navbar-brand on hover
.navbar a.navbar-brand:hover {
opacity: 0.5;
}
// Override nav-link color
.navbar .nav-link {
color: var(--nav-link-color)!important;
}
.navbar .nav-link:hover {
color: var(--nav-link-color-hover)!important;
}
// And the active nav-link color
.navbar .nav-link.active {
color: var(--nav-link-color-active)!important;
}
.navbar .nav-link.active:hover {
color: var(--nav-link-color-hover)!important;
}
// Make dropdowns site-colored and animated
.dropdown-menu, .dropdown .hover-content {
background-color: var(--primary);
-webkit-transition: 300ms ease;
transition: 300ms ease;
display: block;
height: 0;
padding: 0;
overflow: hidden;
visibility: hidden;
line-height: 0;
margin: 0;
}
.dropdown .hover-content {
display: none;
}
.dropdown-menu.show, .dropdown:hover .hover-content {
display: block;
height: inherit;
line-height: inherit;
padding: 0.5rem 0;
visibility: visible;
}
.dropdown-item {
color: var(--nav-link-color);
}
.dropdown-item.active {
background-color: unset;
}
.dropdown-item:hover, .dropdown-item:active, .dropdown-item:focus {
background-color: var(--dropdown-item-bg-hover);
color: var(--nav-link-color-hover);
}
// Make images smaller
.img-small {
max-width: 250px;
max-height: 250px;
}
.btn-back {
position: absolute;
left: 5px;
margin: 5px 0;
font-size: 8pt;
padding: 5px;
z-index: 10;
}
// Input box
.input-group-text {
color: var(--light-placeholder);
background-color: var(--light);
border-color: var(--light-border);
}
.form-control, .form-control:focus, .form-control::placeholder {
color: var(--light-placeholder);
background-color: var(--light);
border-color: var(--light-border);
}
// Cards
.card {
background-color: inherit;
}
.card a {
text-decoration: none;
font-weight: normal;
}
.card:hover a h4 {
color: inherit;
}
.card-footer a {
text-decoration: underline;
}
.card-image {
max-height: 128px;
}
.card-image-header {
height: 145px;
display: flex;
align-items: center;
justify-content: center;
}
.card {
background-color: var(--card-background);
}
.card-header, .card-footer {
background-color: var(--card-edges-background);
}
.pointer {
cursor: pointer;
}
.qr-image {
border-radius: 1rem;
}
.modal-content {
background-color: var(--main-bg);
}
.modal-header {
border-bottom: var(--modal-borders);
}
.modal-footer {
border-top: var(--modal-borders);
}
.carousel-label {
background-color: var(--carousel-caption-bg);
border-radius: 10px;
}
.li-bullet {
list-style: disc;
margin-left: 1.25em;
}
html[dir=rtl] .li-bullet {
list-style: disc;
margin-left: 0;
margin-right: 1.5em;
}
// Hide header anchors unless hovering the header
.header-anchor {
text-decoration: none;
display: none;
}
h1:hover .header-anchor,
h2:hover .header-anchor,
h3:hover .header-anchor,
h4:hover .header-anchor,
h5:hover .header-anchor,
h6:hover .header-anchor {
display: inline;
text-decoration: none;
}
// Tables
table {
margin-bottom: 1em;
}
table th {
text-align: center;
}
table th, table td {
padding: 6px 13px;
border: 1px solid var(--light-borders);
}
table tr:nth-child(2n) {
background-color: var(--table-alt-bg);
}
// Fix bootstrap messing up the th bottom borders and dark mode text
.table>:not(:last-child)>:last-child>* {
border-bottom-color: var(--light-borders);
}
.table {
color: inherit;
}
// Buttons
kbd {
padding: 3px 6px;
font: 11px SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;
line-height: 10px;
color: var(--main-color);
vertical-align: middle;
background-color: var(--kbd-bg);
border: 1px solid var(--kbd-border);
border-radius: 6px;
box-shadow: inset 0 -1px 0 var(--kbd-border);
}
kbd.l {
border-radius: 15px 6px 6px 6px;
padding-left: 8px;
}
kbd.r {
border-radius: 6px 15px 6px 6px;
padding-right: 8px;
}
kbd.face {
border-radius: 15px;
}
// Sidebar
.sidebar-container {
font-size: 0.9rem;
border: 1px solid var(--borders);
}
.sidebar-container ul {
margin-bottom: 0;
}
.sidebar-container li {
padding-bottom: 0.25rem;
}
// Details
:not(li) > details {
margin-bottom: 1rem;
}
.details-content {
background-color: var(--details-bg);
margin-left: 1rem;
padding: 0.5rem;
border-radius: 0.5rem;
}
// Footnotes
.footnotes li p {
margin-bottom: 0.25rem;
}
a.footnote {
unicode-bidi: isolate;
}
a.footnote::before {
content: "[";
}
a.footnote::after {
content: "]";
}
// Alerts
.small-alert {
padding: 0.5rem 1rem;
}
// Fixes for alerts of opposite text direction
.alert-dismissible[dir=ltr] {
padding-left: 1rem;
}
.alert-dismissible[dir=rtl] {
padding-right: 1rem;
}
.alert-dismissible[dir=ltr] .btn-close {
left: unset;
right: 0;
}
.alert-dismissible[dir=rtl] .btn-close {
left: 0;
right: unset;
}
// Tabs
.tab-container {
display: flex;
flex-wrap: wrap;
}
.tab-container > .tab {
display: none;
order: 99;
padding-top: 1rem;
width: 100%;
}
input:checked+label+.tab {
display: block;
}
.tab-container > label {
margin-right: 0.25rem;
}
input:checked+label.btn-outline-secondary {
color: #fff;
background-color: #6c757d;
border-color: #6c757d;
}
input:checked+label.btn-outline-secondary:hover, input:checked+label.btn-outline-secondary:active, input:checked+label.btn-outline-secondary:focus {
color: #fff;
background-color: #5c636a;
border-color: #565e64;
}
@media only screen and (min-width: 576px) {
// Version of .position-absolute that only triggers for sm+
.position-absolute-sm {
position: absolute!important;
}
// Seems to be broken in RTL in bootstrap v5.0-beta1, so override here
html[dir=rtl] .dropdown-menu-sm-end {
--bs-position: end;
right: auto;
left: 0;
}
}
@media only screen and (min-width: 1024px) {
.main-content {
max-width: 1024px;
}
}
@media only screen and (min-width: 1200px) {
.main-content {
max-width: 1200px;
}
}
@media only screen and (min-width: 1600px) {
.main-content {
max-width: 75%;
}
}
@media only screen and (max-width: 757px) {
.dropdown-menu {
border: 0;
}
.dropdown-item {
font-weight: bold;
}
.dropdown-item:hover {
background-color: inherit;
}
}