Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 11-29-2023, 02:39 PM   #1
noteon
Enthusiast
noteon is on a distinguished road
 
Posts: 41
Karma: 54
Join Date: Apr 2011
Location: NYC
Device: Many
Feature request: Preserve media overlay CSS

"Delete unused stylesheet selectors" deletes things that are not "used" in the .epub, but are still needed by the reading system.

If this appears in the .opf:

<meta property="media:active-class">-epub-media-overlay-active</meta>

It means this book has readaloud highlighting. Deleting the associated selector from .css will defeat that feature:

.-epub-media-overlay-active {
background-color: #FFFF00;
}


The selector can be called anything. "-epub-media-overlay-active" is most common.

Maybe a check box in the "Delete Styles" dialogue that says "Preserve media overlay CSS?"

Last edited by noteon; 11-29-2023 at 03:07 PM.
noteon is offline   Reply With Quote
Old 11-29-2023, 04:34 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,651
Karma: 5433388
Join Date: Nov 2009
Device: many
Please show me where in the epub3.3 spec this "feature" is described or supported?

What reading systems support this "feature"?

What namespace is "media:" from in the opf?

I really need to see the exact specification for any of this.
KevinH is offline   Reply With Quote
Advert
Old 11-29-2023, 04:39 PM   #3
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,651
Karma: 5433388
Join Date: Nov 2009
Device: many
Also the delete unused selectors shows a list of the selectors to be deleted and the user can the make the decision if kept or not.
KevinH is offline   Reply With Quote
Old 11-29-2023, 04:56 PM   #4
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
https://www.w3.org/TR/epub/#app-overlays-vocab
BeckyEbook is offline   Reply With Quote
Old 11-29-2023, 05:06 PM   #5
noteon
Enthusiast
noteon is on a distinguished road
 
Posts: 41
Karma: 54
Join Date: Apr 2011
Location: NYC
Device: Many
Quote:
Originally Posted by KevinH View Post
Please show me where in the epub3.3 spec this "feature" is described or supported?
https://www.w3.org/TR/epub/#sec-media-overlays

Quote:
What reading systems support this "feature"?
All of them? Apple Books, Adobe Digital Editions, Thorium, Colibrio... Those are the ones I test on, but I'm guessing any current EPUB reader. Apple Books and Colibrio only support it with fixed-layout, though, not reflowable. Readium supports it, too.

Quote:
What namespace is "media:" from in the opf?
I'm not sure how to answer this, but this is what InDesign puts in a reflowable:

xmlns="http://www.w3.org/1999/xhtml

and in a fixed-layout:

xmlns="http://www.idpf.org/2007/opf

Read-aloud EPUBs have been a huge part of my ebook conversion work for years, so from my perspective, it's nothing odd.
noteon is offline   Reply With Quote
Advert
Old 11-29-2023, 06:15 PM   #6
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,651
Karma: 5433388
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by BeckyEbook View Post
Thanks! That helps.

From reading that spec, there is no xmlns for the media prefix. There is also a playback-active-class meta property that would need the same treatment (I think).

noteon and BeckyEbook, is that your interpretation as well?

Last edited by KevinH; 11-29-2023 at 06:25 PM.
KevinH is offline   Reply With Quote
Old 11-29-2023, 06:29 PM   #7
noteon
Enthusiast
noteon is on a distinguished road
 
Posts: 41
Karma: 54
Join Date: Apr 2011
Location: NYC
Device: Many
Quote:
Originally Posted by KevinH View Post
There is also a playback-active-class meta property that would need the same treatment (I think).

noteon and BeckyEbook, is that your interpretation as well?
I haven't played with playback-active-class, but I think so.
noteon is offline   Reply With Quote
Old 11-30-2023, 04:02 AM   #8
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
I've never done it, but I found a sample file that has entries with the prefix 'media' in the opf file.
https://github.com/IDPF/epub3-sample...y-dick-mo.epub
BeckyEbook is offline   Reply With Quote
Old 11-30-2023, 11:38 AM   #9
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,651
Karma: 5433388
Join Date: Nov 2009
Device: many
Okay as long as the OPF defines the media:active-class or media:playback-active-class
in an epub3 meta property, those specific class selectors will no longer be considered to be "unused" for the purposes of the Delete Unused Selectors tool.

Note this only works for **pure class** selectors with the class names provided by the OPF metadata.

I have now pushed this to master. This feature will be part of the next release.

I tested with the moby dick test case BeckyEbook found and it appears to work correctly.
KevinH is offline   Reply With Quote
Old 11-30-2023, 02:12 PM   #10
noteon
Enthusiast
noteon is on a distinguished road
 
Posts: 41
Karma: 54
Join Date: Apr 2011
Location: NYC
Device: Many
Quote:
Originally Posted by KevinH View Post
Okay as long as the OPF defines the media:active-class or medialayback-active-class
in an epub3 meta property, those specific class selectors will no longer be considered to be "unused" for the purposes of the Delete Unused Selectors tool.

Note this only works for **pure class** selectors with the class names provided by the OPF metadata.

I have now pushed this to master. This feature will be part of the next release.

I tested with the moby dick test case BeckyEbook found and it appears to work correctly.
Thank you!
noteon is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Feature request : using a custom css file Bertrand Writer2ePub 8 12-28-2019 11:46 AM
Feature Request: Preserve HTML Comments in EPUB->DOCX Conversion Tex2002ans Calibre 3 02-12-2018 01:54 AM
Feature Request: Jump to CSS class Katsunami Editor 4 09-20-2016 04:09 AM
Feature Request - custom CSS style gentoosiast EPUBReader 1 12-14-2012 03:26 AM
Feature request: CSS style application Fitz Sigil 4 07-25-2010 06:36 AM


All times are GMT -4. The time now is 12:45 AM.


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