From 1fe56d26aebf6213e9a0a6f964b6068397a9bcb5 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Fri, 28 Apr 2023 10:10:27 +0300 Subject: [styles] Reworked colors for syntax highlighting --- src/styles.css | 95 +++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 68 insertions(+), 27 deletions(-) (limited to 'src/styles.css') diff --git a/src/styles.css b/src/styles.css index b24a355..fd6feea 100644 --- a/src/styles.css +++ b/src/styles.css @@ -55,23 +55,54 @@ --bg-color: white; --fg-color: black; - --a-color: #336700; - --a-hover-color: #3ea100; - --accent-line-color: #004080; - --alternating-row-color: #eef0f2; - --bg-selection-color: #338fff; - --blockquote-color: #6a737d; + --a-color: #336700; + --a-hover-color: #3ea100; + --accent-line-color: #004080; + --alternating-row-color: #eef0f2; + --bg-selection-color: #338fff; + --blockquote-color: #6a737d; --blockquote-border-color: #dfe2e5; - --body-bg: #dbdbdb; - --border-color: black; - --code-bg-color: #e2e4e6; - --em-color: black; - --fg-selection-color: white; - --header-color: #006b8f; - --pre-bg-color: #f6f8fa; - --strong-color: black; - --table-border-color: black; - --tr-bg-color: #fff; + --body-bg: #dbdbdb; + --border-color: black; + --code-bg-color: #e2e4e6; + --em-color: black; + --fg-selection-color: white; + --header-color: #006b8f; + --pre-bg-color: #f6f8fa; + --strong-color: black; + --table-border-color: black; + --tr-bg-color: white; + + /* https://github.com/morhetz/gruvbox/blob/master/autoload/gruvbox.vim */ + --hi-fg: #282828; + --hi-bg: #f9f5d7; + --hic-gray: #928374; + --hic-red: #fb4934; + --hic-green: #79740e; + --hic-yellow: #b57614; + --hic-purple: #8f3f71; + --hic-aqua: #427b58; + --hic-orange: #af3a03; + + --hi-comment: var(--hic-gray); + --hi-const: var(--hic-purple); + --hi-string: var(--hic-green); + --hi-char: var(--hic-purple); + --hi-number: var(--hic-purple); + --hi-bool: var(--hic-purple); + --hi-float: var(--hic-purple); + --hi-function: var(--hic-green); + --hi-statement: var(--hic-red); + --hi-conditional: var(--hic-red); + --hi-repeat: var(--hic-red); + --hi-operator: var(--hi-fg); + --hi-keyword: var(--hic-red); /* Label and Exception are keywords */ + --hi-preproc: var(--hic-aqua); + --hi-type: var(--hic-yellow); + --hi-storageclass: var(--hic-orange); + --hi-structure: var(--hic-aqua); + --hi-typedef: var(--hic-aqua); + --hi-ignore: var(--hi-fg); } /* Global */ @@ -471,14 +502,24 @@ dt { font-size: 1.2em; } padding: 0.2em 0 0.2em 0.2em !important; } -/* Syntax highlighting (colours are inspired from gruvbox) */ - -/* Constant, Chars */ .SH-cst, .SH-chr { color: #d787af; } -/* Comment */ .SH-com { color: #8a8a8a; } -/* Keyword */ .SH-kwd { color: #d75f5f; } -/* Second keyword color */ .SH-kwd2 { color: #ff8700; } -/* Third keyword color */ .SH-kwd3 { color: #87af87; } -/* Type */ .SH-typ { color: #ffaf00; } -/* Class */ .SH-cls { color: #87afaf; } -/* Function names, Strings */ :not(.SH-cls) > .SH-fnc, .SH-str { color: #afaf00; } -.SH-none { color: var(--fg-color); } +/* Syntax highlighting */ + +.HI-comment { color: var(--hic-gray); } +.HI-const { color: var(--hic-purple); } +.HI-string { color: var(--hic-green); } +.HI-char { color: var(--hic-purple); } +.HI-number { color: var(--hic-purple); } +.HI-bool { color: var(--hic-purple); } +.HI-float { color: var(--hic-purple); } +.HI-function { color: var(--hic-green); } +.HI-statement { color: var(--hic-red); } +.HI-conditional { color: var(--hic-red); } +.HI-repeat { color: var(--hic-red); } +.HI-operator { color: var(--fg-color); } +.HI-keyword { color: var(--hic-red); /* Label and Exception are keywords */ } +.HI-preproc { color: var(--hic-aqua); } +.HI-type { color: var(--hic-yellow); } +.HI-storageclass { color: var(--hic-orange); } +.HI-structure { color: var(--hic-aqua); } +.HI-typedef { color: var(--hic-aqua); } +.HI-ignore { color: var(--fg-color); } -- cgit v1.3.1-23-gd82d From 973c5dcaaa0273a4050cff5e81b2ef14262bc39d Mon Sep 17 00:00:00 2001 From: Syndamia Date: Fri, 28 Apr 2023 23:24:20 +0300 Subject: [styles] Added hi-identifier and hic-blue, fixed .HI classes being hardcoded with colors, rather than the appropriate varaibles --- src/darkmode.css | 1 + src/styles.css | 41 ++++++++++++++++++++++------------------- 2 files changed, 23 insertions(+), 19 deletions(-) (limited to 'src/styles.css') diff --git a/src/darkmode.css b/src/darkmode.css index 59aaffc..11eadf7 100644 --- a/src/darkmode.css +++ b/src/darkmode.css @@ -26,6 +26,7 @@ --hic-gray: #928374; --hic-red: #fb4934; --hic-green: #b8bb26; + --hic-blue: #83a598; --hic-yellow: #fabd2f; --hic-purple: #d3869b; --hic-aqua: #8ec07c; diff --git a/src/styles.css b/src/styles.css index fd6feea..3674502 100644 --- a/src/styles.css +++ b/src/styles.css @@ -79,6 +79,7 @@ --hic-gray: #928374; --hic-red: #fb4934; --hic-green: #79740e; + --hic-blue: #076678; --hic-yellow: #b57614; --hic-purple: #8f3f71; --hic-aqua: #427b58; @@ -91,6 +92,7 @@ --hi-number: var(--hic-purple); --hi-bool: var(--hic-purple); --hi-float: var(--hic-purple); + --hi-identifier: var(--hic-blue); --hi-function: var(--hic-green); --hi-statement: var(--hic-red); --hi-conditional: var(--hic-red); @@ -504,22 +506,23 @@ dt { font-size: 1.2em; } /* Syntax highlighting */ -.HI-comment { color: var(--hic-gray); } -.HI-const { color: var(--hic-purple); } -.HI-string { color: var(--hic-green); } -.HI-char { color: var(--hic-purple); } -.HI-number { color: var(--hic-purple); } -.HI-bool { color: var(--hic-purple); } -.HI-float { color: var(--hic-purple); } -.HI-function { color: var(--hic-green); } -.HI-statement { color: var(--hic-red); } -.HI-conditional { color: var(--hic-red); } -.HI-repeat { color: var(--hic-red); } -.HI-operator { color: var(--fg-color); } -.HI-keyword { color: var(--hic-red); /* Label and Exception are keywords */ } -.HI-preproc { color: var(--hic-aqua); } -.HI-type { color: var(--hic-yellow); } -.HI-storageclass { color: var(--hic-orange); } -.HI-structure { color: var(--hic-aqua); } -.HI-typedef { color: var(--hic-aqua); } -.HI-ignore { color: var(--fg-color); } +.HI-comment { color: var(--hi-comment); } +.HI-const { color: var(--hi-const); } +.HI-string { color: var(--hi-string); } +.HI-char { color: var(--hi-char); } +.HI-number { color: var(--hi-number); } +.HI-bool { color: var(--hi-bool); } +.HI-float { color: var(--hi-float); } +.HI-identifier { color: var(--hi-identifier); } +.HI-function { color: var(--hi-function); } +.HI-statement { color: var(--hi-statement); } +.HI-conditional { color: var(--hi-conditional); } +.HI-repeat { color: var(--hi-repeat); } +.HI-operator { color: var(--hi-operator); } +.HI-keyword { color: var(--hi-keyword); /* Label and Exception are keywords */ } +.HI-preproc { color: var(--hi-preproc); } +.HI-type { color: var(--hi-type); } +.HI-storageclass { color: var(--hi-storageclass); } +.HI-structure { color: var(--hi-structure); } +.HI-typedef { color: var(--hi-typedef); } +.HI-ignore { color: var(--hi-ignore); } -- cgit v1.3.1-23-gd82d From a269cf3861e0f45c814348bb2223bb4054630c5c Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 29 Apr 2023 12:36:30 +0300 Subject: [styles] Fixed horizontal scrolling in code blocks not having a padding to the right --- src/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/styles.css') diff --git a/src/styles.css b/src/styles.css index 3674502..2781999 100644 --- a/src/styles.css +++ b/src/styles.css @@ -235,7 +235,7 @@ code, pre { } pre code { border: 0; - display: inline; + display: inline-block; overflow: visible; padding: 0; word-wrap: normal; -- cgit v1.3.1-23-gd82d From 719ee10187ec83183fb24ed85470ab3ee4d9b32c Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 29 Apr 2023 12:41:34 +0300 Subject: [styles] Fixed line height inconsistency in code blocks --- src/styles.css | 1 - 1 file changed, 1 deletion(-) (limited to 'src/styles.css') diff --git a/src/styles.css b/src/styles.css index 2781999..6173c5e 100644 --- a/src/styles.css +++ b/src/styles.css @@ -220,7 +220,6 @@ h1, h2, h3, h4, h5, h6, b { code, pre { background-color: var(--pre-bg-color); font-family: monospace; - line-height: 1em; } pre { overflow: auto; -- cgit v1.3.1-23-gd82d