Forums

PluGeSHin
Change Colours and Regenerate style.css (2 posts)

  1. lornajane
    Member
    Posted 9 months ago #

    Hi,

    Thanks for making plugeshin! It uses the same in-post markup as serendipity and I just migrated my site from that to wordpress.

    I would like to change the colours used in the code samples, to fit in with my site theme, however changing settings in the language-specific files isn't helping since the styles don't come from there, but they come from style.css. How can I regenerate style.css to take account of my changes? (I'm a PHP developer, a very technical answer is fine)

    Thanks :)

    http://wordpress.org/extend/plugins/plugeshin/

  2. pajtai
    Member
    Posted 9 months ago #

    Hi, thanks for using PluGeSHin.

    As you've noticed, the plugin uses an external stylesheet. It was created using one of the contributed GeSHi files (cssgen2.php).

    To regenerate the CSS you will have to create the stylesheet, then copy or paste it into style.css.

    To do this, first update the language files, then go to:

    http://YOUR-DOMAIN/wp-content/plugins/plugeshin/GeSHi-1.0.8.10/geshi/contrib/cssgen2.php

    A stylesheet should automatically download. Ignore the errors reported after the redirect to cssgen.php. Take your newly downloaded style sheet and replace the existing style.css with it.

    Make sure you back up both your edited language files and style sheet outside of the PluGeSHin directory, as I'm not sure how plugin updates will affect it.

    For future updates, I'll have to look into a more user friendly way to accomplish this.

    If you are only making relatively few CSS changes, you could include a second stylesheet (you could put it anywhere (e.g. your theme) and load it on the front end with the WP function of enqueue_style() in the functions.php of your theme). The only trick would be that you would have to make the styles for the secondary CSS with greater specificity ( http://www.w3.org/TR/CSS2/cascade.html#specificity ) than the ones in style.css (adding a class or id to the front usually does the trick - e.g. #wrapper .ada .kw1 {color: #000;} would over write the original .ada .kw1 {color: #00007f;}.

    Hope this helps. Let me know if you get it to work.

    Peter,

Reply

You must log in to post.

About this Plugin

About this Topic