Skip to content
EPUBCheck · Stylesheets

EPUBCheck CSS-030: overlay styles without CSS

Updated:

EPUBCheck CSS-030 is an error message: “The package document declares media overlays styling class names but no CSS was found in the content document.” The package declares media overlay styling class names, but a chapter with narration has no CSS. EPUB requires every content document with a media overlay to include a stylesheet, linked or embedded, that defines those classes, otherwise the text being read is not highlighted as intended.

The official message

The package document declares media overlays styling class names but no CSS was found in the content document.

Default severity
Error. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.
EPUBCheck version
5.4.0

Typical causes

  • A chapter with narration that does not link the stylesheet the other chapters use.
  • media:active-class declared in the package while the class is defined nowhere.

How to fix it

  1. Link the stylesheet that defines the classes from the chapter EPUBCheck names, for example <link rel="stylesheet" href="styles.css" type="text/css"/>.
  2. Make sure the stylesheet really defines the class declared in media:active-class (and media:playback-active-class, if used).
  3. Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.

When it's not this

If the CSS defines the class but the package does not declare it, the message is CSS-029.

Terms used here

Other CSS messages

  • CSS-029 Found CSS class name "…" but no "…" property was declared in the package document.
  • CSS-028 Use of Font-face declaration.
  • CSS-019 CSS font-face declaration has no attributes.
  • CSS-015 Alternative style sheets must have a title.
  • CSS-008 An error occurred while parsing the CSS: ….
  • CSS-007 Font-face reference "…" refers to non-standard font type "…".

Sources

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.

FAQ

What does EPUBCheck CSS-030 mean?

EPUBCheck CSS-030 is an error message: “The package document declares media overlays styling class names but no CSS was found in the content document.” The package declares media overlay styling class names, but a chapter with narration has no CSS. EPUB requires every content document with a media overlay to include a stylesheet, linked or embedded, that defines those classes, otherwise the text being read is not highlighted as intended.

Is CSS-030 an error?

CSS-030 is reported as error by default. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.