mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 16:22:44 +00:00
Artificial column-break at page end
Inserting a \column into the end of the page (and a nbsp after). This makes the page emulate column-fill:auto (the standard "Homebrewery" behavior) since there is always at least one column-break, making the browser try less hard to aggressively "balance" the columns. Then, when a user inserts `wide` or `column-span` elements, `column-fill: balance` will be able to take over and work as we expect.
This commit is contained in:
@@ -130,12 +130,14 @@ const BrewRenderer = createClass({
|
||||
renderPage : function(pageText, index){
|
||||
if(this.props.renderer == 'legacy')
|
||||
return <div className='phb page' id={`p${index + 1}`} dangerouslySetInnerHTML={{ __html: MarkdownLegacy.render(pageText) }} key={index} />;
|
||||
else
|
||||
else {
|
||||
pageText += `\n\\column\n `; //Artificial column break at page end to emulate column-fill:auto (until `wide` is used, when column-fill:balance will reappear)
|
||||
return (
|
||||
<div className='pageWrapper' id={`p${index + 1}`} key={index} >
|
||||
<div className='page' dangerouslySetInnerHTML={{ __html: Markdown.render(pageText) }} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
renderPages : function(){
|
||||
|
||||
@@ -59,6 +59,7 @@ body {
|
||||
}
|
||||
.page{
|
||||
.useColumns();
|
||||
max-height : 100%;
|
||||
padding : 1.4cm 1.9cm 1.7cm;
|
||||
font-family : BookInsanityRemake;
|
||||
font-size : 0.34cm;
|
||||
|
||||
Reference in New Issue
Block a user