Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-09-2024, 11:14 AM   #16
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 12,378
Karma: 92073397
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
I read on a Kobo. I use their "not for Kobo" epub2 files. Occasionally I have to fix them. I do convert them to epub2 with some filters / settings I also use for Gutenberg.

A decently done epub works on any epub reader, any Kobo and "Send To Kindle".
A Calibre "Dual Mobi" seems to work on every kindle via USB (K3, DGX, PW1, old Basic, PW3, Oasis 2) all tested and is old mobi and azw3 in one file. A standard epub2 works on "Send to Kindle" or KDP, if it's done correctly.

I don't know why they give themselves so much work for zero value. It's 99.99% novels, not journals or text books that might need more complex stuff (and then a PDF serves best).
Quoth is offline   Reply With Quote
Old 04-09-2024, 04:44 PM   #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,225
Karma: 19000635
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 JSWolf View Post
The main issue is they don't need this ridiculously convoluted code they feel they need to use for a simply formatted eBook. If they did it correctly then they would have no problem and would only need one ePub as it would be compatible without any problem.

I'm not sure what you mean by 'ridiculously convoluted code'??


This is as simple as it gets:


Code:
.first::first-line {font-variant:small-caps}

 <p class="first">Betsy said, 'I love the simplicity of this first paragraph
 in a new chapter.'</p>
compared with putting spans around everything...

Code:
.first {font-size:.8em; text-transform: uppercase;}
.large {font-size:1em}
.small {font-size:.9em}


<p><span class="first"><span class="large">B</span><span class="small">etsy said, '
</span><span class="large">I</span><span class="small"> love the simplicity</span></span>
  of this first paragraph in a new chapter.'</p>
And then the length of text you want to apply the effect to is just a guess using spans...most times you only get a few words with the effect and it looks really silly. Pseudo selectors like ::first-line will automagically apply the effect to the entire first line no matter how short, or long, it is.
Turtle91 is offline   Reply With Quote
Advert
Old 04-09-2024, 05:18 PM   #18
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 12,378
Karma: 92073397
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Even simpler is no drop caps and no small caps. They impair reading comprehension and add nothing to the story.
Quoth is offline   Reply With Quote
Old 04-09-2024, 05:27 PM   #19
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: 76,491
Karma: 136564766
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 Turtle91 View Post
I'm not sure what you mean by 'ridiculously convoluted code'??


This is as simple as it gets:


Code:
.first::first-line {font-variant:small-caps}

 <p class="first">Betsy said, 'I love the simplicity of this first paragraph
 in a new chapter.'</p>
compared with putting spans around everything...

Code:
.first {font-size:.8em; text-transform: uppercase;}
.large {font-size:1em}
.small {font-size:.9em}


<p><span class="first"><span class="large">B</span><span class="small">etsy said, '
</span><span class="large">I</span><span class="small"> love the simplicity</span></span>
  of this first paragraph in a new chapter.'</p>
And then the length of text you want to apply the effect to is just a guess using spans...most times you only get a few words with the effect and it looks really silly. Pseudo selectors like ::first-line will automagically apply the effect to the entire first line no matter how short, or long, it is.
You don't need the text transform to uppercase. Just have the text already be uppercase. Also, it doesn't work in all cases. So it's better for compatibility to use <span>. You also don't need a .small class as <small> is already .9em.

But seriously, why do they need @media queries? At least one breaks in older RMSDK. And they are not needed anyway. Other then Kindle @media queries, I've never seen any in a novel other then from Standard eBooks.
JSWolf is offline   Reply With Quote
Old 04-09-2024, 05:39 PM   #20
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: 76,491
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
@Turtle91 have a look at my modified CSS vs StandardEbooks CSS. The book is McTeague by Frank Norris https://standardebooks.org/ebooks/fr...ad?format=epub

The version I chose is the compatible version which is not compatible.

Can you say that their CSS is less complicated?

