Hi all,
From the beginning, I've attempted to create intuitive vertical spacing in BoltWire and have been reasonably successful. When you enter line breaks into your text, they show up in the html. And for the most part, wysiwyg...
But it's never been perfect. Sometimes you have to fiddle with things a bit to get the exact vertical spacing you desire. Maybe add an extra <br> or use css to control the height of a table or div, or add some hardspaces to force a line break, etc. And the more you try and fine tune things the more you have to tweak other things to get it all to work together. It's not a huge issue, but it's one of those minor nuisances that keeps popping up now and then.
Well, today I was trying to improve the brains in BoltWire to solve an irritating detail related to this, and ended up deconstructing the whole vertical spacing process and rebuilding it. Turns out there was a far easier way to manage things, and so far it's giving amazing results (both in the displayed output and in the underlying html). And while I may not have accounted for every possible markup or combination thereof, the code so far is working flawlessly--and producing beautiful, elegant code. And it's far simpler, meaning we could easily tweak things if I did miss something.
There's one drawback however: I eliminated the <p> tag and switched to using a double <br> tag at the end of each line instead. I won't get into all the reasons, but essentially, forcibly inserting the <p> tag was the problem all along, because it was virtually impossible to tell when a line was a paragraph or something else--at least not in every case. And that ambiguity was really the root problem. Leading to complex code, and flawed output. Using line breaks just solves that issue.
I went back through most of my main site and the display was pretty much identical. And wherever things were shifted one way or another, by editing the page, I found, it was caused by some jury-rigging fix that was no longer needed. Deleting those "tweaks", and everything fixed itself beautifully. In other words, the only problems were my complicated, time consuming, and hard to figure out, wonky, workarounds... :)
Anyway, I'm inclined to put this new approach in the core. But wanted to solicit feedback on no longer wrapping paragraphs in <p></p>. In particular, I suspect this may cause some issues with html validation--though I'm not even 100% sure on that. And in every other way, it's just better.
I recognize, in some cases there may be a need for p tags so I'm plannning to add some markup to manually indicate when a line of text should be wrapped in a paragraph tag. At the moment I'm thinking of a single "." at the beginning of a line of text would work nicely. It might require a change in your css so the paragraph vspace and the line break vspace don't double up in your output. But that's easy enough.
On my site, I haven't found a single instance where the absence of <p> tag adversely affects the display, and the html is significantly more readable. But before fully committing, I wanted to invite feedback.
Thoughts?
Dan
Climb higher in your walk with God...