Could we change the forum's CSS for displaying rust code?

Hi everyone,

I love the forum and find a lot of kind help for my learning purposes. Yet the syntax highlight for rust code is a bit tad and grey:

    pub fn run(&mut self) {

        let mut last_tick = std::time::SystemTime::now();

        loop {
            // takes user input and move the shape accordingly

            // check if we reached time to tick again, then tick
            if last_tick.elapsed().unwrap().as_millis() >= self.speed {
                self.game_over(); // checks if game is over
                self.clear_full_rows(); //
                last_tick = std::time::SystemTime::now();

Compared with, for instance, what Atom shows:


Is there something we could do about it ?


Please don’t! On my Mac the Atom example is a black blob with overlays of red, yellow, blue and gray that is very hard to read. The gray comments are virtually unreadable.


There is a dark theme for the site as a whole available at - still doesn’t make the code quite as colorful as your average editor, but it’s something.

1 Like

Pro tip: You can install browser extensions to apply your own CSS rules to any website. For example, Stylish is available for Firefox and Chrome:

And if you need additional language parsing, you can do that with Greasemonkey/Tampermonkey and your favorite language parser.

1 Like

The style could be changed by an URL query, say

It would then be placed in a session storage.


  • It does not affect people who don’t want to use it.
  • People don’t need to write/apply alternative style sheets by themself.
  • People don’t need to do configurations by themself.
  • People can quickly change configurations, or say enter into.
  • People who only read don’t need an account.
1 Like

As @17cupsofcoffee already mentioned above, the forum software already has the ability to switch themes through There’s even a dark theme already there.

It does not allow you to configure it without registering an account, but that’s a minor inconvenience compared the the expense of installing server-side customization to the forum software.

Fair enough, thanks for you feedback!

My main gripe with the code highlighting is the color of comments. Comments tend to be documentation so I like themes that make them colorful and stand out instead of dulling them into the background (your atom example does the same though).

TIL, thank you !

1 Like

@medusacle: Absolutely ! The S tylish plugin has a gorgeous dark theme for GitHub by the way, the comments stands out in a beautiful way:


I was thinking of such a theme when I wrote my post by the way. Should have precised.

Update on the other answers : in my first post I already display the forum’s native dark theme. I’ll have to look into what you tell me about, and I’ll come back with better questions.