StandardEbooks CSS
core.css
Spoiler:
@charset "utf-8";
@namespace epub "http://www.idpf.org/2007/ops";
body {
font-variant-numeric: oldstyle-nums;
hyphens: auto;
adobe-hyphenate: auto;
-webkit-hyphens: auto;
-moz-hyphens: auto;
-epub-hyphens: auto;
text-wrap: pretty;
}
p {
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;
text-indent: 1em;
}
hr {
border: none;
border-top: 1px solid;
height: 0;
margin-top: 1.5em;
margin-right: auto;
margin-bottom: 1.5em;
margin-left: auto;
width: 25%;
}
q::before, q::after {
content: "";
}
blockquote {
margin-top: 1em;
margin-right: 2.5em;
margin-bottom: 1em;
margin-left: 2.5em;
}
h1, h2, h3, h4, h5, h6, hgroup {
break-after: avoid;
page-break-after: avoid;
break-inside: avoid;
page-break-inside: avoid;
font-variant: small-caps;
hyphens: none;
adobe-text-layout: optimizeSpeed;
/* For Nook */
adobe-hyphenate: none;
-webkit-hyphens: none;
-moz-hyphens: none;
-epub-hyphens: none;
margin-top: 3em;
margin-right: 0;
margin-bottom: 3em;
margin-left: 0;
text-align: center;
}
/* simulate h3 in an hgroup */
hgroup h2 + p {
font-size: 1.17em;
}
/* simulate h4 in an hgroup */
hgroup h2 + p + p, hgroup h3 + p {
font-size: 1em;
}
/* simulate h5 in an hgroup */
hgroup h2 + p + p + p, hgroup h3 + p + p, hgroup h4 + p {
font-size: 0.83em;
}
/* simulate h6 in an hgroup */
hgroup h2 + p + p + p + p, hgroup h3 + p + p + p, hgroup h4 + p + p, hgroup h5 + p {
font-size: 0.67em;
}
hgroup > * {
font-weight: normal;
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;
}
hgroup > *.first-child, hgroup > *:first-child {
font-weight: bold;
}
hgroup > p {
text-indent: 0;
}
p.continued, h2 + p, h3 + p, h4 + p, h5 + p, h6 + p, header + p, hr + p, hgroup + p, p.first-child, p:first-child {
hanging-punctuation: first last;
text-indent: 0;
}
cite {
font-style: normal;
}
abbr {
border: none;
white-space: nowrap;
}
blockquote cite {
display: block;
font-style: italic;
text-align: right;
}
blockquote cite i {
font-style: normal;
}
b, strong {
font-variant: small-caps;
font-weight: normal;
}
i > i, em > i, i > em {
font-style: normal;
}
ol, ul {
margin-bottom: 1em;
margin-top: 1em;
}
header {
break-after: avoid;
page-break-after: avoid;
break-inside: avoid;
page-break-inside: avoid;
hyphens: none;
adobe-text-layout: optimizeSpeed;
/* For Nook */
adobe-hyphenate: none;
-webkit-hyphens: none;
-moz-hyphens: none;
-epub-hyphens: none;
text-align: center;
}
header > * + p {
text-indent: 0;
}
article > header + *, section > header + * {
margin-top: 3em;
}
a.epub-type-noteref {
font-size: 0.75em;
font-style: normal !important;
vertical-align: super;
}
section.epub-type-footnotes > ol > li {
margin-top: 1em;
margin-right: 0;
margin-bottom: 1em;
margin-left: 0;
}
/* Invert images in dark mode. RMSDK requires a target media as well as a state. */
@media all and (prefers-color-scheme: dark) {
img.epub-type-se-image-color-depth-black-on-transparent {
filter: invert(100%);
}
img.epub-type-se-image-color-depth-black-on-transparent.epub-type-se-image-style-realistic {
background: currentColor;
filter: none;
}
}
/* For legacy reading systems */
article, aside, figure, figcaption, footer, header, main, nav, section {
display: block;
}
/* ADE can't handle the way we hide the title/author/contributor blocks in the titlepage, so hide them from ADE... */
section.epub-type-titlepage h1, section.epub-type-titlepage p, section.epub-type-colophon h2, section.epub-type-imprint h2 {
display: none;
}
/* ...but enable them for accessibility in all other ereaders */
@supports(font-size: 0){
section.epub-type-titlepage h1,
section.epub-type-titlepage p,
section.epub-type-colophon h2,
section.epub-type-imprint h2{
display: block;
}
}
/* Epub2 compatibility CSS */
img.epub-type-z3998-publisher-logo {
width: 222px;
/* This gets scaled up by 2px when adding the white outside path during the build process */
}
/* Give PNGs a white background for night mode compatibility... */
img.epub-type-se-image-color-depth-black-on-transparent {
background: #fff !important;
/* `!important` is required to make sure readers respect the BG color */
}
/* ...except our house PNGs, which were rendered from SVGs with a white stroke... */
.epub-type-titlepage img.epub-type-se-image-color-depth-black-on-transparent, img.epub-type-se-image-color-depth-black-on-transparent.epub-type-z3998-publisher-logo {
background: transparent !important;
}
/* ...or if the device supports prefers-color-scheme. We’ll invert the image in core.css. RMSDK requires a target media as well as a state. */
@media all and (prefers-color-scheme) {
img.epub-type-se-image-color-depth-black-on-transparent:not(.epub-type-se-image-style-realistic) {
background: transparent !important;
}
}
/* Vertical align any MathML images we might have */
img.mathml {
vertical-align: middle;
}
/* As of 2020-09 hanging punctuation only works on iBooks. However, when it hangs over the page margin, it's
not rendered. So here we simply remove it for iBooks, unless it's on an element that already has a margin
like <blockquote> */
:root[__ibooks_internal_theme] blockquote + p, :root[__ibooks_internal_theme] h2 + p, :root[__ibooks_internal_theme] h3 + p, :root[__ibooks_internal_theme] h4 + p, :root[__ibooks_internal_theme] h5 + p, :root[__ibooks_internal_theme] h6 + p, :root[__ibooks_internal_theme] header + p, :root[__ibooks_internal_theme] hr + p, :root[__ibooks_internal_theme] ol + p, :root[__ibooks_internal_theme] ul + p, :root[__ibooks_internal_theme] table + p, :root[__ibooks_internal_theme] hgroup + p, :root[__ibooks_internal_theme] p.first-child, :root[__ibooks_internal_theme] p:first-child {
hanging-punctuation: none !important;
}
:root[__ibooks_internal_theme] blockquote p.first-child, :root[__ibooks_internal_theme] blockquote p:first-child {
hanging-punctuation: first last !important;
}

