code box font color

Questions about the project and the distribution - obviously no support questions here please
Forum rules
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 6 months after creation.
Locked
Elderwuss

code box font color

Post by Elderwuss »

I can find no way to change the color of fonts in CODE: boxes. Does this require a Linux Mint agent? If so please change the font color to something closer to black than white. The current light blue/green is unreadable for me. :(
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29597
Joined: Wed Jul 06, 2011 3:58 am

Re: code box font color

Post by xenopeek »

Assuming you are using the Firefox browser. There are various add-ons to Firefox that let you customize the style of a website, for example making the code block have white on black text. I don't have any experience with those however, so somebody else will have to chirp in on that. But you can also do this easily by creating a file of user content. To start, open a terminal and run the following commands (I'm not using the code block so you can read it better):

cd ~/.mozilla/firefox/*.default
mkdir chrome
cd chrome
gedit userContent.css


After you have run these four commands, you should have gedit text editor open. Copy the following six lines into it

@-moz-document domain(linuxmint.com) {
code {
background-color: black !important;
color: white !important;
}
}


Save and close the file. Restart Firefox, and any CODE blocks on the linuxmint.com website are now white text on a black background. You can change that to other colors as desired, and you can add other CSS markup, for example to change the font-size or the font-weight.
Image
Elderwuss

Re: code box font color

Post by Elderwuss »

Cool...Thank you very much.
Locked

Return to “Non-technical Questions”