portails/assets/scss/common/_dark.scss

562 lines
13 KiB
SCSS
Raw Normal View History

2020-04-15 15:48:16 +02:00
/** Theme variables */
2020-11-04 08:26:58 +01:00
// Source: https://material.io/design/color/dark-theme.html
$body-bg-dark: $gray-900;
$body-overlay-dark: darken($body-bg-dark, 2.5%);
2021-09-07 12:08:46 +02:00
/*
2020-11-04 08:26:58 +01:00
$border-dark: darken($body-bg-dark, 2.5%);
2021-09-07 12:08:46 +02:00
*/
$border-dark: $gray-800;
2020-11-04 08:26:58 +01:00
$body-color-dark: $gray-300;
$dots-dark: darken($body-color-dark, 50%);
$link-color-dark: $blue-300;
$button-color-dark: $link-color-dark;
$focus-color-dark: lighten($link-color-dark, 2.5%);
$navbar-dark-color: $body-color-dark;
$navbar-dark-hover-color: $link-color-dark;
$navbar-dark-active-color: $link-color-dark;
2020-04-15 15:48:16 +02:00
/** Theme styles */
2021-09-07 12:08:46 +02:00
[data-dark-mode] body {
2020-04-15 15:48:16 +02:00
background: $body-bg-dark;
color: $body-color-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body a {
2020-04-15 15:48:16 +02:00
color: $link-color-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body a.text-body {
2020-11-04 08:26:58 +01:00
color: $body-color-dark !important;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .btn-primary {
2020-11-04 08:26:58 +01:00
@include button-variant($button-color-dark, $button-color-dark);
color: $body-bg-dark !important;
2020-04-15 15:48:16 +02:00
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .btn-outline-primary {
2021-03-15 18:55:49 +01:00
@include button-outline-variant($button-color-dark, $button-color-dark);
color: $link-color-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .btn-outline-primary:hover {
2021-03-15 18:55:49 +01:00
color: $body-bg-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .btn-doks-light {
color: $navbar-dark-color;
}
[data-dark-mode] body .show > .btn-doks-light,
[data-dark-mode] body .btn-doks-light:hover,
[data-dark-mode] body .btn-doks-light:active {
color: $link-color-dark;
}
[data-dark-mode] body .btn-menu svg {
color: $body-color-dark;
}
[data-dark-mode] body .doks-sidebar-toggle {
color: $navbar-dark-color;
}
[data-dark-mode] body .btn-menu:hover,
[data-dark-mode] body .btn-doks-light:hover,
[data-dark-mode] body .doks-sidebar-toggle:hover {
background: $body-overlay-dark;
}
2021-09-15 14:36:51 +02:00
/*
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .dropdown-menu {
@extend .dropdown-menu-dark;
}
2021-09-15 14:36:51 +02:00
*/
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .navbar,
[data-dark-mode] body .doks-subnavbar {
background-color: rgba(33, 37, 41, 0.95);
2020-04-15 15:48:16 +02:00
border-bottom: 1px solid $border-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body.home .navbar {
2020-04-15 15:48:16 +02:00
border-bottom: 0;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .offcanvas-header {
border-bottom: 1px solid $gray-800;
}
[data-dark-mode] body .offcanvas .nav-link {
color: $body-color-dark;
}
[data-dark-mode] body .offcanvas .nav-link:hover,
[data-dark-mode] body .offcanvas .nav-link:focus {
color: $link-color-dark;
}
[data-dark-mode] body .offcanvas .nav-link.active {
color: $link-color-dark;
}
[data-dark-mode] body .navbar-light .navbar-brand {
2020-11-16 09:35:51 +01:00
color: $navbar-dark-color !important;
2020-04-15 15:48:16 +02:00
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .navbar-light .navbar-nav .nav-link {
2020-04-15 15:48:16 +02:00
color: $navbar-dark-color;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .navbar-light .navbar-nav .nav-link:hover,
[data-dark-mode] body .navbar-light .navbar-nav .nav-link:focus {
2020-04-15 15:48:16 +02:00
color: $navbar-dark-hover-color;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .navbar-light .navbar-nav .nav-link.disabled {
2020-04-15 15:48:16 +02:00
color: $navbar-dark-disabled-color;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .navbar-light .navbar-nav .show > .nav-link,
[data-dark-mode] body .navbar-light .navbar-nav .active > .nav-link,
[data-dark-mode] body .navbar-light .navbar-nav .nav-link.show,
[data-dark-mode] body .navbar-light .navbar-nav .nav-link.active {
2020-04-15 15:48:16 +02:00
color: $navbar-dark-active-color;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .navbar-light .navbar-text {
2020-04-15 15:48:16 +02:00
color: $navbar-dark-color;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .alert-primary a {
2020-11-04 08:26:58 +01:00
color: $body-bg-dark;
}
2022-01-17 16:38:16 +01:00
[data-dark-mode] body .alert-doks {
2020-11-04 08:26:58 +01:00
background: $body-overlay-dark;
color: $body-color-dark;
}
2022-01-17 16:38:16 +01:00
[data-dark-mode] body .alert-doks a {
color: $link-color-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .page-links a {
2020-04-15 15:48:16 +02:00
color: $body-color-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .btn-toggle-nav a {
color: $body-color-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .showcase-meta a {
2020-11-16 09:35:51 +01:00
color: $body-color-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .showcase-meta a:hover,
[data-dark-mode] body .showcase-meta a:focus {
2020-11-16 09:35:51 +01:00
color: $link-color-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .docs-link:hover,
[data-dark-mode] body .docs-link.active,
[data-dark-mode] body .page-links a:hover {
2020-04-15 15:48:16 +02:00
text-decoration: none;
color: $link-color-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .btn-toggle {
color: $body-color-dark;
background-color: transparent;
border: 0;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .btn-toggle:hover,
[data-dark-mode] body .btn-toggle:focus {
color: $body-color-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .btn-toggle::before {
width: 1.25em;
line-height: 0;
content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%28222, 226, 230, 0.75%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e");
transition: transform 0.35s ease;
transform-origin: 0.5em 50%;
margin-bottom: 0.125rem;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .btn-toggle[aria-expanded="true"] {
color: $body-color-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .btn-toggle[aria-expanded="true"]::before {
transform: rotate(90deg);
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .btn-toggle-nav a:hover,
[data-dark-mode] body .btn-toggle-nav a:focus {
color: $link-color-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .btn-toggle-nav a.active {
color: $link-color-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .navbar-light .navbar-text a {
2020-04-15 15:48:16 +02:00
color: $navbar-dark-active-color;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .docs-links h3.sidebar-link a,
[data-dark-mode] body .page-links h3.sidebar-link a {
2020-11-16 09:35:51 +01:00
color: $body-color-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .navbar-light .navbar-text a:hover,
[data-dark-mode] body .navbar-light .navbar-text a:focus {
2020-04-15 15:48:16 +02:00
color: $navbar-dark-active-color;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .navbar .btn-link {
2020-04-15 15:48:16 +02:00
color: $navbar-dark-color;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .content .btn-link {
2020-04-16 14:42:09 +02:00
color: $link-color-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .content .btn-link:hover {
2020-04-16 14:42:09 +02:00
color: $link-color-dark;
}
[data-dark-mode] body .content img[src^="https://latex.codecogs.com/svg.latex"] {
2021-09-21 03:18:03 +02:00
filter: invert(1);
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .navbar .btn-link:hover {
2020-04-15 15:48:16 +02:00
color: $navbar-dark-hover-color;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .navbar .btn-link:active {
2020-04-15 15:48:16 +02:00
color: $navbar-dark-active-color;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .form-control.is-search {
2020-04-15 15:48:16 +02:00
background: $body-overlay-dark;
2021-09-07 12:08:46 +02:00
border: 1px solid transparent;
color: $gray-300;
2020-12-15 14:09:14 +01:00
/*
2020-11-04 08:26:58 +01:00
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-search'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right calc(0.375em + 0.1875rem) center;
background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
2020-12-15 14:09:14 +01:00
*/
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .form-control.is-search:focus {
border: 1px solid $link-color-dark;
}
[data-dark-mode] body .doks-search::after {
color: $gray-300;
border: 1px solid $gray-700;
}
[data-dark-mode] body .text-dark {
color: $body-color-dark !important;
}
/*
[data-dark-mode] body .navbar-form::after {
color: $gray-600;
border: 1px solid $gray-800;
}
2021-09-07 12:08:46 +02:00
*/
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .form-control {
color: $gray-300;
2020-11-04 08:26:58 +01:00
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .form-control::placeholder {
color: $gray-400;
opacity: 1;
2020-04-15 15:48:16 +02:00
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .border-top {
2020-04-15 15:48:16 +02:00
border-top: 1px solid $border-dark !important;
}
@include media-breakpoint-up(lg) {
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .docs-sidebar {
2020-04-15 15:48:16 +02:00
order: 0;
border-right: 1px solid $border-dark;
}
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .docs-navigation {
2020-04-15 15:48:16 +02:00
border-top: 1px solid $border-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body pre code::-webkit-scrollbar-thumb {
background: $gray-400;
2021-03-19 15:21:08 +01:00
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body code:not(.hljs) {
background: $body-overlay-dark;
color: $body-color-dark;
}
[data-dark-mode] body pre code:hover {
2021-03-19 15:21:08 +01:00
scrollbar-width: thin;
scrollbar-color: $border-dark transparent;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body pre code::-webkit-scrollbar-thumb:hover {
background: $gray-500;
2021-03-19 15:21:08 +01:00
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body blockquote {
2020-11-04 08:26:58 +01:00
border-left: 3px solid $border-dark;
2020-04-15 15:48:16 +02:00
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .footer {
2020-04-15 15:48:16 +02:00
border-top: 1px solid $border-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .docs-links,
[data-dark-mode] body .docs-toc {
2020-04-15 15:48:16 +02:00
scrollbar-width: thin;
scrollbar-color: $body-bg-dark $body-bg-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .docs-links::-webkit-scrollbar,
[data-dark-mode] body .docs-toc::-webkit-scrollbar {
2020-04-15 15:48:16 +02:00
width: 5px;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .docs-links::-webkit-scrollbar-track,
[data-dark-mode] body .docs-toc::-webkit-scrollbar-track {
2020-04-15 15:48:16 +02:00
background: $body-bg-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .docs-links::-webkit-scrollbar-thumb,
[data-dark-mode] body .docs-toc::-webkit-scrollbar-thumb {
2020-04-15 15:48:16 +02:00
background: $body-bg-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .docs-links:hover,
[data-dark-mode] body .docs-toc:hover {
2020-04-15 15:48:16 +02:00
scrollbar-width: thin;
scrollbar-color: $border-dark $body-bg-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .docs-links:hover::-webkit-scrollbar-thumb,
[data-dark-mode] body .docs-toc:hover::-webkit-scrollbar-thumb {
2020-04-15 15:48:16 +02:00
background: $border-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .docs-links::-webkit-scrollbar-thumb:hover,
[data-dark-mode] body .docs-toc::-webkit-scrollbar-thumb:hover {
2020-04-15 15:48:16 +02:00
background: $border-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .docs-links h3:not(:first-child) {
2020-04-15 15:48:16 +02:00
border-top: 1px solid $border-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body a.docs-link {
2020-04-15 15:48:16 +02:00
color: $body-color-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .page-links li:not(:first-child) {
2020-04-15 15:48:16 +02:00
border-top: 1px dashed $border-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .card {
2020-04-15 15:48:16 +02:00
background: $body-bg-dark;
border: 1px solid $border-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .card.bg-light {
2020-04-15 15:48:16 +02:00
background: $body-overlay-dark !important;
}
2020-04-16 11:41:54 +02:00
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .navbar .menu-icon .navicon {
2020-04-16 11:41:54 +02:00
background: $navbar-dark-color;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .navbar .menu-icon .navicon::before,
[data-dark-mode] body .navbar .menu-icon .navicon::after {
2020-04-16 11:41:54 +02:00
background: $navbar-dark-color;
}
2020-11-04 08:26:58 +01:00
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .logo-light {
2020-11-04 08:26:58 +01:00
display: none !important;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .logo-dark {
2020-11-04 08:26:58 +01:00
display: inline-block !important;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .bg-light {
2020-11-04 08:26:58 +01:00
background: darken($body-bg-dark, 1.5%) !important;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .bg-dots {
2020-11-04 08:26:58 +01:00
background-image: radial-gradient($dots-dark 15%, transparent 15%);
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .text-muted {
2020-11-04 08:26:58 +01:00
color: darken($body-color-dark, 7.5%) !important;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .alert-primary {
2020-11-04 08:26:58 +01:00
background: $link-color-dark;
color: $body-bg-dark;
}
2020-12-03 16:07:04 +01:00
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .figure-caption {
2020-12-03 16:07:04 +01:00
color: $body-color-dark;
}
2021-03-05 14:27:36 +01:00
2021-09-07 12:08:46 +02:00
[data-dark-mode] body table {
2021-03-05 14:27:36 +01:00
@extend .table-dark;
}
2021-03-26 10:25:32 +01:00
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .copy-status::after {
2021-03-26 10:25:32 +01:00
content: "Copy";
display: block;
color: $body-color-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .copy-status:hover::after {
2021-03-26 10:25:32 +01:00
content: "Copy";
display: block;
color: $link-color-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body .copy-status:focus::after,
[data-dark-mode] body .copy-status:active::after {
2021-03-26 10:25:32 +01:00
content: "Copied";
display: block;
color: $link-color-dark;
}
2021-09-07 12:08:46 +02:00
/*
[data-dark-mode] body .dropdown-toggle:focus,
[data-dark-mode] body .doks-sidebar-toggle:focus {
box-shadow: 0 0 0 0.2rem $focus-color-dark;
}
*/
[data-dark-mode] body .offcanvas {
background-color: $body-bg-dark;
}
[data-dark-mode] body .btn-close {
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNkZWUyZTYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLXgiPjxsaW5lIHgxPSIxOCIgeTE9IjYiIHgyPSI2IiB5Mj0iMTgiPjwvbGluZT48bGluZSB4MT0iNiIgeTE9IjYiIHgyPSIxOCIgeTI9IjE4Ij48L2xpbmU+PC9zdmc+");
background-size: 1.5rem;
}
@include media-breakpoint-up(md) {
[data-dark-mode] body .alert-dismissible .btn-close {
background-size: 1.25rem;
}
}
/*
[data-dark-mode] body .btn-close:focus {
box-shadow: 0 0 0 0.2rem $focus-color-dark;
}
*/
2021-09-15 14:36:51 +02:00
[data-dark-mode] .dropdown-item {
color: $body-bg-dark;
}
2021-09-07 12:08:46 +02:00
[data-dark-mode] body hr.text-black-50 {
color: $gray-600 !important;
}
[data-dark-mode] body .email-form .form-control {
background: $body-overlay-dark;
border: 1px solid transparent;
}
[data-dark-mode] body .email-form .form-control:focus {
border: 1px solid $link-color-dark;
}
2021-09-09 09:48:27 +02:00
[data-dark-mode] .page-link {
color: $link-color-dark;
background-color: transparent;
border: $pagination-border-width solid $border-dark;
&:hover {
color: $body-bg-dark;
background-color: $body-color-dark;
border-color: $body-color-dark;
}
&:focus {
color: $body-bg-dark;
background-color: $body-color-dark;
}
}
[data-dark-mode] .page-item {
&.active .page-link {
color: $body-bg-dark;
@include gradient-bg($link-color-dark);
border-color: $link-color-dark;
}
&.disabled .page-link {
color: $pagination-disabled-color;
background-color: $body-overlay-dark;
border-color: $border-dark;
}
}
[data-dark-mode] .dropdown-menu.dropdown-menu-main {
background: $body-overlay-dark;
}
[data-dark-mode] .dropdown-menu-main .dropdown-item {
color: $body-color-dark;
}
[data-dark-mode] .dropdown-menu-main .dropdown-item:hover {
color: $link-color-dark;
}
[data-dark-mode] .dropdown-menu-main .dropdown-item.active {
color: $link-color-dark;
}
2022-02-10 14:12:24 +01:00
[data-dark-mode] details {
border: 1px solid $border-dark;
}
[data-dark-mode] summary:hover {
background: $body-overlay-dark;
}
[data-dark-mode] details[open] > summary {
border-bottom: 1px solid $border-dark;
}
[data-dark-mode] details summary::before {
content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%28222, 226, 230, 0.75%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e");
}