local.css
Spoiler:
@charset "utf-8";
@namespace epub "http://www.idpf.org/2007/ops";
.epub-type-z3998-verse p {
text-align: left;
text-indent: 0;
}
.epub-type-z3998-verse p > span {
display: block;
padding-left: 1em;
text-indent: -1em;
}
.epub-type-z3998-verse p > span + br {
display: none;
}
/* All dedications */
section.epub-type-dedication {
text-align: center;
}
section.epub-type-dedication > * {
display: inline-block;
margin-top: auto;
margin-right: auto;
margin-bottom: auto;
margin-left: auto;
margin-top: 3em;
max-width: 80%;
}
@supports(display: flex){
section.epub-type-dedication{
align-items: center;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: center;
min-height: calc(98vh - 3em);
padding-top: 3em;
}

section.epub-type-dedication > *{
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;
}
}
/* End all dedications */
section.epub-type-dedication p {
font-variant: small-caps;
}
section.epub-type-dedication i {
font-variant: normal;
}
section.epub-type-dedication b {
font-size: 1.25em;
}

se.css
Spoiler:
@charset "utf-8";
@namespace epub "http://www.idpf.org/2007/ops";
/* This may appear in the colophon */
abbr.epub-type-se-era {
font-variant: small-caps;
text-transform: lowercase;
}
section.epub-type-titlepage h1, section.epub-type-titlepage p, section.epub-type-colophon h2, section.epub-type-imprint h2 {
font-size: 0;
/* Required for Kobo not to add an extra page to the title */
left: -999em;
position: absolute;
/* Required for Kindle */
}
section.epub-type-titlepage img {
display: block;
margin-top: 3em;
margin-right: auto;
margin-bottom: auto;
margin-left: auto;
width: 100%;
}
section.epub-type-colophon, section.epub-type-imprint {
text-align: center;
}
section.epub-type-colophon header, section.epub-type-imprint header {
line-height: 0;
margin-top: 3em;
}
img.epub-type-z3998-publisher-logo {
max-width: 25%;
width: 220px;
}
section.epub-type-colophon p, section.epub-type-imprint p {
margin-top: 1em;
margin-right: auto;
margin-bottom: 0;
margin-left: auto;
text-indent: 0;
}
section.epub-type-imprint p {
font-size: 0.75em;
text-align: justify;
width: 75%;
}
section.epub-type-colophon p + p::before {
border-top: 1px solid;
content: "";
display: block;
margin-top: auto;
margin-right: auto;
margin-bottom: 1em;
margin-left: auto;
width: 25%;
}
section.epub-type-colophon a {
font-variant: small-caps;
}
section.epub-type-imprint a, section.epub-type-colophon a {
hyphens: none;
adobe-text-layout: optimizeSpeed;
/* For Nook */
adobe-hyphenate: none;
-webkit-hyphens: none;
-moz-hyphens: none;
-epub-hyphens: none;
}
section.epub-type-copyright-page p {
margin-top: 1em;
margin-right: auto;
margin-bottom: 1em;
margin-left: auto;
text-indent: 0;
}
section.epub-type-copyright-page blockquote p {
font-style: italic;
text-align: left;
text-indent: 0;
}
section.epub-type-copyright-page blockquote p span {
display: block;
padding-left: 1em;
text-indent: -1em;
}
section.epub-type-copyright-page blockquote br {
display: none;
}


