You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
implement updated viewport meta requirements #1401
@mattgarrish I'm trying to implement a check for the post-CR viewport rules, notably the requirement that height and width properties are not defined several times, but I'm not sure how EPUBCheck should behave. Can you please help me clarify the following?
The spec says:
the initial containing block [css2] is obtained from the REQUIRED height and width definitions in a viewport meta tag
and
EPUB creators MUST NOT specify duplicate height or width definitions either within a single viewport meta tag or by specifying multiple viewport meta tags.
but it does not explicitly say that there MUST be a single viewport meta tag.
So strictly speaking, the following combinations are valid viewport definitions:
(1) may be safe and working, but I definitely have doubts about (2). Should we fix the spec to disallow that and require viewport is defined in a single meta element, or at least both the (required) width and height values are defined in the same meta element?
I'm hesitant to implement a strict interpretation of the spec (i.e. both (1) and (2) above considered valid); I think it would be more useful if EPUBCheck warned users there, as it is likely an authoring error that would lead to a viewport that may not be parsed by the RS.
Reading systems have to ignore all but the first viewport meta declaration, so any permutation that requires compiling the information from multiple tags would be invalid.
but it does not explicitly say that there MUST be a single viewport meta tag.
Ya, I believe that's intentional as whether there are other viewport meta tags isn't specifically an epub concern. Clarifying that only the first tag is processed for fxl purposes, so that's where the dimension declarations need to be, is a useful add. I'll open an issue and PR shortly.
Activity
rdeltour commentedon Dec 12, 2022
@mattgarrish I'm trying to implement a check for the post-CR viewport rules, notably the requirement that
heightandwidthproperties are not defined several times, but I'm not sure how EPUBCheck should behave. Can you please help me clarify the following?The spec says:
and
but it does not explicitly say that there MUST be a single viewport meta tag.
So strictly speaking, the following combinations are valid viewport definitions:
(1) may be safe and working, but I definitely have doubts about (2). Should we fix the spec to disallow that and require viewport is defined in a single
metaelement, or at least both the (required)widthandheightvalues are defined in the samemetaelement?I'm hesitant to implement a strict interpretation of the spec (i.e. both (1) and (2) above considered valid); I think it would be more useful if EPUBCheck warned users there, as it is likely an authoring error that would lead to a viewport that may not be parsed by the RS.
/cc @iherman
mattgarrish commentedon Dec 12, 2022
Reading systems have to ignore all but the first viewport meta declaration, so any permutation that requires compiling the information from multiple tags would be invalid.
mattgarrish commentedon Dec 12, 2022
Ya, I believe that's intentional as whether there are other viewport meta tags isn't specifically an epub concern. Clarifying that only the first tag is processed for fxl purposes, so that's where the dimension declarations need to be, is a useful add. I'll open an issue and PR shortly.
feat: update viewport meta element requirements