User blog comment:Kirkburn/Syntax highlighting - helping you read and write code/@comment-26501002-20150310002013/@comment-452-20150311181322


 * Customizable options for this are definitely a great idea. There is most definitely going to be people who want to completely customize this asset

I second this. I looked into customising it with CSS, but unfortunately each of the highlights is completely dynamic.

Instead of using a class for each colour - the way CSS is supposed to be used - an individual class is created for each highlight - this causes a massive amount of duplication.

The highlighting for   is rendered as: With the CSS: #s0:before { background-color:#d9eaf6; content:'' } background-color:\A ' }
 * A basic example
 * s0:after {
 * s1:before{

How it could be done to allow for easy customisation: background-color:#d9eaf6 } background-color:#f5e0d8 } content: }  content: }  content:'\A ' } This particular example uses 60 more characters to allow for customisation, and each additional block would require 17 additional characters. My quote template has 36 highlight blocks, so the increase in size to allow block colours to be customised would be around 900 characters. (Or more, I'm unsure how many differently coloured blocks there are.)
 * 1) wpTextbox0 .l {
 * 1) wpTextbox0 .p {
 * s0:before {
 * s1:before {
 * s2:before {

I'm unsure whether that's a factor into why it was done the way it was - I don't know whether Wikia attempts to minimise browser memory usage.