My CSS
Spoiler:
blockquote {
margin-top: 1em;
margin-right: 1.5em;
margin-bottom: 1em;
margin-left: 1.5em;
}
body {
widows: 1;
orphans: 1;
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;
text-align: justify;
}
h2 {
text-align: center;
margin-top: 0.8em;
margin-bottom: 0.8em;
}
hr {
margin-top: 1em;
margin-right: 40%;
margin-bottom: 0.9em;
margin-left: 40%;
border-top: 2px solid;
}
img {
max-height: 100%;
max-width: 100%;
}
p {
margin-top: 0;
margin-bottom: 0;
text-indent: 1.2em;
}
h2 + p, hr + p {
text-indent: 0;
}
.center {
text-align: center;
text-indent: 0;
}
.copy {
font-size: small;
margin-top: 0.5em;
text-indent: 0;
}
.ded {
text-align: center;
text-indent: 0;
margin-top: 3em;
}
.noindent {
text-indent: 0;
}
.smallcaps {
font-size: 0.8333em;
}
.spaceb {
margin-bottom: 1em;
}
.subtitle {
margin-top: 0.5em;
text-align: center;
}
.title {
margin-top: 3em;
margin-bottom: 0;
text-align: center;
}
JSWolf is offline   Reply With Quote
Advert
Old 04-09-2024, 10:07 PM   #21
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,225
Karma: 19000635
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 JSWolf View Post
You don't need the text transform to uppercase. Just have the text already be uppercase. Also, it doesn't work in all cases. So it's better for compatibility to use <span>. You also don't need a .small class as <small> is already .9em.
That is actually the argument I made the last time we got in an argument about small-caps...I'm glad to see you got my point!

I actually wasn't trying to make an argument here for small-caps...I was making the argument for pseudo-selectors (the point of this thread). You said that they required 'ridiculously convoluted code'... I was just showing how simple and unconvoluted pseudo-selectors are. Please, don't get thrown off track by the example using small-caps; it could be ANY css used as a example.

Quote:
Originally Posted by JSWolf View Post
But seriously, why do they need @media queries? At least one breaks in older RMSDK. And they are not needed anyway. Other then Kindle @media queries, I've never seen any in a novel other then from Standard eBooks.
I don't think anyone has mentioned media queries here?? We are talking about pseudo selectors...completely different.

