-
Notifications
You must be signed in to change notification settings - Fork 408
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* add 'ex' as valid font-size length unit and 'inherit' as valid keyword * add CssParser UnitTest for invalid font-size value '1m' // refs #529 just make sure that '1m' is not reported as a valid length unit * report unsupported font-size values (Units and keywords) as ERROR changes CSS_020 from USAGE to ERROR * add non-relative font-size to ACC_014/ACC_016 USAGE message * add jUnit test with all supported and some invalid CSS font-size values * update other tests and test resources to match new message format and severity
- Loading branch information
Showing
23 changed files
with
394 additions
and
217 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
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
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
6 changes: 6 additions & 0 deletions
6
src/test/resources/30/expanded/invalid/invalid-css-font-size-value/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="OPS/package.opf" media-type="application/oebps-package+xml"/> | ||
</rootfiles> | ||
</container> |
10 changes: 10 additions & 0 deletions
10
src/test/resources/30/expanded/invalid/invalid-css-font-size-value/OPS/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,10 @@ | ||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en"> | ||
<head> | ||
<title>Minimal EPUB</title> | ||
<link rel="stylesheet" href="stylesheet.css" /> | ||
</head> | ||
<body> | ||
<h1>Loomings</h1> | ||
<p>Call me Ishmael.</p> | ||
</body> | ||
</html> |
12 changes: 12 additions & 0 deletions
12
src/test/resources/30/expanded/invalid/invalid-css-font-size-value/OPS/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,12 @@ | ||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en"> | ||
<head> | ||
<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
src/test/resources/30/expanded/invalid/invalid-css-font-size-value/OPS/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="css" href="stylesheet.css" media-type="text/css" /> | ||
</manifest> | ||
<spine> | ||
<itemref idref="content_001" /> | ||
</spine> | ||
</package> |
43 changes: 43 additions & 0 deletions
43
src/test/resources/30/expanded/invalid/invalid-css-font-size-value/OPS/stylesheet.css
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,43 @@ | ||
@charset "UTF-8"; | ||
|
||
/* ************************************************************* | ||
* invalid font sizes | ||
* *********************************************************** */ | ||
|
||
p { font-size: 1m; } | ||
p { font-size: meter; } | ||
p { font-size: in; } | ||
|
||
|
||
|
||
/* ************************************************************* | ||
* valid font sizes | ||
* - https://www.w3.org/TR/CSS21/fonts.html#propdef-font-size | ||
* - https://www.w3.org/TR/CSS21/syndata.html#value-def-length | ||
* *********************************************************** */ | ||
|
||
/* inherit */ | ||
p { font-size: inherit; } | ||
/* percentage */ | ||
p { font-size: 120%; } | ||
/* length */ | ||
p { font-size: 1em; } | ||
p { font-size: 1ex; } | ||
p { font-size: 1in; } | ||
p { font-size: 1cm; } | ||
p { font-size: 1mm; } | ||
p { font-size: 1pt; } | ||
p { font-size: 1pc; } | ||
p { font-size: 1px; } | ||
/* relative */ | ||
p { font-size: larger; } | ||
p { font-size: smaller; } | ||
/* absolute */ | ||
p { font-size: xx-small; } | ||
p { font-size: x-small; } | ||
p { font-size: small; } | ||
p { font-size: medium; } | ||
p { font-size: large; } | ||
p { font-size: x-large; } | ||
p { font-size: xx-large; } | ||
|
1 change: 1 addition & 0 deletions
1
src/test/resources/30/expanded/invalid/invalid-css-font-size-value/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
Oops, something went wrong.