Skip to content

Commit

Permalink
Markup color and font size fixes (#30282) (#30310)
Browse files Browse the repository at this point in the history
Backport #30282 by @silverwind

1. Distinguish inline an block code with new CSS variable
`--color-markup-code-inline`
2. Various color tweaks, better contrast from background

<img width="447" alt="Screenshot 2024-04-05 at 00 51 00"
src="https://github.com/go-gitea/gitea/assets/115237/93e069f4-6807-4f2c-9331-2d69730919d4">
<img width="456" alt="Screenshot 2024-04-05 at 00 50 44"
src="https://github.com/go-gitea/gitea/assets/115237/0dc9c745-c531-40fa-94ec-b0ba10bd7ccf">

Co-authored-by: silverwind <me@silverwind.io>
  • Loading branch information
GiteaBot and silverwind committed Apr 6, 2024
1 parent 95caad7 commit be5518e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions web_src/css/markup/content.css
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@
margin: 0;
font-size: 85%;
white-space: break-spaces;
background-color: var(--color-markup-code-block);
background-color: var(--color-markup-code-inline);
border-radius: var(--border-radius);
}

Expand Down Expand Up @@ -508,7 +508,7 @@
line-height: 10px;
color: var(--color-text-light);
vertical-align: middle;
background-color: var(--color-markup-code-block);
background-color: var(--color-markup-code-inline);
border: 1px solid var(--color-secondary);
border-radius: var(--border-radius);
box-shadow: inset 0 -1px 0 var(--color-secondary);
Expand Down
5 changes: 3 additions & 2 deletions web_src/css/themes/theme-gitea-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,9 @@
--color-active: #e8e8ff24;
--color-menu: #151a1e;
--color-card: #151a1e;
--color-markup-table-row: #e8e8ff06;
--color-markup-code-block: #e8e8ff16;
--color-markup-table-row: #e8e8ff0f;
--color-markup-code-block: #e8e8ff12;
--color-markup-code-inline: #e8e8ff28;
--color-button: #151a1e;
--color-code-bg: #14171a;
--color-shadow: #00001758;
Expand Down
5 changes: 3 additions & 2 deletions web_src/css/themes/theme-gitea-light.css
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,9 @@
--color-active: #00001714;
--color-menu: #f8f9fb;
--color-card: #f8f9fb;
--color-markup-table-row: #00001708;
--color-markup-code-block: #00001710;
--color-markup-table-row: #0030600a;
--color-markup-code-block: #00306010;
--color-markup-code-inline: #00306012;
--color-button: #f8f9fb;
--color-code-bg: #fafdff;
--color-shadow: #00001726;
Expand Down

0 comments on commit be5518e

Please sign in to comment.