wiki/assets/css/style.scss
Pk11 163e81a3c7 Initial site
TWiLight wiki + NightScript's DS Index in English
and a couple pages in Japanese for testing
2020-12-20 22:18:48 -06:00

369 lines
6.1 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;
}
// .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 {
text-decoration: 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(--code-bg);
border-color: var(--code-bg);
}
// 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: 1em;
}
// 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(--borders);
}
table tr:nth-child(2n) {
background-color: var(--table-alt-bg);
}
@media only screen and (min-width: 576px) {
// Only right align language dropdown when sm+
.language-dropdown {
position: absolute;
right: 5px;
}
.dropdown-menu-end-sm {
--bs-position: end;
right: 0;
left: auto;
}
}
@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;
}
}