Skip to content
EPUBCheck · Resources and references

EPUBCheck RSC-013: fragment on a stylesheet link

Updated:

EPUBCheck RSC-013 is a usage message: “Fragment identifier is used in a reference to a stylesheet resource.” A reference to a stylesheet includes a fragment identifier (#part), which has no meaning for CSS files. It is a usage message: the stylesheet still loads, the fragment is just ignored.

The official message

Fragment identifier is used in a reference to a stylesheet resource.

Default severity
Usage. Informative only and hidden by default: it appears when EPUBCheck runs with -u (--usage). It does not make the EPUB invalid.
EPUBCheck version
5.4.0

Typical causes

  • A link element with an href such as style.css#main.
  • A build tool that appends fragments or cache markers to resource URLs.

How to fix it

  1. Find the link element named in the message.
  2. Remove the #fragment from the stylesheet reference, for example href="style.css".
  3. If a build step adds it, change the step so the next build is clean.

When it's not this

A query string (?v=2) in a relative URL is a different error, RSC-033.

Terms used here

Other RSC messages

  • RSC-012 Fragment identifier is not defined.
  • RSC-014 Fragment identifier defines an incompatible resource type.
  • RSC-011 Found a reference to a resource that is not a spine item.
  • RSC-015 A fragment identifier is required for svg use tag references.
  • RSC-010 Reference to non-standard resource type found.
  • RSC-016 Fatal Error while parsing file: …

Sources

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

FAQ

What does EPUBCheck RSC-013 mean?

EPUBCheck RSC-013 is a usage message: “Fragment identifier is used in a reference to a stylesheet resource.” A reference to a stylesheet includes a fragment identifier (#part), which has no meaning for CSS files. It is a usage message: the stylesheet still loads, the fragment is just ignored.

Is RSC-013 an error?

RSC-013 is reported as usage by default. Informative only and hidden by default: it appears when EPUBCheck runs with -u (--usage). It does not make the EPUB invalid.

PDF to EPUB tools

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