![]() |
#16 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#17 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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?
|
![]() |
![]() |
![]() |
#18 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 479
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
|
|
![]() |
![]() |
![]() |
#19 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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? |
![]() |
![]() |
![]() |
#20 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
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.... |
|
![]() |
![]() |
![]() |
#21 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
![]() |
![]() |
#22 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#23 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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">. |
![]() |
![]() |
![]() |
#24 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 479
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
|
Quote:
Is one of these more canonical? |
|
![]() |
![]() |
![]() |
#25 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,185
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#26 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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!! ![]() |
![]() |
![]() |
![]() |
#27 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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/ ![]() |
![]() |
![]() |
![]() |
#28 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,185
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#29 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 479
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
|
Quote:
Code:
import this Code:
import antigravity |
|
![]() |
![]() |
![]() |
#30 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,185
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |