// This code consists of a one-line comment, nothing more
source-boxes shouldn't have a minimum height
Whenever I post some source code snippets (bracketed by the "source" directive) it always bugs me that the resulting box appears to have a fixed minimum height of around, oh, 16 lines or so. If you want to post single lines of code, it ends up looking pretty silly. Witness:
I can see a value in adding a blank line at the top and the bottom, but the remaining lines, that's just silly (and, worse, inconvenient)!
Can this be fixed?
Well, you can use code tags instead for shorter snippets, but they don't provide the syntax highlighting.
It's not quite the same as a source box that nicely collapses down if the contents are small, but it does let you post shorter snippets without a huge and needlessly spaced-out post.
// A demonstration of a comment in some code tags
It's not quite the same as a source box that nicely collapses down if the contents are small, but it does let you post shorter snippets without a huge and needlessly spaced-out post.
IMHO, modifying the way the code box is drawn to make it variable-height actually seems like quite a good idea.
I can definitely understand if this cannot be done because of technical limitations, but if my understanding is correct, the forum software here is homegrown/modified in-house (I'm not really sure), and so technical limitations would probably be trivial.
Not that I'm complaining about the current codeboxes... but a clever idea is a clever idea.
I can definitely understand if this cannot be done because of technical limitations, but if my understanding is correct, the forum software here is homegrown/modified in-house (I'm not really sure), and so technical limitations would probably be trivial.
Not that I'm complaining about the current codeboxes... but a clever idea is a clever idea.
How's that?
Seems to work for me in Firefox2. I'd appreciate success/failure reports from folks on other browsers.
Seems to work for me in Firefox2. I'd appreciate success/failure reports from folks on other browsers.
Doesn't work in good old classic black (I suspect you already knew this), but works fine in the white theme using Firefox 2.0.0.1 and IE6 although IE6 was doing its absolute best to cling on to an older style sheet (had to clear cache manually) [smile]
All the best,
ViLiO
All the best,
ViLiO
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement