![]() |
#16 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,477
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Is there some other inherited css that impacts it. Fire up PageEdit's Inspector and position your cursor on that br tag and look exactly at the style information in and around that tag. Perhaps the margins on the parent tag controls that?
|
![]() |
![]() |
![]() |
#17 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 383
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
That's a neat little function...
This is what I got: Code:
element.style { } .brheight { line-height: 1.75em; } .dedic { font-size: 1.1em; margin-top: 6em; margin-right: 5%; text-align: right; } p { display: block; margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; line-height: 1.15em; } .calibre { display: block; font-family: serif; font-size: 1em; line-height: 1.1; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; padding-left: 0; padding-right: 0; page-break-before: always; text-align: justify; } Other properties that have strike-throughs (again, correctly, as far as I can tell) are "font-size" and "text-align" in ".calibre". But still, no visual effect on the <br>'s line-height The code itself is: Code:
<body class="calibre"> <p class="dedic">For KevinH<br class="brheight"/>Who always manages<br/>to get it put together right</p> |
![]() |
![]() |
![]() |
#18 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,477
Karma: 5703586
Join Date: Nov 2009
Device: many
|
PageEdit and Preview do not keep end tags. They are a tree of nodes of different types with a single parent link and multiple children links. End tags only exist in xml/xhtml/html to make it clear where siblings and children end a new node begins so that the tree of nodes can be formed. This tree is often referred to as the DOM or DOM tree.
If you look in the Inspector and have it show the code and find the br tag please take a screen shot of it styles and post it here. If there is a bug, it is in Chrome's layout engine which is used by the graphics library Qt, that both PageEdit and Preview use. Just to test, cause I know it looks terrible, but please try applying an inline style attribute with the line height right inside the br tag itself (which should have highest priority in css) Did that impact anything? |
![]() |
![]() |
![]() |
#19 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 383
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
I assume you mean something like:
Code:
<br style="line-height:1.5em;"/> I also tried adding Code:
display: inline; However, if i create a <span> around the <br> and add the "line-height: 1.5em;" property to the css for the <span> it does work. Not that this is an actual solution; that's super duct-tape-and-super-glue-style coding. Also, please see the screengrab for "<br />" being displayed as "<br></br>" in PageEdit. EDIT: Ha! I just realized that PageEdit's prettification inserts a line-break after <br> tags... EDIT2: FWIW, I opened the file in Sigil 0.7.2, and the preview (and ye olde Book View) correctly renders the line-height property. Last edited by ElMiko; 05-11-2025 at 04:39 PM. |
![]() |
![]() |
![]() |
#20 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,477
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Sigil 0.7.2 does not use Qt Webengine it uses the very old QWebKit version and that is now full of security holes since it was never updated and eventually dropped in favour of QtWebEngine which is Chrome.
I am surprised that a br tag can not seem to have a line-height property but a span wrapping that tag can. Did a web search ... Ah this is a known thing ... inline tags line height are ignored. It is controlled by the parent block tag. See this link for more info. https://stackoverflow.com/questions/...s-not-work-why Lots of things changed since the old html4 epub2 days. You can of course use css to make your br tag a block tag so that line-heights will work like the old days. See the bottom of that link for another link to more info. Last edited by KevinH; 05-11-2025 at 05:48 PM. |
![]() |
![]() |
![]() |
#21 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 383
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Thanks, KevinH... Serves me right for waiting so long. That's going to be a drag to go back and fix across the library...
Looks like the closest thing to a working solution is: Code:
{ content: " "; display: block; margin: 0.5em 0; } |
![]() |
![]() |
![]() |
#22 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,311
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
I don’t think this would “cause problems down the line.” This is a visual issue that is determined by what each device’s rendering engine is, yeah? Some will display properly, others won’t (until their engine is updated anyway).
In the meantime, <br/> is only supposed to be a line feed, so it is inheriting line-height from its parent. If it’s critical to have that extra line-height in a line feed, then it should be included in the parent…if you are only looking for extra spaces between verses, then start a new line <p class="space"> or something. |
![]() |
![]() |
![]() |
#23 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,357
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
The rendering in Sigil's webengine is never going to be indicative of how it looks on all other ebook rendering systems. The same was true of the WebKit renderer in the old version of Sigil as well. This is a non-starter in my opinion. There's no need to accommodate it with a change to your css to try and make new Sigil render like old Sigil. Doing so is probably chasing something that's not even an issue on reading devices/apps.
|
![]() |
![]() |
![]() |
#24 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,477
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Just for laughs, I did a web search and Sigil 0.7.2 was released in April of 2013 I believe. That is 12 years ago. Html, the web and even ebooks have changed enormously in that time. I am truly surprised that binary will even run on modern Windows platforms. The macOS version will not and I would bet the linux executable versions may have a few issues with glibc changes over that time as well. It is a real tribute to Microsoft that they have kept backwards compatibility for so very long.
|
![]() |
![]() |
![]() |
#25 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,628
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Toxaris' EPUB Tools addin for Word hasn't been updated since 2018, not only does it work with latest versions of Word, it works better than it ever did. Example: it's second to none Dialogue checker used to stutter, stop, start and wedge as it parsed the text (it's a visual process), but with each release of Word (2016/19/21/24) Dialogue checker has become smoother, faster, and much less likely to wedge. BR |
|
![]() |
![]() |
![]() |
#26 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 383
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Quote:
|
|
![]() |
![]() |
![]() |
#27 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,477
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Yes the original Sigil software design and use and design of C++ classes, etc was quite good. It literally took me two years to get up to speed enough to feel comfortable and appreciate the design.
That said ...Tidy would occasionally eat your text, it crashed so much people had to constantly use save as, forced you to structure your epub into their structure, did not support html5, or epub3, or accessibility, had no plugins, no support for epubcheck, no support for css validation or css 3, relied on an out of date and unsafe QWebkit, and outdated Qt3 or Qt4, an outdated and cumbersome Xerces xml parser. Basically there is very little left on the old Sigil internals as we have had to replace most of them to make Sigil do what is needed to edit modern epubs. The number of crash bugs we have fixed since then was huge. To me good software should never crash. And add to that the changes in the C++ language standards and in compilers, the old code base would never even compile on any modern system. Also, given operating systems evolve over time too, breakage is inevitable without constant upkeep, redesign, rewriting, and maintenance. But to each their own. Last edited by KevinH; 05-12-2025 at 10:24 AM. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Code Hints in Sigil? | oston | Sigil | 3 | 04-09-2024 03:27 PM |
source code of sigil | Aymen Boss | Sigil | 6 | 07-18-2018 11:51 PM |
Collapse and expand code in Sigil | samirahmed007 | Sigil | 9 | 07-06-2017 09:44 AM |
Sigil code hints | kakkalla | Sigil | 12 | 05-13-2013 03:31 PM |
Are the SGC_# a sigil code? | JaneFancher | Sigil | 14 | 09-06-2010 04:08 AM |