Skip to content

Instantly share code, notes, and snippets.

@sundevilyang
Last active January 19, 2024 07:05
Show Gist options
  • Save sundevilyang/513bb3e017857cb847be59db81babca2 to your computer and use it in GitHub Desktop.
Save sundevilyang/513bb3e017857cb847be59db81babca2 to your computer and use it in GitHub Desktop.
logseq
/* Theme custom css start
Dracula Theme for Logseq
Source: https://raw.githack.com/dracula/logseq/master/custom.css
*/
/* Importing fonts from Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;700&family=Fira+Sans:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap");
/* Root variable definitions for theme colors and font settings */
:root {
/* Color scheme based on Dracula Theme */
--custom-background: #282a36;
--light-background: #343746;
--lighter-background: #424450;
--dark-background: #21222c;
--darker-background: #191a21;
--custom-foreground: #f8f8f2;
--current-line: #44475a;
--comment: #6272a4;
--white: var(--custom-foreground);
--white-hover: #f8f8f280;
--red: #ff5555;
--orange: #ffb86c;
--yellow: #f1fa8c;
--green: #50fa7b;
--purple: #bd93f9;
--purple-hover: #bf93f980;
--cyan: #8be9fd;
--cyan-hover: #8be9fd80;
--pink: #ff79c6;
--pink-hover: #ff79c680;
/* Font settings */
--ls-tag-text-opacity: 0.8;
--ls-tag-text-hover-opacity: 0.8;
--ls-page-text-size: 16px;
--ls-page-title-size: 36px;
--ls-font-family: "LXGW Bright GB", "Fira Sans", sans-serif;
--ls-font-weight: 300;
--ls-font-letter-spacing: 0.002em;
--ls-font-line-height: 1.5;
/* Border radius settings */
--ls-border-radius-low: 3px;
--ls-border-radius-medium: 6px;
}
/* Dark theme specific styles */
.dark-theme,
html[data-theme="dark"] {
/* Background colors */
--ls-primary-background-color: var(--custom-background);
--ls-secondary-background-color: var(--dark-background);
--ls-tertiary-background-color: var(--light-background);
--ls-quaternary-background-color: var(--light-background);
--ls-quinary-background-color: var(--darker-background);
/* Active colors */
--ls-active-primary-color: var(--custom-foreground);
--ls-active-secondary-color: var(--custom-foreground);
/* Text colors */
--ls-primary-text-color: var(--custom-foreground);
--ls-secondary-text-color: var(--white-hover);
/* Search colors */
--ls-search-background-color: var(--custom-background);
--ls-border-color: var(--comment);
--ls-secondary-border-color: var(--ls-border-color);
--ls-menu-hover-color: var(--light-background);
--ls-table-tr-even-background-color: var(--light-background);
/* Headings and titles */
--ls-head-text-color: var(--custom-foreground);
--ls-title-text-color: var(--custom-foreground);
/* Link colors */
--ls-link-text-color: var(--pink);
--ls-link-text-hover-color: var(--pink-hover);
/* Reference link colors */
--ls-link-ref-text-color: var(--pink);
--ls-link-ref-text-hover-color: var(--pink-hover);
--ls-block-ref-link-text-color: var(--ls-border-color);
/* Tag colors */
--ls-tag-text-color: var(--purple);
--ls-tag-text-hover-color: var(--purple-hover);
/* Bullet colors */
--ls-block-bullet-border-color: var(--current-line);
--ls-block-bullet-color: var(--custom-foreground);
--ls-block-highlight-color: var(--current-line);
--ls-block-properties-background-color: var(--light-background);
/* Checkbox colors */
--ls-page-checkbox-color: transparent;
--ls-page-checkbox-border-color: var(--comment);
/* Blockquote colors */
--ls-page-blockquote-color: var(--custom-foreground);
--ls-page-blockquote-bg-color: var(--light-background);
--ls-page-blockquote-border-color: var(--yellow);
/* Inline code colors */
--ls-page-inline-code-color: var(--orange);
--ls-page-inline-code-bg-color: var(--custom-background);
/* Scrollbar colors */
--ls-scrollbar-background-color: var(--custom-background);
--ls-scrollbar-foreground-color: var(--darker-background);
--ls-scrollbar-thumb-hover-color: var(--light-background);
/* Icon colors */
--ls-icon-color: var(--white-hover);
--ls-search-icon-color: var(--white-hover);
--ls-a-chosen-bg: var(--light-background);
--ls-right-sidebar-code-bg-color: var(--light-background);
--ls-selection-background-color: var(--comment);
--ls-slide-background-color: var(--ls-primary-background-color);
--ls-guideline-color: var(--ls-border-color);
}
/* Global font settings */
html,
body {
font-weight: var(--ls-font-weight);
letter-spacing: var(--ls-font-letter-spacing);
line-height: var(--ls-font-line-height);
font-size: var(--ls-page-text-size);
background-color: var(--custom-background);
}
/* Styling for specific HTML elements */
i {
color: var(--yellow);
}
b {
color: var(--orange);
}
mark {
background-color: var(--yellow);
}
/* Background color classes */
.bg-orange-400 {
background-color: var(--orange);
}
.bg-green-600 {
background-color: var(--green);
}
.bg-red-500 {
background-color: var(--red);
}
/* Checkbox styling in dark theme */
.dark-theme .form-checkbox {
border: 1px solid var(--ls-page-checkbox-border-color) !important;
border-radius: var(--ls-border-radius-low) !important;
}
/* External link styling */
.external-link {
color: var(--cyan);
text-decoration: none;
border-bottom: none;
}
.external-link:hover {
color: var(--cyan-hover);
}
/* Heading styles */
h1.title,
.ls-block h1,
.ls-block h2,
.ls-block h3,
.ls-block h4,
.ls-block h5,
.ls-block h6 {
font-weight: 400;
}
/* Priority tag styling */
.priority {
color: var(--ls-tag-text-color);
opacity: 1 !important;
}
.priority:hover,
a.tooltip-priority:hover {
color: var(--ls-tag-text-hover-color);
opacity: 0.5;
}
a.tooltip-priority {
color: var(--ls-tag-text-color);
}
.Tooltip__label {
background: var(--ls-quinary-background-color);
}
.Tooltip__label::after {
border-bottom-color: var(--ls-quinary-background-color);
}
.page-reference .bracket {
color: var(--ls-border-color);
opacity: 0.8;
}
/* CodeMirror styling adapted for Logseq */
.CodeMirror {
font-family: "FiraCode Nerd Font", "Fira Code", monospace;
line-height: 1.2;
background: var(--custom-background);
}
/* CodeMirror default theme adjustments */
.cm-s-default.CodeMirror,
.cm-s-default .CodeMirror-gutters {
background-color: transparent;
color: var(--white) !important;
border: none;
}
/* CodeMirror language extension background */
.extensions__code-lang {
background: var(--light-background);
}
/* CodeMirror border adjustments */
.cm-s-default.CodeMirror {
border: 5px solid var(--light-background);
}
/* CodeMirror gutter styling */
.cm-s-default .CodeMirror-gutters {
color: var(--custom-background);
}
/* CodeMirror cursor styling */
.cm-s-default .CodeMirror-cursor {
border-left: solid thin var(--white);
}
/* CodeMirror line number styling */
.cm-s-default .CodeMirror-linenumber {
color: var(--comment);
}
/* CodeMirror selection background */
.cm-s-default .CodeMirror-selected {
background: rgba(255, 255, 255, 0.1);
}
/* CodeMirror line styling */
.cm-s-default .CodeMirror-line {
box-shadow: none;
}
/* CodeMirror selection styling */
.cm-s-default .CodeMirror-line::selection,
.cm-s-default .CodeMirror-line > span::selection,
.cm-s-default .CodeMirror-line > span > span::selection {
background: rgba(255, 255, 255, 0.1);
}
/* CodeMirror selection styling for Mozilla */
.cm-s-default .CodeMirror-line::-moz-selection,
.cm-s-default .CodeMirror-line > span::-moz-selection,
.cm-s-default .CodeMirror-line > span > span::-moz-selection {
background: rgba(255, 255, 255, 0.1);
}
/* CodeMirror syntax highlighting */
.cm-s-default span.cm-comment {
color: var(--comment);
}
.cm-s-default span.cm-string,
.cm-s-default span.cm-string-2 {
color: var(--yellow);
}
.cm-s-default span.cm-number {
color: var(--purple);
}
.cm-s-default span.cm-variable {
color: var(--green);
}
.cm-s-default span.cm-variable-2 {
color: var(--white);
}
.cm-s-default span.cm-def {
color: var(--green);
}
.cm-s-default span.cm-operator {
color: var(--pink);
}
.cm-s-default span.cm-keyword {
color: var(--pink);
}
.cm-s-default span.cm-atom {
color: var(--purple);
}
.cm-s-default span.cm-meta {
color: var(--white);
}
.cm-s-default span.cm-tag {
color: var(--pink);
}
.cm-s-default span.cm-attribute {
color: var(--green);
}
.cm-s-default span.cm-qualifier {
color: var(--green);
}
.cm-s-default span.cm-property {
color: var(--cyan);
}
.cm-s-default span.cm-builtin {
color: var(--green);
}
.cm-s-default span.cm-variable-3,
.cm-s-default span.cm-type {
color: var(--orange);
}
/* CodeMirror active line background */
.cm-s-default .CodeMirror-activeline-background {
background: rgba(255, 255, 255, 0.1);
}
/* CodeMirror matching bracket styling */
.cm-s-default .CodeMirror-matchingbracket {
text-decoration: underline;
color: var(--white) !important;
}
/* Right sidebar CodeMirror line background */
#right-sidebar pre.CodeMirror-line {
background: transparent;
}
/* Theme custom css end */
/* Eisenhower Matrix CSS by cannibalox v202100306 */
/* Activate with `/template v-eisenhower` or tag a block with `#.v-eisenhower-matrix` */
/* Define vars for Eisenhower Matrix */
@media only screen and (min-width: 768px) {
[data-refs-self*="eisenhower-matrix"] {
--eisen-caption-color: #fff;
--eisen-caption-bg: #0000;
--eisen-scrollbar-width: 2px;
--eisen-scrollbar-thumb: #3d39399e;
--eisen-scrollbar-track: #0000;
--eisen-outercaption-color: #979797b8;
--eisen-todo-bgcolor: #4bad00a8;
--eisen-decide-bgcolor: #0067beb8;
--eisen-delegate-bgcolor: #bf8300c7;
--eisen-eliminate-bgcolor: #9c003ecc;
--eisen-bullet-color: #282a37;
--eisen-clover-borderstyle: 1px solid grey; /* e.g., 3px solid white */
font-size: 14px;
}
/* Optional: Add captions around the diagram */
/* ... (rest of the Eisenhower Matrix CSS) ... */
/* =============== END OF EISENHOWER MATRIX ===================== */
}
/* vismode icon component by cannibalox */
/* part of the ls-vizmods-suite */
a.tag[data-ref*=".v-"]:before {
content:"🚩今日目标";
font-size: 0.75rem;
line-height: 0.75rem;
}
a.tag[data-ref*=".v-"]:hover:before {
padding-right:0.3rem;
}
a.tag[data-ref*=".v-"]:hover {
font-size: 0.75rem;
line-height: 0.75rem;
}
a.tag[data-ref*=".v-"]{
font-size: 0px;
font-family: lxgw bright gb, iosevka, fira code, consolas, source code pro;
color: #88e165;
background-color: #1a2d23;
/*border: 1px solid #a1c65d; border-radius: 3px;*/
padding: 0 2px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment