Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: ollydbg on February 04, 2015, 08:59:34 am

Title: custom CSS to change the font size in code and quote tags for our forum
Post by: ollydbg on February 04, 2015, 08:59:34 am
You may already noticed that after forum upgrade to 2.x, the font size in quote and code tags are smaller. See the screen shot below (I'm using the Core theme, this is much similar to our old 1.x forum theme.
(http://imagizer.imageshack.us/v2/896x488q90/673/kMRxci.png)
To customize the font in those fields, I just find a simple way:

1, use the Stylish :: Add -ons for Firefox - Mozilla Add-ons (https://addons.mozilla.org/en-US/firefox/addon/stylish/)
2, create a simple new style, and paste those code to the content of your new style. The original code font is "x-small", I just change it to "small".
Code
@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("forums.codeblocks.org") {
    .bbc_code {
    font-size: small !important;
    }
    .bbc_standard_quote {
    font-size: small !important;
    }
    .bbc_alternate_quote {
    font-size: small !important;
    }
}
3, enable your new style. Done. See the screen shot after this change.

(http://imagizer.imageshack.us/v2/1169x583q50/912/iaLufe.png)



PS: this is my first time to learn CSS, so my custom CSS may contains errors.
PS2: see this as a reference: How To Fix Small Annoyances On The Web With Stylish [Firefox & Chrome] (http://www.makeuseof.com/tag/fix-small-annoyances-web-stylish-firefox-chrome/)
Title: Re: custom CSS to change the font size in code and quote tags for our forum
Post by: ollydbg on April 13, 2015, 12:30:28 am
2015-04-13, some update to the code tags font setting, note that there are many code tag types, but my script only handle few of them(such as cpp, text, diff).
Code
@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("forums.codeblocks.org") {
    .bbc_code {
    font-size: small !important;
    }
    .bbc_standard_quote {
    font-size: small !important;
    }
    .bbc_alternate_quote {
    font-size: small !important;
    }
    .cpp{
    font-size: small !important;   
    }
    .text{
    font-size: small   !important; 
    }
    .diff{
    font-size: small   !important; 
    }
}