Having said that, media queries started out as primarily a kindle thing, but now they can be used to get the screen size and orientation among other things. Definitely useful on any device that supports queries. Added to the functionality of @media is @supports...that way you can check to see if the device supports a css function before setting it. These two things could be considered 'more convoluted' than basic css...but they aren't really that bad once you get used to them. In any case, they should not be confused with the subject of pseudo-selectors.
Turtle91 is offline   Reply With Quote
Old 04-09-2024, 10:18 PM   #22
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,225
Karma: 19000635
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 Quoth View Post
Even simpler is no drop caps and no small caps. They impair reading comprehension and add nothing to the story.
I agree that the simplest form of an ebook is just plain text with no markup whatsoever... But part of the reading experience is having a good presentation! Just try telling a chef that presentation means nothing

I don't care for a book with no style. I am not impaired in any way, shape, or form by having drop-caps and small-caps. I LIKE the way it looks, if it is done correctly. I also like changing the font in certain sections for specific reasons...it most certainly CAN help tell the story.

Do some authors/publishers mis-use styling functions...you betcha!!...but then they screw up basic paragraphs as well... That doesn't mean we need to throw the baby out with that bathwater!
Turtle91 is offline   Reply With Quote
Old 04-10-2024, 07:06 AM   #23
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: 76,491
Karma: 136564766
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 Turtle91 View Post
I don't think anyone has mentioned media queries here?? We are talking about pseudo selectors...completely different.

Having said that, media queries started out as primarily a kindle thing, but now they can be used to get the screen size and orientation among other things. Definitely useful on any device that supports queries. Added to the functionality of @media is @supports...that way you can check to see if the device supports a css function before setting it. These two things could be considered 'more convoluted' than basic css...but they aren't really that bad once you get used to them. In any case, they should not be confused with the subject of pseudo-selectors.
They are that bad when you have no need for them at all. If you se the code I modified, you'll see how convoluted StandardEbooks code is. There's a lot of code that doesn't need to be there. And to be compatible, it needs to go. The code they made is not compatible enough and the code I made is compatible enough.

They also lie. If it was compatible, they would not have to say it's not compatible with Kobo.
JSWolf is offline   Reply With Quote
Old 04-10-2024, 07:33 AM   #24
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,225
Karma: 19000635
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
Ok… so…

Take a few minutes to understand them. You will be a lot more comfortable with them. They are NOT difficult.
Spoiler:

Think of it as a basic if-then statement: If x then y
If x is true then do y.
Code:
@media screen (min-width: 600px) {color:red}
If the screen width is 600 or greater then font color is red. 

Or

@supports (columns) {columns:2}
If the device supports the ‘columns’ css then use 2 columns

In any case, you can’t recommend others NOT use them just because you aren’t comfortable with them. The customer doesn’t see anything complicated, they just see what looks good. It’s the publisher’s job to make it happen…. Including learning how to do the slightly-more-complicated-than-basic css.

Last edited by Turtle91; 04-10-2024 at 08:37 AM.
Turtle91 is offline   Reply With Quote
Old 04-10-2024, 08:33 AM   #25
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: 76,491
Karma: 136564766
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 Turtle91 View Post
Ok… so…

Take a few minutes to understand them. You will be a lot more comfortable with them. They are NOT difficult.

In any case, you can’t recommend others NOT use them just because you aren’t comfortable with them. The customer doesn’t see anything complicated, they just see what looks good. It’s the publisher’s job to make it happen…. Including learning how to do the slightly-more-complicated-than-basic css.
It's the publisher's job to make the eBooks as compatible as possible and in this case, that's a fail. There is no reason why any of these eBooks need complex formatting and complex code. As seen by the CSS I posted you'll see the eBooks don't need to be complicated. There is no reason any of them cannot work properly with the version of RMSDK on a Kobo.
JSWolf is offline   Reply With Quote
Old 04-10-2024, 08:42 AM   #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,225
Karma: 19000635
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
Again your argument boils down to: there are still horses in the world so no one can drive cars…

