-
Notifications
You must be signed in to change notification settings - Fork 402
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: OPF-018 was incorrectly reported with inline CSS
`OPF-018` checks that the `remote-resources` property is not defined if no remote resource was found. Prior to this commit, it was incorrectly reported when an XHTML content document carrying the property also contained inline CSS: the CSS checker thought that the property was not required since no remote resource was found in the CSS itself. This commit fixes that bug by only checking `OPF-018` for standalone CSS documents. Fix #1335
- Loading branch information
Showing
13 changed files
with
142 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...ent/files/package-remote-font-in-inline-css-missing-property-error/EPUB/content_001.xhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html xmlns:epub="http://www.idpf.org/2007/ops" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" | ||
lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Minimal EPUB</title> | ||
<style> | ||
@font-face { | ||
font-family: "Open Sans"; | ||
src: url("https://example.org/font") format("woff"); | ||
}</style> | ||
</head> | ||
<body> | ||
<h1>Loomings</h1> | ||
<p>Call me Ishmael.</p> | ||
</body> | ||
</html> |
14 changes: 14 additions & 0 deletions
14
...ge-document/files/package-remote-font-in-inline-css-missing-property-error/EPUB/nav.xhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en" lang="en"> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<title>Minimal Nav</title> | ||
</head> | ||
<body> | ||
<nav epub:type="toc"> | ||
<ol> | ||
<li><a href="content_001.xhtml">content 001</a></li> | ||
</ol> | ||
</nav> | ||
</body> | ||
</html> |
17 changes: 17 additions & 0 deletions
17
...-document/files/package-remote-font-in-inline-css-missing-property-error/EPUB/package.opf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<package xmlns="http://www.idpf.org/2007/opf" version="3.0" xml:lang="en" unique-identifier="q"> | ||
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> | ||
<dc:title id="title">Minimal EPUB 3.0</dc:title> | ||
<dc:language>en</dc:language> | ||
<dc:identifier id="q">NOID</dc:identifier> | ||
<meta property="dcterms:modified">2017-06-14T00:00:01Z</meta> | ||
</metadata> | ||
<manifest> | ||
<item id="content_001" href="content_001.xhtml" media-type="application/xhtml+xml"/> | ||
<item id="nav" href="nav.xhtml" media-type="application/xhtml+xml" properties="nav"/> | ||
<item id="font" href="https://example.org/font" media-type="font/woff"/> | ||
</manifest> | ||
<spine> | ||
<itemref idref="content_001" /> | ||
</spine> | ||
</package> |
6 changes: 6 additions & 0 deletions
6
...ent/files/package-remote-font-in-inline-css-missing-property-error/META-INF/container.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> | ||
<rootfiles> | ||
<rootfile full-path="EPUB/package.opf" media-type="application/oebps-package+xml"/> | ||
</rootfiles> | ||
</container> |
1 change: 1 addition & 0 deletions
1
...-package-document/files/package-remote-font-in-inline-css-missing-property-error/mimetype
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
application/epub+zip |
17 changes: 17 additions & 0 deletions
17
...ackage-document/files/package-remote-resource-and-inline-css-valid/EPUB/content_001.xhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html xmlns:epub="http://www.idpf.org/2007/ops" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" | ||
lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Minimal EPUB</title> | ||
<style> | ||
.red { | ||
color: red; | ||
}</style> | ||
</head> | ||
<body> | ||
<h1>Loomings</h1> | ||
<p>Call me Ishmael.</p> | ||
<video src="https://example.org/video.mp4"></video> | ||
</body> | ||
</html> |
14 changes: 14 additions & 0 deletions
14
...ub3/05-package-document/files/package-remote-resource-and-inline-css-valid/EPUB/nav.xhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en" lang="en"> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<title>Minimal Nav</title> | ||
</head> | ||
<body> | ||
<nav epub:type="toc"> | ||
<ol> | ||
<li><a href="content_001.xhtml">content 001</a></li> | ||
</ol> | ||
</nav> | ||
</body> | ||
</html> |
17 changes: 17 additions & 0 deletions
17
...3/05-package-document/files/package-remote-resource-and-inline-css-valid/EPUB/package.opf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<package xmlns="http://www.idpf.org/2007/opf" version="3.0" xml:lang="en" unique-identifier="q"> | ||
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> | ||
<dc:title id="title">Minimal EPUB 3.0</dc:title> | ||
<dc:language>en</dc:language> | ||
<dc:identifier id="q">NOID</dc:identifier> | ||
<meta property="dcterms:modified">2017-06-14T00:00:01Z</meta> | ||
</metadata> | ||
<manifest> | ||
<item id="content_001" href="content_001.xhtml" media-type="application/xhtml+xml" properties="remote-resources"/> | ||
<item id="nav" href="nav.xhtml" media-type="application/xhtml+xml" properties="nav"/> | ||
<item id="video" href="https://example.org/video.mp4" media-type="video/mp4"/> | ||
</manifest> | ||
<spine> | ||
<itemref idref="content_001" /> | ||
</spine> | ||
</package> |
6 changes: 6 additions & 0 deletions
6
...ackage-document/files/package-remote-resource-and-inline-css-valid/META-INF/container.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> | ||
<rootfiles> | ||
<rootfile full-path="EPUB/package.opf" media-type="application/oebps-package+xml"/> | ||
</rootfiles> | ||
</container> |
1 change: 1 addition & 0 deletions
1
...ces/epub3/05-package-document/files/package-remote-resource-and-inline-css-valid/mimetype
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
application/epub+zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters