I want a blank line automatically inserted between paragraphs, how do I do it?
I thought CSS was the way, but Sugar Cane seems to break paragraphs with <br> rather than <p>, so is pretty much immune to CSS.
I thought postrender might be a way, but so far that has eluded me too. What are the properties and methods on the content object, for instance?
I am using Sugar Cane, by the way.
Comments
But, I wonder if this would just cause other unforseen problems - for instance, someone could be selecting <br>s in CSS and styling them in some way.
Any thoughts on this are welcome.
I use a lot of tables styled with CSS, but they are all in "nobr" passages, so I guess I never noticed.
Actually, all of my passages have the "nobr tag." I'd love if there was a way to set that to be the default.
Also, speaking of <br>, in a passage tagged "nobr", these produce different results: And Would you ever consider some sort of super blank un-styled sort of CSS header for Twine for people who want to write their own CSS basically from scratch or as near to it as possible? Maybe that's out of the question, and I know you're hard at work on Twine, just throwing that out there. I don't mind battling CSS nearly as much as I hate battling CSS in Twine.
Anyway, I'm not griping at you for my inadequacies in CSS. I appreciate all your hard work and effort greatly and am thankful you asked for our opinions.
Yes, but the devil is in the details and that would be what is a paragraph and what is not.
While it would be easy to say that one or more sentences of plain text is obvious a paragraph.
What about if that same text is included via a <<display Passage_name>>, via a <<print $string_of_text>>, or even contained within a table cell.
Is the wrapping done at the time of generating the HTML file, by the JS engine or both?
A clear set of rules of when to wrap and how would need to be worked out, and also how to allow an Author to disable it all.
A paragraph would be a non-empty string preceding something that ends a paragraph. Things that end a paragraph would be end of passage and two or more consecuitive newlines. But also things that are mapped to HTML that is not valid inside <p> tags, such as lists (<ul> and <ol>).
Doing it at compile time is inconsistent with how TiddlyWiki works; that would only be an option when redesigning the entire system. That is outside the scope of this discussion, but I am curious whether the runtime HTML generation is a historical coincidence (because TiddlyWiki happens to be written in JavaScript) or whether it was done this way because it has benefits over compile time HTML generation.
When doing it at runtime, as you touched upon, the question is whether paragraph building would be done before or after the macro expansion. I think it should be done after, since it is not easy (and in the case of custom macros, not even possible) to know whether a macro will produce something that is not allowed inside a <p> element.
I cannot really foresee the full impact of generating <p></p> pairs. I do think that this would make CSS customization simpler than when using line breaks.
W-web programming... how could you do this to me...