diff --git a/docs/CSS21-epub_compat.md b/docs/CSS21-epub_compat.md index 6db32bc..2354b88 100644 --- a/docs/CSS21-epub_compat.md +++ b/docs/CSS21-epub_compat.md @@ -32,7 +32,7 @@ MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/@page @supports ``` -The `@supports` CSS at-rule lets authors specify declarations that depend on a browser's support for one or more specific CSS features. This is called a *feature query.* +The `@supports` CSS at-rule lets authors specify declarations that depend on a browser’s support for one or more specific CSS features. This is called a *feature query.* **It is critical for the advancement of modern CSS that implementers try their best at supporting this rule,** especially when pre-processing EPUB files before distribution. It indeed is one of the very few mechanisms allowing authors to do progressive enhancement (layout, typography, etc.), especially as it helps get around older Reading Systems which have no concept of fault tolerance, and will consequently ignore the entire stylesheet if they encounter some of those more modern properties. @@ -73,7 +73,7 @@ The contents of this display options file seem to always be: ``` -As of November 2011, FLEPUB supports embedded fonts, audio, JavaScript (partially), media overlays (smil). It doesn't support video and SVG. +As of November 2011, FLEPUB supports embedded fonts, audio, JavaScript (partially), media overlays (smil). It doesn’t support video and SVG. ### Apple @@ -111,10 +111,18 @@ Supported display options are: ### Calibre -Calibre is using specific metadata for series and rating. +Calibre is using specific metadata for sorting, series and rating. This metadata has a `calibre:` prefix. +#### Title sort + +``` + +``` + +This item allows Reading Systems to sort books in a non-stricly alphabetical way, by moving articles such as “The” and “An” to the end of the string. + #### Series ``` @@ -131,13 +139,15 @@ This item indicates the series the publication is part of. This item designates the position (index) of the publication in this series. +It can be a floating point number with up to two digits of precision e.g. `1.01`, and zero and negative numbers are allowed. + #### Rating ``` ``` -This item stores the rating the user has explicitely set for the publication. `2.0` is one star, `10.0` is five. +This item stores the rating (integer) the user has explicitely set for the publication. In Calibre, `0.0` is unrated, `2.0` is one star, and `10.0` is five stars. ### iBooks @@ -181,7 +191,7 @@ Docs: [iBooks Asset Guide](https://help.apple.com/itc/booksassetguide/?lang=en#/ className ``` -Gaiji are small, inline images that represent characters that are not available in a character or font set. Gaiji are typically used for older symbols or characters in Japanese that have fallen out of use. Authors can define a custom class name for which iBooks will respect an image's dimensions. Those inline images will then not be altered like other images, for which iBooks may force sizing. +Gaiji are small, inline images that represent characters that are not available in a character or font set. Gaiji are typically used for older symbols or characters in Japanese that have fallen out of use. Authors can define a custom class name for which iBooks will respect an image’s dimensions. Those inline images will then not be altered like other images, for which iBooks may force sizing. Some authors may have used this metadata to force sizing for specific images, and not only gaiji. Moreover, some might use it to invert specific images like illustrations in night mode, since iBooks does it automatically in order for gaiji to be the same color as text’s. @@ -209,6 +219,94 @@ Moreover, this format is using interactive widgets which are managed at the Read It could be used as a flag to indicate that the EPUB file was meant for iBooks and there will be rendering issues, especially interactive widgets since they won’t work as intended by the author. +### Kindle + +Kindle is using specific metadata for the primary writing mode and Fixed Layout – for both rendition and enabling FXL-specific features. + +This metadata has no prefix. + +Docs: [Kindle Publishing Guidelines](https://kindlegen.s3.amazonaws.com/AmazonKindlePublishingGuidelines.pdf) + +[Further details and undocumented metadata](http://www.fantasycastlebooks.com/Tutorials/kindle-tutorial-part6.html). + +#### Primary writing mode + +``` + +``` + +Values can be `horizontal-lr`, `horizontal-rl`, `vertical-lr`, or `vertical-rl`. + +This is a recent addition to the set of Kindle-specific metadata, probably as part of an internationalization effort. + +It indicates the writing mode that should be used for the entire publication, including the flow in which virtual panels and magnification regions must progress when swiped in Fixed Layout (manga/comics and children books). + +#### Fixed layout + +``` + +``` + +This is an older version of + +``` +pre-paginated +``` + +It should therefore be considered an alias. + +#### Original resolution + +``` + +``` + +This indicates the original design resolution of the content. + +#### Orientation lock + +``` + +``` + +This is an older version of + +``` +landscape +``` + +It should therefore be considered an alias. + +#### Book type + +``` + +``` + +Values can be `children` or `comic`. + +This removes reader functionality which may not be relevant for those genres (e.g. search, share, etc.). For more details, [see this chart](http://www.fantasycastlebooks.com/Tutorials/kindle-fixed-layout-functionality.html). + +#### Blank pages + +``` + +``` + +This property can be used to indicated a page is blank. If set, the page will be rendered in landscape mode (spread) but not in portrait mode (single page). + +#### Region magnification (deprecated) + +``` + +``` + +This property was used to indicate the Region Magnification feature should be used for the Fixed-Layout book. It is now set automatically if the required markup is found in XHTML documents. + +The Region Magnification feature allows users to zoom text (pop-up view) and comics’ panels, as well as navigating panel by panel. Authors must however provide specific markup (i.e. using a `app-amzn-magnify` class and storing `targetId`, `sourceId` and `ordinal` attributes in a JSON object as part of a `data-app-amzn-magnify` value). + +**Note:** authors may be using a JavaScript polyfill to re-use this markup in EPUB apps that support scripting. We recommend not trying to implement those features in your app unless JavaScript is strictly disabled for authoring purposes. + ## Attributes The iBooks Reading System is using a set of custom attributes to manage styling and features. diff --git a/docs/ReadiumCSS_docs.epub b/docs/ReadiumCSS_docs.epub index 7bd3deb..17a69a3 100644 Binary files a/docs/ReadiumCSS_docs.epub and b/docs/ReadiumCSS_docs.epub differ diff --git a/docs/ReadiumCSS_docs/OEBPS/Text/Section-012.xhtml b/docs/ReadiumCSS_docs/OEBPS/Text/Section-012.xhtml index 8b3196e..57afa3f 100644 --- a/docs/ReadiumCSS_docs/OEBPS/Text/Section-012.xhtml +++ b/docs/ReadiumCSS_docs/OEBPS/Text/Section-012.xhtml @@ -249,9 +249,8 @@

Override class: User settings advanced (optional but should be applied by any means necessary if provided to users)

Warning: for the time being, automatic hyphenation won’t work if you are using the Blink rendering engine (either via Chrome or a Webview, including Electron’s) on ChromeOS, Linux and Windows. It indeed is not implemented yet and we recommend not trying to polyfill it using JavaScript as it will create a11y issues, especially with screen readers.

- -

As a consequence, we strongly advise implementers against providing users with an hyphenation-specific setting if targeting this rendering engine.

+

As a consequence, we strongly advise implementers against providing users with an hyphenation-specific setting if targeting this rendering engine.

diff --git a/docs/ReadiumCSS_docs/OEBPS/Text/Section-021.xhtml b/docs/ReadiumCSS_docs/OEBPS/Text/Section-021.xhtml index 5de68c8..5c54163 100644 --- a/docs/ReadiumCSS_docs/OEBPS/Text/Section-021.xhtml +++ b/docs/ReadiumCSS_docs/OEBPS/Text/Section-021.xhtml @@ -20,13 +20,13 @@

It also lists important standard features that authors are accustomed to or might rely upon in the future.

-

Introduction

+

Introduction

There exists an increasingly large corpus of ebook content that depends on non-standard CSS properties, metadata and attributes. This document aims to describe the minimal set that Reading Systems might be willing to support for optimal ebook compatibility.

-

CSS At-rules

+

CSS At-rules

@page

@@ -47,7 +47,7 @@
@supports
-

The @supports CSS at-rule lets authors specify declarations that depend on a browser's support for one or more specific CSS features. This is called a feature query.

+

The @supports CSS at-rule lets authors specify declarations that depend on a browser’s support for one or more specific CSS features. This is called a feature query.

It is critical for the advancement of modern CSS that implementers try their best at supporting this rule, especially when pre-processing EPUB files before distribution. It indeed is one of the very few mechanisms allowing authors to do progressive enhancement (layout, typography, etc.), especially as it helps get around older Reading Systems which have no concept of fault tolerance, and will consequently ignore the entire stylesheet if they encounter some of those more modern properties.

@@ -58,7 +58,7 @@
-

Non-standard Kindle Media queries

+

Non-standard Kindle Media queries

Since 2012, Amazon has been providing authors with non-standard media queries so that they specific styles can be declared for the old format (Mobi7) and the latest ones (KF8 and above).

@@ -71,7 +71,7 @@
-

Interactive and Fixed-layout EPUB 2

+

Interactive and Fixed-layout EPUB 2

There exists a significant corpus of fixed-layout and/or interactive files which leveraged the display options created by iBooks and Kobo for EPUB 2.

@@ -89,7 +89,7 @@ </platform> </display_options> -

As of November 2011, FLEPUB supports embedded fonts, audio, JavaScript (partially), media overlays (smil). It doesn't support video and SVG.

+

As of November 2011, FLEPUB supports embedded fonts, audio, JavaScript (partially), media overlays (smil). It doesn’t support video and SVG.

@@ -137,15 +137,23 @@
-

Metadata

+

Metadata

Calibre

-

Calibre is using specific metadata for series and rating.

+

Calibre is using specific metadata for sorting, series and rating.

This metadata has a calibre: prefix.

+
+

Title sort

+ +
<meta content="Title of the Book, The" name="calibre:title_sort" />
+ +

This item allows Reading Systems to sort books in a non-stricly alphabetical way, by moving articles such as “The” and “An” to the end of the string.

+
+

Series

@@ -160,6 +168,8 @@
<meta content="1.0" name="calibre:series_index" />

This item designates the position (index) of the publication in this series.

+ +

It can be a floating point number with up to two digits of precision e.g. 1.01, and zero and negative numbers are allowed.

@@ -167,7 +177,7 @@
<meta content="10.0" name="calibre:rating" />
-

This item stores the rating the user has explicitely set for the publication. 2.0 is one star, 10.0 is five.

+

This item stores the rating (integer) the user has explicitely set for the publication. In Calibre, 0.0 is unrated, 2.0 is one star, and 10.0 is five stars.

@@ -211,7 +221,7 @@
<meta property="ibooks:respect-image-size-class">className</meta>
-

Gaiji are small, inline images that represent characters that are not available in a character or font set. Gaiji are typically used for older symbols or characters in Japanese that have fallen out of use. Authors can define a custom class name for which iBooks will respect an image's dimensions. Those inline images will then not be altered like other images, for which iBooks may force sizing.

+

Gaiji are small, inline images that represent characters that are not available in a character or font set. Gaiji are typically used for older symbols or characters in Japanese that have fallen out of use. Authors can define a custom class name for which iBooks will respect an image’s dimensions. Those inline images will then not be altered like other images, for which iBooks may force sizing.

Some authors may have used this metadata to force sizing for specific images, and not only gaiji. Moreover, some might use it to invert specific images like illustrations in night mode, since iBooks does it automatically in order for gaiji to be the same color as text’s.

@@ -240,10 +250,96 @@

It could be used as a flag to indicate that the EPUB file was meant for iBooks and there will be rendering issues, especially interactive widgets since they won’t work as intended by the author.

+ +
+

Kindle

+ +

Kindle is using specific metadata for the primary writing mode and Fixed Layout – for both rendition and enabling FXL-specific features.

+ +

This metadata has no prefix.

+ +

Docs: Kindle Publishing Guidelines

+ +

Further details and undocumented metadata.

+ +
+

Primary writing mode

+ +
<meta name="primary-writing-mode" content="horizontal-rl"/>
+ +

Values can be horizontal-lr, horizontal-rl, vertical-lr, or vertical-rl.

+ +

This is a recent addition to the set of Kindle-specific metadata, probably as part of an internationalization effort.

+ +

It indicates the writing mode that should be used for the entire publication, including the flow in which virtual panels and magnification regions must progress when swiped in Fixed Layout (manga/comics and children books).

+
+ +
+

Fixed layout

+ +
<meta name="fixed-layout" content="true"/>
+ +

This is an older version of

+ +
<meta property="rendition:layout">pre-paginated</meta>
+ +

It should therefore be considered an alias.

+
+ +
+

Original resolution

+ +
<meta name="original-resolution" content="1024x600"/>
+ +

This indicates the original design resolution of the content.

+
+ +
+

Orientation lock

+ +
<meta name="orientation-lock" content="landscape"/>
+ +

This is an older version of

+ +
<meta property="rendition:orientation">landscape</meta>
+ +

It should therefore be considered an alias.

+
+ +
+

Book type

+ +
<meta name="book-type" content="children"/>
+ +

Values can be children or comic.

+ +

This removes reader functionality which may not be relevant for those genres (e.g. search, share, etc.). For more details, see this chart.

+
+ +
+

Blank pages

+ +
<itemref idref="blank-page" properties="layout-blank"/>
+ +

This property can be used to indicated a page is blank. If set, the page will be rendered in landscape mode (spread) but not in portrait mode (single page).

+
+ +
+

Region magnification (deprecated)

+ +
<meta name="regionMagnification" content="true"/>
+ +

This property was used to indicate the Region Magnification feature should be used for the Fixed-Layout book. It is now set automatically if the required markup is found in XHTML documents.

+ +

The Region Magnification feature allows users to zoom text (pop-up view) and comics’ panels, as well as navigating panel by panel. Authors must however provide specific markup (i.e. using a app-amzn-magnify class and storing targetId, sourceId and ordinal attributes in a JSON object as part of a data-app-amzn-magnify value).

+ +

Note: authors may be using a JavaScript polyfill to re-use this markup in EPUB apps that support scripting. We recommend not trying to implement those features in your app unless JavaScript is strictly disabled for authoring purposes.

+
+
-

Attributes

+

Attributes

The iBooks Reading System is using a set of custom attributes to manage styling and features.

@@ -292,7 +388,7 @@

This attribute is used to indicate DOM elements for which text-align must be changed when the user sets justification preferences.

-

Authors’ usage of this attribute is unknown, but it may have set expectations (e.g. elements with text-align: right won’t be impacted).

+

Authors’ usage of this attribute is unknown, but it may have set expectations (e.g. elements with text-align: right won’t be impacted).

@@ -309,7 +405,7 @@
-

Webkit’s CSS multi-column extensions

+

Webkit’s CSS multi-column extensions

Apple extended the CSS multi-column specification with non-standard CSS properties to handle RTL scripts and vertical writing modes in iBooks. They were primarily designed for the setPagination API in the iOS UIWebView but works as expected in Safari/iOS webviews.

@@ -345,7 +441,7 @@
-

Non-standard CSS properties

+

Non-standard CSS properties

EPUB authors may have used the following non-standard properties to achieve specific styling or get around Reading Systems’ overrides.

@@ -388,7 +484,7 @@

This CSS property might pop up in files generated with the built-in MacOS’ (Cocoa) HTML generator.

-

Please note that although it might fix an issue in some languages like English, it might also create other issues in other languages, where non-breaking space shouldn’t be treated as a normal space (e.g. punctuation in French).

+

Please note that although it might fix an issue in some languages like English, it might also create other issues in other languages, where non-breaking space shouldn’t be treated as a normal space (e.g. punctuation in French).

Docs: Safari Docs

@@ -398,7 +494,7 @@
-webkit-text-fill-color
-

The -webkit-text-fill-color property defines the foreground fill color of an element’s text content e.g. headings or links.

+

The -webkit-text-fill-color property defines the foreground fill color of an element’s text content e.g. headings or links.

Authors may have used this property to force a color for text in night mode, especially when targeting iBooks.

@@ -481,7 +577,7 @@
-

EPUB properties

+

EPUB properties

Some authors might have used -epub- prefixed properties only, thinking they were enough since those CSS properties were standardized. Authors are now strongly encouraged to use unprefixed properties in EPUB 3.1.

diff --git a/docs/ReadiumCSS_docs/OEBPS/Text/nav.xhtml b/docs/ReadiumCSS_docs/OEBPS/Text/nav.xhtml index e42840d..035671d 100644 --- a/docs/ReadiumCSS_docs/OEBPS/Text/nav.xhtml +++ b/docs/ReadiumCSS_docs/OEBPS/Text/nav.xhtml @@ -558,31 +558,31 @@ EPUB Compatibility
  1. - Introduction + Introduction
  2. - CSS At-rules + CSS At-rules
  3. - Non-standard Kindle Media queries + Non-standard Kindle Media queries
  4. - Interactive and Fixed-layout EPUB 2 + Interactive and Fixed-layout EPUB 2
  5. - Metadata + Metadata
  6. - Attributes + Attributes
  7. - Webkit’s CSS multi-column extensions + Webkit’s CSS multi-column extensions
  8. - Non-standard CSS properties + Non-standard CSS properties
  9. - EPUB properties + EPUB properties
diff --git a/docs/ReadiumCSS_docs/OEBPS/content.opf b/docs/ReadiumCSS_docs/OEBPS/content.opf index d73c5ff..2c4c443 100644 --- a/docs/ReadiumCSS_docs/OEBPS/content.opf +++ b/docs/ReadiumCSS_docs/OEBPS/content.opf @@ -8,7 +8,7 @@ en urn:uuid:91cab77e-946f-4814-9e61-8494a5d5cb0f - 2018-05-02T12:52:57Z + 2018-05-14T13:03:18Z diff --git a/docs/ReadiumCSS_docs/OEBPS/toc.ncx b/docs/ReadiumCSS_docs/OEBPS/toc.ncx index d58ebd6..a76ff20 100644 --- a/docs/ReadiumCSS_docs/OEBPS/toc.ncx +++ b/docs/ReadiumCSS_docs/OEBPS/toc.ncx @@ -1021,55 +1021,55 @@ Introduction - + CSS At-rules - + Non-standard Kindle Media queries - + Interactive and Fixed-layout EPUB 2 - + Metadata - + Attributes - + Webkit’s CSS multi-column extensions - + Non-standard CSS properties - + EPUB properties - +