Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect unit not detected #529

Closed
Cuadratin opened this issue Apr 24, 2015 · 3 comments · Fixed by #776
Closed

Incorrect unit not detected #529

Cuadratin opened this issue Apr 24, 2015 · 3 comments · Fixed by #776
Labels
status: has PR The issue is being processed in a pull request type: bug The issue describes a bug
Milestone

Comments

@Cuadratin
Copy link
Contributor

When validating epubcheck ignores an incorrect CSS syntax.

I've got "1m" instead of "1em" and the epub validated with no problems or warnings (it crashed when opening with Adobe Digital Editions).

@tofi86 tofi86 added the type: bug The issue describes a bug label Jan 2, 2017
@tofi86
Copy link
Collaborator

tofi86 commented Jul 3, 2017

This is falsely reported as

USAGE(ACC-014): ./src/test/resources/minimal-epub/30/minimal-epub-30.epub/OPS/stylesheet.css(5,2):
Value of CSS property 'font-size' does not use a relative size.

in EpubCSSCheckCSSHandler.java#L566

which is kind of true as EpubCheck recognizes 1m as DIMEN (dimension) which technically is a valid property value but in this case an invalid e.g. font-size property.

tofi86 added a commit that referenced this issue Jul 3, 2017
just make sure that '1m' is not reported as a valid length unit
@tofi86
Copy link
Collaborator

tofi86 commented Jul 3, 2017

Fixed this with PR #776

@tofi86 tofi86 added this to the 4.1.0 milestone Jul 3, 2017
@tofi86 tofi86 added the status: has PR The issue is being processed in a pull request label Jul 3, 2017
@tofi86 tofi86 self-assigned this Sep 28, 2017
tofi86 added a commit that referenced this issue Sep 29, 2017
* 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
@tofi86
Copy link
Collaborator

tofi86 commented Sep 29, 2017

Fixed with PR #776

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: has PR The issue is being processed in a pull request type: bug The issue describes a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants