Skip to content
EPUBCheck · Stylesheets

EPUBCheck CSS-001: forbidden CSS property

Updated:

EPUBCheck CSS-001 is an error message: “The "…" property must not be included in an EPUB Style Sheet.” The stylesheet uses a property that EPUB does not allow in its style sheets. EPUB 3.3 forbids direction and unicode-bidi in CSS, because reading apps may switch CSS off and the text direction would then be lost; EPUBCheck names the property.

The official message

The "%1$s" property must not be included in an EPUB Style Sheet.

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

%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.

Typical causes

  • CSS copied from the web that sets text direction in the stylesheet.
  • Right-to-left books (Arabic, Hebrew) where the direction was put in CSS instead of the markup.

How to fix it

  1. Open the file EPUBCheck names (the message gives the path, line and column) in a text or EPUB editor such as Sigil, or unzip the EPUB and open it there.
  2. Remove the direction or unicode-bidi declaration from the stylesheet.
  3. Set text direction with the dir attribute in the XHTML instead, for example <html dir="rtl"> or <p dir="ltr">, and use bdo for bidirectional overrides.
  4. For right-to-left page turning, set page-progression-direction on the spine.
  5. Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.

When it's not this

If the CSS cannot be parsed at all, the message is CSS-008.

Terms used here

Other CSS messages

  • CSS-002 Empty or NULL reference found.
  • CSS-003 CSS document is encoded in UTF-16. It should be encoded in UTF-8 instead.
  • CSS-004 CSS documents must be encoded in UTF-8, detected …;
  • CSS-005 Conflicting alternate style tags found: ….
  • CSS-006 CSS selector specifies fixed position.
  • 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-001 mean?

EPUBCheck CSS-001 is an error message: “The "…" property must not be included in an EPUB Style Sheet.” The stylesheet uses a property that EPUB does not allow in its style sheets. EPUB 3.3 forbids direction and unicode-bidi in CSS, because reading apps may switch CSS off and the text direction would then be lost; EPUBCheck names the property.

Is CSS-001 an error?

CSS-001 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.

PDF to EPUB tools

Every tool uses the same engine and starts with a free 5-page sample.