I updated to version 2.0 and my Crayon Syntax Highlighter plugin seems to have broken. I know it is not entirely Colorlib’s fault by breaking it as I see the following item in the issue tracker:
Basically, if my source code that I’m displaying on the screen is too long, the width of the page will increase with it. If the source is within the boundaries of the width, all is perfect.
Anything off the top of your head that would have caused this?
I’m no CSS wizard, but I think it would be nice if page elements could not run off the screen.
Before looking at my URL, please note that I’ve implemented a custom CSS hack. Although I’m not entirely pleased with the solution I came up with, it works in the temporary.
If you open the inspector (Firebug, etc.), find the following tag:
#content > div.container.main-content-area > div > div.main-content-inner.col-sm-12.col-md-8
The hack I did was to calculate my own max-width using media queries. If you strip out all the max-width properties from the seven or so media queries you’ll see the content know flows off the screen.
I narrowed this down to the Crayon Syntax Highlighter. For any line of code that is too long for the screen, it will stretch the screen, but remain invisible. Not an ideal thing.
The ideal solution here would be to not force add a max-width calculated from each of my media queries. Otherwise I think I’ll have to add a ton of media queries for pixel perfect displaying. The weird thing is, before 2.0 of Sparkling Theme, the syntax highlighter worked fine. The syntax highlighter hasn’t been updated in more than six months.
Could you please tell me the version of previous Sparkling theme that was using fine for you so that i can compare the difference between these versions to resolve the issue?
Could you please tell me the version of previous Sparkling theme that was using fine for you so that i can compare the difference between these versions to resolve the issue?
It seems the issue with the Crayon Syntax Highlighter plugin CSS so to resolve it could you please remove any CSS fixes that you have used on your site to resolve it and try adding the following CSS code in the Custom CSS option of the latest version of Sparkling theme on the below path.
Admin Area -> Appearance -> Customize -> Sparkling Options -> Other -> Custom CSS
div.crayon-syntax .crayon-pre,
div.crayon-syntax pre {
white-space: initial;
}
That was a worthy attempt, but it introduced a different problem when doing that. When making the change, it enabled a line-wrap for the syntax highlighter. When the line wrapped, it would increase the line number.