How to change CSS syntax highlighting?

I have a blog hosted on WordPress.com and I bought the โ€œCustom CSSโ€ update to change CSS. Now I want to change some CSS syntax highlighting options provided by Wordpress.com. For example, I want

   [code lang="C"] int main() { } [/code] 

will be displayed with a black background instead of the standard white. I added the Appareance > Modify CSSfollowing code to Wordpress.com :

 .syntaxhighlighter
 {
    background-color: black !important;
 }

As explained here , but this does not work. Any idea?

+3
source share
1 answer

The solution is not only to change the background of the entire syntax accelerator, but also each line, similar to the following:

.syntaxhighlighter
{
    background-color: black !important;
}
.syntaxhighlighter .line .number
{
    color: white !important;
    background-color: black !important;
}
/* First line */
.syntaxhighlighter .line.alt1
{
    background-color: black !important;
}

/* Second line */
.syntaxhighlighter .line.alt2
{
    background-color: black !important;
}

, , .

, firebug plugin firefox, , CSS , . ( .)

BTW: ,

+2

Source: https://habr.com/ru/post/1750495/


All Articles