-
Notifications
You must be signed in to change notification settings - Fork 407
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
Viewport in decimals generating ERROR #1481
Comments
Hi Naomi, simple solution stop making Fixed layout books
😝
Sorry had to take a jab. Sure there is some bug.
Thanks
Charles
EOM
From: Naomi Kennedy ***@***.***>
Date: Wednesday, January 25, 2023 at 9:25 AM
To: w3c/epubcheck ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [w3c/epubcheck] Viewport in decimals generating ERROR (Issue #1481)
<meta name="viewport" content="width=1007.9999999999999, height=1360.8" />
ERROR(HTM_057): [path to epub]/OEBPS/section_1.xhtml(199,79): Viewport "width" value must be a positive number or the keyword "device-width"
ERROR(HTM_057): [path to epub]/OEBPS/section_1.xhtml(199,79): Viewport "height" value must be a positive number or the keyword "device-height"
For the above viewport declaration in the HTML, I'm getting the below ERROR messages from epubcheck 5.0.0 (this file does not generate an error in epubcheck 4.2.6).
This affects very few of our files (2 out of 4000 FXL files tested) and in my personal opinion, it seems a bit weird to have a viewport in decimals like that. I'd be OK adjusting the error messaging to say whole numbers instead of fixing epubcheck to use floats BUT I'm not the right person to make that call!
—
Reply to this email directly, view it on GitHub<#1481>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AB3A3LM52LQAA5HEYT2FXQLWUFOXFANCNFSM6AAAAAAUGSXL3M>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
@nekennedy : Yes, same we processed out of more than 500+ titles using the same viewport. I have no idea why the epub checker generated this error. So, waiting for updated EPUBChecker version with remove this error.. |
Good catch, and yeah I would expect an integer there, but the spec only says it must be a "positive number". MDN says it's a number of pixel, while the current CSS Viewport draft, based on the old Apple parsing algorithm, tries to convert the string value using |
Makes me wonder if they converted from some other unit to pixels. That'd be the only explanation I can think of for that kind of precision. Would probably help to know what reading systems will do with decimal values, but seems harmless to allow even if we don't promote the practice. Any thoughts on whether we should allow decimal values for the height/width viewport specifications @danielweck @bduga @wareid @larscwallin @davemanhall ? |
@mattgarrish - in the reading system, looks like we treat as an integer and parse as follows: typedef struct { "width=900.25, height=600.75" I'll have to ask about the backend systems... |
Hello all, I just looked at Thorium's source code, I haven't run actual tests. The implementation expects integers but the parser shouldn't crash as we ignore the fractional part of the number (essentially, this is equivalent to a mathematical floor operation on the floating point value). |
--------------------- Add `plaintext-only` value to `contenteditable` attribute validator/validator@228ea687b Co-authored-by: Niedziolka Michal <[email protected]> --------------------- add warnings for deprecated ARIA attributes (#1560) validator/validator@e61fbeb2c Co-authored-by: Steve Faulkner <[email protected]> --------------------- disallow aria attributes on datalist (#1557) validator/validator@b4849c04b Co-authored-by: Steve Faulkner <[email protected]> --------------------- allow role=button on area validator/validator@89ff1fc2b Co-authored-by: stevefaulkner <[email protected]> --------------------- fix: allow -1 for aria-colcount validator/validator@2466e73c4 Co-authored-by: Nick Schonning <[email protected]> --------------------- fix: Allow -1 for aria-rowcount validator/validator@eac205b6b Co-authored-by: Nick Schonning <[email protected]> --------------------- Add `fetchpriority` attribute validator/validator@7c9991405 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Script type importmap (#1478) validator/validator@4054c56f5 Co-authored-by: Michał Niedziółka <[email protected]> --------------------- Move “manifest” attribute to legacy-attributes list validator/validator@175e62d3a Co-authored-by: Michael[tm] Smith <[email protected]> --------------------- Pointer Events (#1481) validator/validator@5eb52a931 Co-authored-by: Michał Niedziółka <[email protected]> --------------------- Report a better error message for obsolete “manifest” attribute validator/validator@ae924b625 Co-authored-by: Michael[tm] Smith <[email protected]> --------------------- onscrollend validator/validator@87287a97f Co-authored-by: Niedziolka Michal <[email protected]> --------------------- slot element validator/validator@d6cf423c1 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Allow paragraphs in hgroup (#1467) validator/validator@3ff53973f Co-authored-by: Michał Niedziółka <[email protected]> --------------------- blocking="render" (#1466) validator/validator@df5d4e23a Co-authored-by: Michał Niedziółka <[email protected]> --------------------- inert validator/validator@507f551b2 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- hidden=until-found validator/validator@a424d55a8 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- media attribute in meta element validator/validator@af3e94d22 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Sync event handlers validator/validator@58bea51c7 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Remove manifest attribute validator/validator@66510f3ca Co-authored-by: Niedziolka Michal <[email protected]> --------------------- enterkeyhint validator/validator@70f3044d7 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Form method dialog (#1443) validator/validator@0db229a44 Co-authored-by: Michał Niedziółka <[email protected]> --------------------- imagesrcset and imagesizes in link (#1444) validator/validator@49656dbfc Co-authored-by: Michał Niedziółka <[email protected]> --------------------- feat: add support width and height of source in picture validator/validator@176d98e4f Co-authored-by: Takeshi Kurosawa <[email protected]> --------------------- Update: allow none/presentation on nav element (#1323) validator/validator@5e25edb39 Co-authored-by: Scott O'Hara <[email protected]> --------------------- Update schema/html5/web-forms.rnc validator/validator@95ba6c7cf Co-authored-by: Michael[tm] Smith <[email protected]> --------------------- update role allowances for button and input type=button validator/validator@6cc14c4d7 Co-authored-by: Scott O'Hara <[email protected]> --------------------- adds role=radio alowance to img alt=foo validator/validator@b013aa02b Co-authored-by: Scott O'Hara <[email protected]> --------------------- remove deprecated dpub role allowances validator/validator@b0fb152c0 Co-authored-by: Scott O'Hara <[email protected]> --------------------- allow section element to have role=group validator/validator@078341d37 Co-authored-by: Scott O'Hara <[email protected]>
--------------------- Add `plaintext-only` value to `contenteditable` attribute validator/validator@228ea687b Co-authored-by: Niedziolka Michal <[email protected]> --------------------- add warnings for deprecated ARIA attributes (#1560) validator/validator@e61fbeb2c Co-authored-by: Steve Faulkner <[email protected]> --------------------- disallow aria attributes on datalist (#1557) validator/validator@b4849c04b Co-authored-by: Steve Faulkner <[email protected]> --------------------- allow role=button on area validator/validator@89ff1fc2b Co-authored-by: stevefaulkner <[email protected]> --------------------- fix: allow -1 for aria-colcount validator/validator@2466e73c4 Co-authored-by: Nick Schonning <[email protected]> --------------------- fix: Allow -1 for aria-rowcount validator/validator@eac205b6b Co-authored-by: Nick Schonning <[email protected]> --------------------- Add `fetchpriority` attribute validator/validator@7c9991405 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Script type importmap (#1478) validator/validator@4054c56f5 Co-authored-by: Michał Niedziółka <[email protected]> --------------------- Move “manifest” attribute to legacy-attributes list validator/validator@175e62d3a Co-authored-by: Michael[tm] Smith <[email protected]> --------------------- Pointer Events (#1481) validator/validator@5eb52a931 Co-authored-by: Michał Niedziółka <[email protected]> --------------------- Report a better error message for obsolete “manifest” attribute validator/validator@ae924b625 Co-authored-by: Michael[tm] Smith <[email protected]> --------------------- onscrollend validator/validator@87287a97f Co-authored-by: Niedziolka Michal <[email protected]> --------------------- slot element validator/validator@d6cf423c1 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Allow paragraphs in hgroup (#1467) validator/validator@3ff53973f Co-authored-by: Michał Niedziółka <[email protected]> --------------------- blocking="render" (#1466) validator/validator@df5d4e23a Co-authored-by: Michał Niedziółka <[email protected]> --------------------- inert validator/validator@507f551b2 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- hidden=until-found validator/validator@a424d55a8 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- media attribute in meta element validator/validator@af3e94d22 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Sync event handlers validator/validator@58bea51c7 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Remove manifest attribute validator/validator@66510f3ca Co-authored-by: Niedziolka Michal <[email protected]> --------------------- enterkeyhint validator/validator@70f3044d7 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Form method dialog (#1443) validator/validator@0db229a44 Co-authored-by: Michał Niedziółka <[email protected]> --------------------- imagesrcset and imagesizes in link (#1444) validator/validator@49656dbfc Co-authored-by: Michał Niedziółka <[email protected]> --------------------- feat: add support width and height of source in picture validator/validator@176d98e4f Co-authored-by: Takeshi Kurosawa <[email protected]> --------------------- Update: allow none/presentation on nav element (#1323) validator/validator@5e25edb39 Co-authored-by: Scott O'Hara <[email protected]> --------------------- Update schema/html5/web-forms.rnc validator/validator@95ba6c7cf Co-authored-by: Michael[tm] Smith <[email protected]> --------------------- update role allowances for button and input type=button validator/validator@6cc14c4d7 Co-authored-by: Scott O'Hara <[email protected]> --------------------- adds role=radio alowance to img alt=foo validator/validator@b013aa02b Co-authored-by: Scott O'Hara <[email protected]> --------------------- remove deprecated dpub role allowances validator/validator@b0fb152c0 Co-authored-by: Scott O'Hara <[email protected]> --------------------- allow section element to have role=group validator/validator@078341d37 Co-authored-by: Scott O'Hara <[email protected]>
--------------------- Add `plaintext-only` value to `contenteditable` attribute validator/validator@228ea687b Co-authored-by: Niedziolka Michal <[email protected]> --------------------- add warnings for deprecated ARIA attributes (#1560) validator/validator@e61fbeb2c Co-authored-by: Steve Faulkner <[email protected]> --------------------- disallow aria attributes on datalist (#1557) validator/validator@b4849c04b Co-authored-by: Steve Faulkner <[email protected]> --------------------- allow role=button on area validator/validator@89ff1fc2b Co-authored-by: stevefaulkner <[email protected]> --------------------- fix: allow -1 for aria-colcount validator/validator@2466e73c4 Co-authored-by: Nick Schonning <[email protected]> --------------------- fix: Allow -1 for aria-rowcount validator/validator@eac205b6b Co-authored-by: Nick Schonning <[email protected]> --------------------- Add `fetchpriority` attribute validator/validator@7c9991405 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Script type importmap (#1478) validator/validator@4054c56f5 Co-authored-by: Michał Niedziółka <[email protected]> --------------------- Move “manifest” attribute to legacy-attributes list validator/validator@175e62d3a Co-authored-by: Michael[tm] Smith <[email protected]> --------------------- Pointer Events (#1481) validator/validator@5eb52a931 Co-authored-by: Michał Niedziółka <[email protected]> --------------------- Report a better error message for obsolete “manifest” attribute validator/validator@ae924b625 Co-authored-by: Michael[tm] Smith <[email protected]> --------------------- onscrollend validator/validator@87287a97f Co-authored-by: Niedziolka Michal <[email protected]> --------------------- slot element validator/validator@d6cf423c1 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Allow paragraphs in hgroup (#1467) validator/validator@3ff53973f Co-authored-by: Michał Niedziółka <[email protected]> --------------------- blocking="render" (#1466) validator/validator@df5d4e23a Co-authored-by: Michał Niedziółka <[email protected]> --------------------- inert validator/validator@507f551b2 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- hidden=until-found validator/validator@a424d55a8 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- media attribute in meta element validator/validator@af3e94d22 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Sync event handlers validator/validator@58bea51c7 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Remove manifest attribute validator/validator@66510f3ca Co-authored-by: Niedziolka Michal <[email protected]> --------------------- enterkeyhint validator/validator@70f3044d7 Co-authored-by: Niedziolka Michal <[email protected]> --------------------- Form method dialog (#1443) validator/validator@0db229a44 Co-authored-by: Michał Niedziółka <[email protected]> --------------------- imagesrcset and imagesizes in link (#1444) validator/validator@49656dbfc Co-authored-by: Michał Niedziółka <[email protected]> --------------------- feat: add support width and height of source in picture validator/validator@176d98e4f Co-authored-by: Takeshi Kurosawa <[email protected]> --------------------- Update: allow none/presentation on nav element (#1323) validator/validator@5e25edb39 Co-authored-by: Scott O'Hara <[email protected]> --------------------- Update schema/html5/web-forms.rnc validator/validator@95ba6c7cf Co-authored-by: Michael[tm] Smith <[email protected]> --------------------- update role allowances for button and input type=button validator/validator@6cc14c4d7 Co-authored-by: Scott O'Hara <[email protected]> --------------------- adds role=radio alowance to img alt=foo validator/validator@b013aa02b Co-authored-by: Scott O'Hara <[email protected]> --------------------- remove deprecated dpub role allowances validator/validator@b0fb152c0 Co-authored-by: Scott O'Hara <[email protected]> --------------------- allow section element to have role=group validator/validator@078341d37 Co-authored-by: Scott O'Hara <[email protected]>
For the above viewport declaration in the HTML, I'm getting the below ERROR messages from epubcheck 5.0.0 (this file does not generate an error in epubcheck 4.2.6).
This affects very few of our files (2 out of 4000 FXL files tested) and in my personal opinion, it seems a bit weird to have a viewport in decimals like that. I'd be OK adjusting the error messaging to say whole numbers instead of fixing epubcheck to use floats BUT I'm not the right person to make that call!
The text was updated successfully, but these errors were encountered: