Skip to content

Commit

Permalink
feat: add color to inline code (#1592)
Browse files Browse the repository at this point in the history
* feat: add color to inline code

* set color such as css vars

* add border radius
  • Loading branch information
bjohansebas committed Sep 8, 2024
1 parent a55eccd commit 896e9da
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
7 changes: 6 additions & 1 deletion css/dark-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
--notice-accent: rgb(249, 232, 195);
--warn-bg: rgb(78, 34, 50);
--warn-accent: rgb(249, 195, 214);
--code-bg: #0d1117;
}

:root {
Expand Down Expand Up @@ -270,4 +271,8 @@ html.dark-mode #blog-side-menu-container h3 a{
}
html.dark-mode #blog-side-menu > li > a{
color: var(--dark_inner_text);
}
}

html.dark-mode pre code {
background-color: inherit;
}
11 changes: 11 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
--notice-accent: rgb(115, 82, 13);
--warn-bg: rgb(250, 209, 223);
--warn-accent: rgb(138, 15, 58);
--code-bg: #f0f1f3;
}

* {
Expand Down Expand Up @@ -353,6 +354,16 @@ pre {
pre code {
overflow: scroll;
word-break: break-all;
background-color: inherit;
}

code {
background-color: var(--code-bg);
margin-block: -.125rem;
font-size: 13px;
padding: .125rem .375rem;
line-height: 28px;
border-radius: 6px;
}

/* top button */
Expand Down

0 comments on commit 896e9da

Please sign in to comment.