If the publisher does their job then the coding can work on even ancient devices (or non-standards-supportive ones). That does require the publisher to get out of their “coding comfort zone” and learn the new techniques!

I have also added an example to my previous post that gives an example of the @media and @supports rules. Very simple!

Now, back to the thread topic: pseudo-selectors…

Last edited by Turtle91; 04-10-2024 at 08:47 AM.
Turtle91 is offline   Reply With Quote
Old 04-10-2024, 08:51 AM   #27
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: 76,491
Karma: 136564766
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 Turtle91 View Post
Again your argument boils down to: there are still horses in the world so no one can drive cars…

If the publisher does their job then the coding can work on even ancient devices (or non-standards-supportive ones). That does require the publisher to get out of their “coding comfort zone” and learn the new techniques!

I have also added an example to my previous post that gives an example of the @medua and @supports rules. Very simple!

Now, back to the thread topic: pseudo-selectors…
How can they say it's compatible code when it's not compatible? That's a lie. There's no reason it cannot be compatible. As you saw by my CSS, it's compatible. With their CSS, it's not compatible. They use code that a lot of programs don't understand. There's no need for that. They break the cardinal rule to keep it as simple as possible. They keep it as complicated as possible. So it breaks in a lot of situations.
JSWolf is offline   Reply With Quote
Old 04-10-2024, 08:53 AM   #28
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,225
Karma: 19000635
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
Proper use of css will prevent any problems.

Back to pseudo-selectors???
Turtle91 is offline   Reply With Quote
Old 04-10-2024, 09:25 AM   #29
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: 76,491
Karma: 136564766
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 Turtle91 View Post
Proper use of css will prevent any problems.

Back to pseudo-selectors???
Pseudo-selectors don't work in enough cases. So it's best to use a <span> instead. If this is an eBook for sale, you don't know where it's going to be used so you want the highest level of compatibility.
JSWolf is offline   Reply With Quote
Old 04-10-2024, 09:44 AM   #30
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 12,378
Karma: 92073397
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by Turtle91 View Post
I agree that the simplest form of an ebook is just plain text with no markup whatsoever... But part of the reading experience is having a good presentation! Just try telling a chef that presentation means nothing
You can have plenty of good layout and lovely style that enhances a novel. Drop caps and Small Caps lead-in first paragraph text are superfluous and hardly seen in the last 100 years in novels for adults. Small Cap lead-ins never been popular. To me it's weird that some ebook publishers are going back to these long abandoned (on paper) extras that are not even that portable and unsuited for phones and 6″ eink ereaders. Even more often using fancier scene breaks than paper print. Doing stuff because you can and it seems prettier is a poor choice in ebook production of novels.

No, I don't want ebooks with no styles, layouts, formatting, like a Palm PDA has, or PD ebooks had for over 30 years, but there seems to be an increasing trend to over complicate novels as ebooks compared to paper and too much over egg the prettiness. The Typesetting equivalent of purple prose. Been there and done that on paper in 1990s out of ego and ignorance. Sometimes a bit less is better for getting across the content. I know how to do very complex stuff, like needed for a science / Maths text book, or a comic / graphic novel etc. But I chose not to for novels. Having balance is the thing.
Quoth is offline   Reply With Quote
Reply

Tags
epub, kepub, kobo, kobo sage, pseudo-elements


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mangled em-dash as a CSS pseudo-element sujato Viewer 2 08-02-2022 06:47 AM
To cite ePubs: Do you recommend an ID attribute for every single element? ibu ePub 12 08-08-2013 06:03 AM
Default line-height in epubs Derek R ePub 2 02-13-2012 12:23 PM
Touch Problem with all epubs, my epubs, or my kobo? (line clipping) plague006 Kobo Reader 14 12-03-2011 12:32 AM
Command Line Batch Adding of Epubs nkormanik Calibre 6 10-19-2010 09:04 AM


All times are GMT -4. The time now is 02:33 AM.


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