I have just installed wp-syntax and it's working, but I did run into a couple of issues - I'm interested to know if these are known issues or I have just misunderstood the right way to do things...
Problem #1: I am using a child theme built off the default wordpress twenty-ten theme. When I first attempted to insert code into a post using wp-syntax, the text was way too large and it turned out to be because the styling was coming from my theme and not from the wp-syntax css file.
With a little investigation I figured out that the reason was that the twenty-ten stylesheet has 'pre' declarations that are more specific than those in the wp-syntax stylesheet. They are more specific because they are defined in the context of the #content id selector, e.g. -
#content pre {
font-size: 15px;
line-height: 21px;
}
whereas the wp-syntax declarations are defined in the context of the
.wp-syntax class context, e.g. -
.wp_syntax pre {
...
font-size: 12px;
line-height: 1.333;
...
}
Ok, not a big problem - the solution is to precede the wp-syntax declarations in wp-syntax.css with the #context id selector. Except for -
Problem #2: The wp-syntax usage documentation says, "To customize your styling, copy the default wp-content/plugins/wp-syntax/wp-syntax.css to your theme's template directory and modify it. If a file named wp-syntax.css exists in your theme's template directory, this stylesheet is used instead of the default."
Sounds simple. However this didn't work the first time I tried it. It turns out - as far as I can tell - that when using a child theme, wp-syntax.css has to be copied into the parent theme, not the child. Once I copied the stylesheet into the twenty-ten theme directory, everything worked as desired.
Although this works, the fact that I had to modify the parent theme directly is a little messy - it means there is no way to attach custom wp-syntax styling to just the child theme. I did try putting a copy of wp-syntax.css in both the parent and the child and making changes to the latter, but these were ignored.
I guess this is really a WP issue, not specifically a wp-syntax issue, but I'm curious whether anyone here has run into the same problem or has a better solution.