Skip to content

Commit

Permalink
refactor: improve inline codeblock text color (#1281)
Browse files Browse the repository at this point in the history
  • Loading branch information
HEIGE-PCloud authored May 17, 2024
1 parent e876837 commit 2af9041
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions assets/css/_partial/_single/_code.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ pre,
background-color: $code-background-color !important;
}

code:not(.chroma) {
/* Inline code blocks */
background-color: var(--inline-code-background-color) !important;
border-radius: 6px;
padding: .2em .4em;
font-size: 85%;
line-height: 1.5;
color: var(--global-font-color);
}


.highlight,
.gist {
font-family: $code-font-family;
Expand Down
3 changes: 3 additions & 0 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ ul {
--code-color: #e74c3c;
/* Color of the code background */
--code-background-color: #f5f5f5;
--inline-code-background-color: var(--bgColor-neutral-muted);
--code-header-color: #ededed;
--code-background-color-darken-5: #e8e8e8;
--code-background-color-darken-6: #e6e6e6;
Expand Down Expand Up @@ -587,6 +588,7 @@ ul {
--bgColor-secondary: #ededed;
--bgColor-accent-emphasis: #6bd6fd;
--bgColor-accent-muted: #388bfd1a;
--bgColor-neutral-muted: #afb8c133;
--borderColor-default: #f0f0f0;
--selection-bgColor: #35a6f740;
--button-default-bgColor-rest: #f0f0f0;
Expand All @@ -608,6 +610,7 @@ html.dark {
--bgColor-accent-emphasis: #1f6feb;
--bgColor-accent-muted: #388bfd1a;
--borderColor-default: #30363d;
--bgColor-neutral-muted: #6e768166;
--selection-bgColor: #1f6febb3;
--button-default-bgColor-rest: #21262d;
--button-default-bgColor-hover: #292e36;
Expand Down
3 changes: 3 additions & 0 deletions assets/css/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
--code-color: #e74c3c;
/* Color of the code background */
--code-background-color: #f5f5f5;
--inline-code-background-color: var(--bgColor-neutral-muted);

--code-header-color: #ededed;
--code-background-color-darken-5: #e8e8e8;
Expand Down Expand Up @@ -139,6 +140,7 @@
--bgColor-secondary: #ededed;
--bgColor-accent-emphasis: #6bd6fd;
--bgColor-accent-muted: #388bfd1a;
--bgColor-neutral-muted: #afb8c133;
--borderColor-default: #f0f0f0;
--selection-bgColor: #35a6f740;
--button-default-bgColor-rest: #f0f0f0;
Expand All @@ -158,6 +160,7 @@
--bgColor-accent-emphasis: #1f6feb;
--bgColor-accent-muted: #388bfd1a;
--borderColor-default: #30363d;
--bgColor-neutral-muted: #6e768166;
--selection-bgColor: #1f6febb3;
--button-default-bgColor-rest: #21262d;
--button-default-bgColor-hover: #292e36;
Expand Down

0 comments on commit 2af9041

Please sign in to comment.