Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-24-2024, 06:02 AM   #16
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 479
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
It seems a primary reason for unitless is inheritance behavior, https://developer.mozilla.org/en-US/...SS/line-height

That's not really applicable to my use case here. In any event, the point was using line-height with p wasn't working with any variation of line-height ("I've tried large and small numbers with em, unitless and %, but it always looks the same.")

I continue to think different treatment of paragraph and heading tags with respect to whether CSS line height has an affect makes little sense.

Last edited by foosion; 09-24-2024 at 06:06 AM.
foosion is offline   Reply With Quote
Old 09-24-2024, 08:08 AM   #17
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,348
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
Did you try !important?? Did that have any effect?
Turtle91 is offline   Reply With Quote
Old 09-24-2024, 09:50 AM   #18
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 479
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Quote:
Originally Posted by Turtle91 View Post
Did you try !important?? Did that have any effect?
It did not have any effect.
foosion is offline   Reply With Quote
Old 09-29-2024, 09:54 AM   #19
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 479
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Line-height also affects div.

Found in an ebook which uses <div class="ct"> for a chapter title. Why don't they just use an h?
foosion is offline   Reply With Quote
Old 09-29-2024, 10:25 AM   #20
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,348
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
Quote:
Originally Posted by foosion View Post
Line-height also affects div.

Found in an ebook which uses <div class="ct"> for a chapter title. Why don't they just use an h?

Some software was written before people cared about proper semantics. Back then all styling was done in-line. With the advent of css there was a major push to use semantics only in the html file and all styling to be accomplished in the css.


Unfortunately, the programmers of those early software programs weren't paid enough to change their paradigm so their software....sucks....
Turtle91 is offline   Reply With Quote
Old 09-30-2024, 08:00 AM   #21
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,750
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by foosion View Post
Line-height also affects div.

Found in an ebook which uses <div class="ct"> for a chapter title. Why don't they just use an h?
I've seen some eBooks where there was no <p>. They are all <div>. Sure technically it works, but it's crappy code.
JSWolf is offline   Reply With Quote
Old 10-01-2024, 12:54 PM   #22
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 479
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
For today's crappy code, a book with style="whatever" littered throughout the text. If every h2 is <h2 style="text-align: center";>, which not just put that in the CSS?? Similarly for many other tags.

Probably a rhetorical question.
foosion is offline   Reply With Quote
Old 10-01-2024, 03:42 PM   #23
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,348
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
You are exactly right. Semantics in the html <h2/p/div/ol/ul/table> etc to define WHAT it is… the css has how it LOOKS.

I have seen some nasty code that defined <p class="paragraph"> instead of just defining the standard paragraph css and using <p>. Of course, if you have a SPECIAL paragraph that you want to give a different look, you can define it with a class <p class="special">.
Turtle91 is offline   Reply With Quote
Old 10-01-2024, 07:16 PM   #24
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 479
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Quote:
Originally Posted by Turtle91 View Post
You are exactly right. Semantics in the html <h2/p/div/ol/ul/table> etc to define WHAT it is… the css has how it LOOKS.

I have seen some nasty code that defined <p class="paragraph"> instead of just defining the standard paragraph css and using <p>. Of course, if you have a SPECIAL paragraph that you want to give a different look, you can define it with a class <p class="special">.
One issue with <p> is distinguishing paragraphs with a text-indent and those without. Some CSS defines <p> with a text-indent and then has a class="noindent", typically for the first paragraph of a section, while others define <p> without an indent, then add a class="indent" for every paragraph other than the first.

Is one of these more canonical?
foosion is offline   Reply With Quote
Old 10-01-2024, 07:45 PM   #25
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,185
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by foosion View Post
One issue with <p> is distinguishing paragraphs with a text-indent and those without. Some CSS defines <p> with a text-indent and then has a class="noindent", typically for the first paragraph of a section, while others define <p> without an indent, then add a class="indent" for every paragraph other than the first.

Is one of these more canonical?
There is no such thing as canon when it comes to writing CSS. There are many ways of getting the same results and all are equally valid. There is no one true way.

Generally, I try to use the naked tag for the more common case so I would use p for the indented paragraphs and p class="noindent" for the less common scenario though I've seen several uses of the :first-child pseudo-class. My general preference is for simpler CSS where possible.

The only "canonical" item when it comes to paragraph indents is that you can use indents or spacing between paragraphs. Do not use both.
DNSB is online now   Reply With Quote
Old 10-01-2024, 08:06 PM   #26
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,348
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 agree. I prefer the vast majority of “standard” paragraphs to be the naked <p> and the specials to have the class. Although I also use the more complex css (with appropriate fallback coding) when I know the target device can handle it.

I don’t know that it is “canonical” to not specify indents or line-height at all and leave it to the user to set in their app/device. The flip side of that argument is that some devices/apps don’t allow that setting to be adjusted, so there should be some default…

All I DO know for sure is that I’M right and everyone else is not as good!!
Turtle91 is offline   Reply With Quote
Old 10-01-2024, 08:37 PM   #27
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 479
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
There should be one-- and preferably only one --obvious way to do it.
-- https://peps.python.org/pep-0020/

foosion is offline   Reply With Quote
Old 10-01-2024, 09:46 PM   #28
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,185
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by foosion View Post
There should be one-- and preferably only one --obvious way to do it.
-- https://peps.python.org/pep-0020/

Sadly, there are many ways to do most programming tasks. Back when I was at university, I took a programming class. I rapidly noticed that even if one of my classmates didn't place his name on a program listing, their programming style was enough to identify them 90% of the time. Much like identifying an artist by their brushstrokes or a writer by their word choices and the structure of their writing, most programmers 'sign' their work.

I do agree with much of what those 19 aphorisms say though beauty is in the eye of the beholder. You may not think using DAA to convert binary to ASCII hex is beauty. Others would disagree.
DNSB is online now   Reply With Quote
Old 10-02-2024, 07:09 AM   #29
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 479
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Quote:
Originally Posted by DNSB View Post
I do agree with much of what those 19 aphorisms say though beauty is in the eye of the beholder. You may not think using DAA to convert binary to ASCII hex is beauty. Others would disagree.
A nice way to see the list is to execute in Python

Code:
import this
Of course, the best import to execute in Python is

Code:
import antigravity
foosion is offline   Reply With Quote
Old 10-02-2024, 11:49 PM   #30
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,185
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by foosion View Post
Of course, the best import to execute in Python is

Code:
import antigravity
Tried that once & it took me hours to get down from the ceiling. Never again!
DNSB is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Line height issue Mercador Kobo Reader 19 07-21-2020 02:32 PM
CSS line height vs Kobo line spacing slider? bongoman Kobo Reader 2 07-12-2020 01:25 PM
line height Rellwood Conversion 3 04-07-2018 04:34 AM
Aura H2O Line height setting is ignored kAlvaro Kobo Reader 6 08-09-2016 07:59 AM
Line spacing confusion Wrongway Kobo Reader 3 04-05-2014 07:23 AM


All times are GMT -4. The time now is 07:11 PM.


MobileRead.com is a privately owned, operated and funded community.