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

Is "font-size:0;" an error?(4.1.0) #922

Closed
toshiakikoike opened this issue Dec 4, 2018 · 5 comments
Closed

Is "font-size:0;" an error?(4.1.0) #922

toshiakikoike opened this issue Dec 4, 2018 · 5 comments
Assignees
Labels
status: completed Work completed, can be closed status: has PR The issue is being processed in a pull request type: bug The issue describes a bug
Milestone

Comments

@toshiakikoike
Copy link

I checked an existing EPUB 3.0.1 (reflowable) file by epubcheck 4.1.0, and got an error message.
It says "font-size: 0;" is an error, but is this correct?

file: https://github.com/toshiakikoike/epub_file/tree/master/mymedia
(The file shows no error or warning on epubcheck 4.0.2)
Error message:
ERROR(CSS-020): /home/koike/Downloads/epub_file-master/mymedia.epub/OEBPS/styles/ebook_style.css(152,3): CSS font selector declaration uses unexpected font-size value '0'.
ERROR(CSS-020): /home/koike/Downloads/epub_file-master/mymedia.epub/OEBPS/styles/ebook_style.css(158,3): CSS font selector declaration uses unexpected font-size value '0'. Check finished with errors Messages: 0 fatal / 2 errors / 0 warnings / 0 info

Error detected part in CSS:

body.coverpage {
   text-align:center;
   margin:0;
   padding:   0;
   font-size: 0;
}
body.imgpage {
   text-align:center;
   margin:0;
   padding:   0;
   font-size: 0;
}

I also checked another EPUB 3.0.1 file that contains the same CSS but is fixed-layout, and epubcheck 4.1.0 shows no error.
file: https://github.com/toshiakikoike/epub_file/tree/master/jp_comic_type
Used CSS:

html,
body {
   margin:    0;
   padding:   0;
   font-size: 0;
}
@rdeltour rdeltour added the status: needs review Needs to be reviewed by a team member before further processing label Dec 4, 2018
@rdeltour
Copy link
Member

rdeltour commented Dec 4, 2018

Thanks for the report, I'll have a look. I'm adding that tentatively in the 4.1.1 milestone.

@rdeltour rdeltour self-assigned this Dec 4, 2018
@dauwhe
Copy link
Contributor

dauwhe commented Dec 11, 2018

I think I've set font-size: 0 in the past, trying to solve some weird problem which I can't remember. Zero is a perfectly valid length in CSS, so I don't see a spec justification for making this an error.

@shiestyle
Copy link

We also found that our KADOKAWA's EPUBs are affected according to the same errors. We strongly hope that the modified new version will be released or this version will be dropped ASAP because some eBook stores in Japan reject EPUBs with epubcheck's errors. Until then, we have to encourage NOT to use 4.1.0 in Japan.

@rdeltour rdeltour added type: bug The issue describes a bug status: accepted Ready to be further processed priority: critical To be processed and published ASAP and removed status: needs review Needs to be reviewed by a team member before further processing labels Dec 19, 2018
takahashim added a commit to takahashim/epubcheck-idpf that referenced this issue Dec 19, 2018
takahashim added a commit to takahashim/epubcheck-idpf that referenced this issue Dec 19, 2018
In "5. Distance Units: the <length> type" of "CSS Values and Units Module Level 3":
> For zero lengths the unit identifier is optional (i.e. can be syntactically represented as the <number> 0).
(https://www.w3.org/TR/css-values-3/#lengths)
takahashim added a commit to takahashim/epubcheck-idpf that referenced this issue Dec 19, 2018
takahashim added a commit to takahashim/epubcheck-idpf that referenced this issue Dec 19, 2018
In "5. Distance Units: the <length> type" of "CSS Values and Units Module Level 3":
> For zero lengths the unit identifier is optional (i.e. can be syntactically represented as the <number> 0).
(https://www.w3.org/TR/css-values-3/#lengths)
takahashim added a commit to takahashim/epubcheck-idpf that referenced this issue Dec 19, 2018
@rdeltour rdeltour added status: has PR The issue is being processed in a pull request and removed status: accepted Ready to be further processed labels Dec 19, 2018
@murata2makoto
Copy link
Contributor

Will this commit be included as part of the upcoming 4.2.0?

@rdeltour
Copy link
Member

yes: it will in fact be integrated in 4.1.1 (stable release stream, to be released next week), which will then be merged in the 4.2.0 stream.

@rdeltour rdeltour added this to the 4.1.1 milestone Jan 17, 2019
@rdeltour rdeltour added status: completed Work completed, can be closed and removed priority: critical To be processed and published ASAP labels Jan 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: completed Work completed, can be closed status: has PR The issue is being processed in a pull request type: bug The issue describes a bug
Projects
None yet
Development

No branches or pull requests

5 participants