Wrong CSS for C code highlighting (light theme) #8525

Closed
opened 2025-11-02 08:09:47 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @braoult on GitHub (Feb 8, 2022).

Gitea Version

1.16.1

Operating System

N/A

Browser Version

N/A

Can you reproduce the bug on the Gitea demo site?

Yes

Description

The light theme does not make a difference between preprocessor directives (.cp) and comment lines (.cm):

.chroma .cm { color: #999988; } /* CommentMultiline */
.chroma .cp { color: #999999; } /* CommentPreproc */
.chroma .cpf { color: #999999; } /* CommentPreprocFile */

This makes the code difficult to read :

Screenshot_2022-02-08_11-50-04

.cp (and possibly .cpf) should be different than comments.

For example (I am not an artist, so the values below are not a suggestion :-) :

.chroma .cp { color: #109295 } /* CommentPreproc */
.chroma .cpf { color: #4C4DBC; } /* CommentPreprocFile */

Allow to have a more readable code :

Screenshot_2022-02-08_11-54-40

Originally created by @braoult on GitHub (Feb 8, 2022). ### Gitea Version 1.16.1 ### Operating System N/A ### Browser Version N/A ### Can you reproduce the bug on the Gitea demo site? Yes ### Description The light theme does not make a difference between preprocessor directives (`.cp`) and comment lines (`.cm`): ``` .chroma .cm { color: #999988; } /* CommentMultiline */ .chroma .cp { color: #999999; } /* CommentPreproc */ .chroma .cpf { color: #999999; } /* CommentPreprocFile */ ``` This makes the code difficult to read : ![Screenshot_2022-02-08_11-50-04](https://user-images.githubusercontent.com/8958429/152973059-d4bd1e41-e3a7-4a6e-a47f-723f6c889c83.png) `.cp` (and possibly `.cpf`) should be different than comments. For example (I am not an artist, so the values below are not a suggestion :-) : ``` .chroma .cp { color: #109295 } /* CommentPreproc */ .chroma .cpf { color: #4C4DBC; } /* CommentPreprocFile */ ``` Allow to have a more readable code : ![Screenshot_2022-02-08_11-54-40](https://user-images.githubusercontent.com/8958429/152973386-743e29ae-5b22-4dc3-9024-b9619469ec75.png)
Author
Owner

@braoult commented on GitHub (Feb 8, 2022):

Messed up repos... Re-opening for new PR.

@braoult commented on GitHub (Feb 8, 2022): Messed up repos... Re-opening for new PR.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8525