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
- Find the link element named in the message.
- Remove the #fragment from the stylesheet reference, for example
href="style.css". - 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-012Fragment identifier is not defined.RSC-014Fragment identifier defines an incompatible resource type.RSC-011Found a reference to a resource that is not a spine item.RSC-015A fragment identifier is required for svg use tag references.RSC-010Reference to non-standard resource type found.RSC-016Fatal Error while parsing file: …
Sources
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.