trilium/src/public/stylesheets/theme-next.css
2024-11-27 19:55:17 +02:00

541 lines
14 KiB
CSS

:root {
--main-font-family: "Lato", sans-serif;
--main-font-size: normal;
--tree-font-family: var(--main-font-family);
--tree-font-size: normal;
--detail-font-family: var(--main-font-family);
--detail-font-size: normal;
--monospace-font-family: JetBrainsLight;
--monospace-font-size: normal;
--left-pane-item-selected-shadow-size: 2px;
--launcher-pane-size: 58px;
--launcher-pane-button-margin: 6px;
--launcher-pane-button-gap: 3px;
--tab-bar-height: 50px;
--tab-height: 36px;
--tab-first-item-horiz-offset: 0;
}
/*
* THEME COLORS
*/
/*
* Light theme scheme
*/
:root {
--theme-style: light;
--main-background-color: white;
--main-text-color: black;
--main-border-color: #ccc;
--dropdown-border-color: #ccc;
--dropdown-shadow-opacity: .2;
--dropdown-item-icon-destructive-color: #ec5138;
--disabled-tooltip-icon-color: #004382;
--accented-background-color: #f5f5f5;
--more-accented-background-color: #ddd;
--button-background-color: transparent;
--button-border-color: #ddd;
--button-text-color: black;
--button-border-radius: 5px;
--button-disabled-background-color: #ddd;
--button-disabled-text-color: black;
--primary-button-background-color: #6c757d;
--primary-button-text-color: white;
--primary-button-border-color: #6c757d;
--muted-text-color: #666;
--input-text-color: black;
--input-background-color: transparent;
--hover-item-text-color: black;
--hover-item-background-color: transparent;
--hover-item-border-color: #ccc;
--active-item-text-color: black;
--active-item-background-color: #ddd;
--active-item-border-color: transparent;
--menu-text-color: black;
--menu-background-color: #ffffffd9;
--modal-background-color: white;
--modal-backdrop-color: black;
--left-pane-background-color: #f2f2f2;
--left-pane-text-color: #383838;
--left-pane-item-hover-background: #eaeaea;
--left-pane-item-selected-background: white;
--left-pane-item-selected-color: black;
--left-pane-item-selected-shadow: 1px 1px 2px rgba(0, 0, 0, .2);
--left-pane-item-action-button-background: #d7d7d7;
--left-pane-item-action-button-hover-background: white;
--left-pane-item-action-button-hover-shadow: 2px 2px 3px rgba(0, 0, 0, .15);
--left-pane-item-selected-action-button-hover-shadow: 2px 2px 10px rgba(0, 0, 0, .25);
--launcher-pane-background-color: #e8e8e8;
--launcher-pane-text-color: #464646;
--launcher-pane-button-hover-color: black;
--launcher-pane-button-hover-background: white;
--launcher-pane-button-hover-shadow: 4px 4px 4px rgba(0, 0, 0, .075);
--root-background: var(--left-pane-background-color);
--gutter-color: transparent;
--gutter-hover-color: #bfbfbf;
--active-tab-background-color: #ddd;
--active-tab-hover-background-color: #d1d1d1;
--active-tab-text-color: black;
--inactive-tab-background-color: #f0f0f0;
--inactive-tab-hover-background-color: #e3e3e3;
--inactive-tab-text-color: #666;
--scrollbar-border-color: #ddd;
--scrollbar-background-color: #ddd;
--tooltip-background-color: #f8f8f8;
--link-color: blue;
--mermaid-theme: default;
--toc-item-hover-background: #ececec;
--code-block-box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.1), 0px 0px 2px rgba(0, 0, 0, 0.2);
}
/*
* Dark color scheme
*/
@media (prefers-color-scheme: dark) {
:root {
--theme-style: dark;
--main-background-color: #333;
--main-text-color: #ccc;
--main-border-color: #aaa;
--dropdown-border-color: #555;
--dropdown-shadow-opacity: .4;
--dropdown-item-icon-destructive-color: #de6e5b;
--disabled-tooltip-icon-color: #7fd2ef;
--accented-background-color: #555;
--more-accented-background-color: #777;
--button-background-color: transparent;
--button-border-color: #ccc;
--button-text-color: currentColor;
--button-border-radius: 5px;
--button-disabled-background-color: transparent;
--button-disabled-text-color: #999;
--primary-button-background-color: #888;
--primary-button-text-color: white;
--primary-button-border-color: #999;
--muted-text-color: #bbb;
--input-text-color: #ccc;
--input-background-color: #333;
--hover-item-text-color: #ccc;
--hover-item-background-color: transparent;
--hover-item-border-color: #aaa;
--active-item-text-color: black;
--active-item-background-color: #777;
--active-item-border-color: transparent;
--menu-text-color: white;
--menu-background-color: #222222d9;
--modal-background-color: #333;
--modal-backdrop-color: #444;
--left-pane-background-color: #1f1f1f;
--left-pane-text-color: #AAAAAA;
--left-pane-item-hover-background: #eaeaea;
--left-pane-item-selected-background: white;
--left-pane-item-selected-color: black;
--left-pane-item-selected-shadow: 1px 1px 2px rgba(0, 0, 0, .2);
--left-pane-item-action-button-background: #d7d7d7;
--left-pane-item-action-button-hover-background: white;
--left-pane-item-action-button-hover-shadow: 2px 2px 3px rgba(0, 0, 0, .15);
--left-pane-item-selected-action-button-hover-shadow: 2px 2px 10px rgba(0, 0, 0, .25);
--launcher-pane-background-color: #1f1f1f;
--launcher-pane-text-color: #AAAAAA;
--launcher-pane-button-hover-color: black;
--launcher-pane-button-hover-background: white;
--launcher-pane-button-hover-shadow: 4px 4px 4px rgba(0, 0, 0, .075);
--root-background: var(--left-pane-background-color);
--gutter-color: transparent;
--gutter-hover-color: #5e5e5e;
--active-tab-background-color: #666;
--active-tab-hover-background-color: #737373;
--active-tab-text-color: #ccc;
--inactive-tab-background-color: #444;
--inactive-tab-hover-background-color: #525252;
--inactive-tab-text-color: #bbb;
--scrollbar-border-color: #666;
--scrollbar-background-color: #333;
--tooltip-background-color: #333;
--link-color: lightskyblue;
--toc-item-hover-background: #ececec;
--mermaid-theme: dark;
--code-block-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}
body ::-webkit-calendar-picker-indicator {
filter: invert(1);
}
body .CodeMirror {
filter: invert(90%) hue-rotate(180deg);
}
.excalidraw.theme--dark {
--theme-filter: invert(80%) hue-rotate(180deg) !important;
}
body .todo-list input[type="checkbox"]:not(:checked):before {
border-color: var(--muted-text-color) !important;
}
.btn-close {
filter: invert(1);
}
}
/*
* USER INTERFACE
*/
@keyframes fade-in {
from {
opacity: 0;
} to {
opacity: 1;
}
}
#root-widget {
background-color: var(--root-background);
}
/*
* Launcher pane
*/
#launcher-pane.vertical {
width: var(--launcher-pane-size) !important;
padding-bottom: var(--launcher-pane-button-gap);
}
#launcher-pane.vertical .launcher-button {
width: calc(var(--launcher-pane-size) - (var(--launcher-pane-button-margin) * 2)) !important;
height: calc(var(--launcher-pane-size) - (var(--launcher-pane-button-margin) * 2)) !important;
margin: var(--launcher-pane-button-gap) var(--launcher-pane-button-margin);
padding: 0 !important;
border-radius: 8px;
transition: background-color 300ms ease-out,
color 300ms ease-out,
box-shadow 300ms ease-out;
cursor: default;
}
#launcher-pane.vertical .launcher-button:active,
#launcher-pane.vertical .launcher-button.show {
transform: scale(0.9);
transition: transform 50ms linear;
}
#launcher-pane.vertical .launcher-button:hover,
#launcher-pane.vertical .launcher-button.right-dropdown-button.show {
background: var(--launcher-pane-button-hover-background);
color: var(--launcher-pane-button-hover-color);
box-shadow: var(--launcher-pane-button-hover-shadow);
transition: background-color 100ms ease-in,
color 80ms ease-in,
box-shadow 100ms ease-in;
}
/*
* Left pane
*/
#left-pane .tree-actions {
/* TODO: relocate instead of hiding */
display: none;
}
#left-pane div.tree {
padding: 0 12px;
animation: fade-in 200ms ease-in;
}
#left-pane span.fancytree-node {
border: unset;
border-radius: 6px;
cursor: default;
}
/* The root element of the tree */
#left-pane .fancytree-container > li:first-child > span {
padding-left: 12px;
}
#left-pane span.fancytree-node.fancytree-active {
position: relative;
background: transparent !important;
color: var(--left-pane-item-selected-color) !important;
}
@keyframes left-pane-item-select {
from {
opacity: 0;
} to {
opacity: 1;
}
}
#left-pane span.fancytree-node.fancytree-active::before {
position: absolute;
content: "";
top: var(--left-pane-item-selected-shadow-size);
left: var(--left-pane-item-selected-shadow-size);
bottom: var(--left-pane-item-selected-shadow-size);
right: var(--left-pane-item-selected-shadow-size);
background: var(--left-pane-item-selected-background) !important;
box-shadow: var(--left-pane-item-selected-shadow);
border-radius: 6px;
animation: left-pane-item-select 200ms ease-out;
z-index: -1;
}
#left-pane .fancytree-expander {
opacity: .65;
transition: opacity 150ms ease-in;
}
#left-pane .fancytree-expander:hover {
opacity: 1;
transition: opacity 300ms ease-out;
}
#left-pane .fancytree-custom-icon {
margin-top: 0; /* Use this to align the icon with the tree view item's caption */
}
#left-pane span .fancytree-title {
margin-top: -5px;
}
#left-pane span.fancytree-active .fancytree-title {
font-weight: normal;
}
#left-pane span.fancytree-node:hover {
background: var(--left-pane-item-hover-background);
}
#left-pane span.fancytree-node.shared .fancytree-title::after {
opacity: .5;
}
#left-pane .tree-item-button {
margin-right: 6px;
border: unset;
border-radius: 50%;
background: var(--left-pane-item-action-button-background);
transition: background-color 300ms ease-out,
box-shadow 300ms ease-out;
}
#left-pane .tree-item-button:hover {
background: var(--left-pane-item-action-button-hover-background);
box-shadow: var(--left-pane-item-action-button-hover-shadow);
transition: background-color 100ms ease-in,
box-shadow 100ms ease-in;
}
#left-pane span.fancytree-node.fancytree-active .tree-item-button:hover {
box-shadow: var(--left-pane-item-selected-action-button-hover-shadow);
}
/*
* Gutter
*/
.gutter {
background: var(--gutter-color) !important;
transition: background 150ms ease-out;
}
.gutter:hover {
background: var(--gutter-hover-color) !important;
transition: background 300ms ease-in;
}
/*
* Tab bar
*/
/* The parent element of the tab bar */
#rest-pane > div.component:first-child {
height: var(--tab-bar-height) !important;
}
.tab-row-widget {
background: transparent !important;
}
.tab-row-widget-container {
margin-top: calc((var(--tab-bar-height) - var(--tab-height)) / 2);
height: var(--tab-height) !important;
}
.tab-row-widget .note-tab .note-tab-wrapper {
height: var(--tab-height) !important;
}
.tab-row-widget .note-tab:nth-child(1) {
transform: translate3d(var(--tab-first-item-horiz-offset), 0, 0);
}
/*
* Center pane
*/
#center-pane {
background: var(--main-background-color);
}
/*
* Table of contents & Highlights list
*/
#right-pane {
background: var(--main-background-color);
}
#right-pane .toc li,
#right-pane .highlights-list li {
padding: 2px 8px;
border-radius: 4px;
text-align: unset;
transition: background-color 150ms ease-in;
}
#right-pane .highlights-list li {
line-height: 1.2;
padding: 8px;
}
#right-pane .toc li::marker,
#right-pane .highlights-list li::marker {
color: var(--muted-text-color);
}
#right-pane .toc li:hover,
#right-pane .highlights-list li:hover {
background: var(--toc-item-hover-background);
font-weight: normal;
transition: background-color 300ms ease-out;
}
#right-pane .toc li:active,
#right-pane .highlights-list li:active {
background: transparent;
transition: none;
}
/*
* Menus
*/
.dropdown-menu {
backdrop-filter: blur(10px) saturate(6);
}
/*
* TEXT NOTES
*/
/*
* Code Blocks
*/
.ck-content pre {
border: 0;
border-radius: 6px;
box-shadow: var(--code-block-box-shadow);
padding: 0 !important;
margin-top: 2px !important;
overflow: unset;
}
html .note-detail-editable-text :not(figure, .include-note):first-child {
/* Create some space for the top-side shadow */
margin-top: 1px !important;
}
.ck.ck-editor__editable pre[data-language]::after {
--ck-color-code-block-label-background: rgba(128, 128, 128, .5);
border-radius: 0 0 5px 5px;
padding: 0px 10px;
letter-spacing: .5px;
font-weight: bold;
}
.ck-content pre code {
display: block;
padding: 1em;
overflow: auto;
}
.ck-content pre code::-webkit-scrollbar {
height: 6px;
}
.ck-content pre code::-webkit-scrollbar-thumb {
height: 4px;
border: none !important;
background: gray !important;
}
.ck-content pre code::-webkit-scrollbar-track, ::-webkit-scrollbar-thumb {
cursor: default;
}
.note-detail-printable:not(.word-wrap) pre code {
white-space: pre;
margin-right: 1em;
}
.code-sample-wrapper .hljs {
transition: background-color linear 100ms;
}