11-29-2023, 02:39 PM | #1 |
Enthusiast
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. |
11-29-2023, 04:34 PM | #2 |
Sigil Developer
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. |
Advert | |
|
11-29-2023, 04:39 PM | #3 |
Sigil Developer
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.
|
11-29-2023, 04:56 PM | #4 |
Guru
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
|
|
11-29-2023, 05:06 PM | #5 | |||
Enthusiast
Posts: 41
Karma: 54
Join Date: Apr 2011
Location: NYC
Device: Many
|
Quote:
Quote:
Quote:
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. |
|||
Advert | |
|
11-29-2023, 06:15 PM | #6 | |
Sigil Developer
Posts: 7,651
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Quote:
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. |
|
11-29-2023, 06:29 PM | #7 |
Enthusiast
Posts: 41
Karma: 54
Join Date: Apr 2011
Location: NYC
Device: Many
|
|
11-30-2023, 04:02 AM | #8 |
Guru
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 |
11-30-2023, 11:38 AM | #9 |
Sigil Developer
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. |
11-30-2023, 02:12 PM | #10 | |
Enthusiast
Posts: 41
Karma: 54
Join Date: Apr 2011
Location: NYC
Device: Many
|
Quote:
|
|
|
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 |