REQ: Better <code> style on dark theme

Hi,

The blueish background used in the <code> block is a special design choice. It’s way to light to allow good contrast.

' Sample VBS Script

Dim userName
userName = InputBox("Entrez votre nom:", "Bienvenue")
If userName <> "" Then
    MsgBox "Bonjour, " & userName & "!", vbInformation, "Salutation"
Else
    MsgBox "Vous n'avez pas entré de nom.", vbExclamation, "Erreur"
End If
// Sample JS Script

let userName = prompt("Entrez votre nom:", "Bienvenue");
if (userName !== null && userName !== "") {
    alert("Bonjour, " + userName + "!");
} else {
    alert("Vous n'avez pas entré de nom.");
}

Any way to improve that for everyone or should I rely on stylus to customize this for my own taste (which would be totally ok)?

Playing around with it quickly, it needs to be at least that light for the green comment to be legible - otherwise that color would need to change as well (plus maybe others too). Finding contrasting colors that work in all situations can be quite difficult.

I wonder if there's an issue with the forum software actually, as I keep changing this color but it keeps going wrong again a few weeks later. (Either that or it looks VERY different on different screens, and I fix it for one but then it doesn't work on another. I'll look into it when I have a moment.)

I think it was that, actually. It was very easy to read on my normal screens, but still hard to read on my OLED TV downstairs.

I've changed it to be much brighter, which should work everywhere.

This is for the comments, which I think were the main issue. Everything else was readable on both screens.

You'll also get different background colors if you specify vbscript or javascript as the language:

' Sample VBS Script

Dim userName
userName = InputBox("Entrez votre nom:", "Bienvenue")
If userName <> "" Then
    MsgBox "Bonjour, " & userName & "!", vbInformation, "Salutation"
Else
    MsgBox "Vous n'avez pas entré de nom.", vbExclamation, "Erreur"
End If
// Sample JS Script

let userName = prompt("Entrez votre nom:", "Bienvenue");
if (userName !== null && userName !== "") {
    alert("Bonjour, " + userName + "!");
} else {
    alert("Vous n'avez pas entré de nom.");
}

Background still seems too bright for a dark theme. And any chances to add alias vbs and js ? I used that in the first post expecting it would work like in GitHub.

I don’t think we have control over the language names. Vbscript and JavaScript both work, and are what you’d need to use on most other Discourse forums as well.