-
Notifications
You must be signed in to change notification settings - Fork 81
safe-printable-inset META value proposal #233
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
base: main
Are you sure you want to change the base?
safe-printable-inset META value proposal #233
Conversation
jcscottiii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I only have one question.
|
|
||
| where `inset-specifier` is a numeric value. The unit could be CSS pixels or | ||
| points. Using centimeters for anything here isn't a great idea, since they don't | ||
| convert nicely into CSS pixels (unlike inches). I suggest using CSS pixels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Is it worth it to enforce the usage of pixels here? (Or rather what's the risk if we don't enforce it?)
When new metadata is introduced, there's a risk of incorrect usage (e.g., typos, invalid values, or inappropriate units). For example, a value like content="2in" might be provided, even though the RFC suggests CSS pixels or points and discourages inches. The best way to mitigate this is to add automated checks. Other places that handled something similar:
- RFC 163 (web_features) added a lint to ensure its new metadata didn't get out of sync with test files
- RFC 158 (Variant name should be a non-zero length string) added a lint to forbid a problematic authoring pattern
- RFC 211 (Support testdriver.js in other test types) proposed a lint to enforce correct usage with
reftest-wait.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking a unitless value, which is why I'm suggesting pixels. But I suppose we could require units (and even allow centimeters, for all those rounding error fans out there) to be specified as part of the value instead?
gsnedders
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly my question is "how would we hook this up to the style engine", because somehow we have to go from the meta element to this impacting print style and output.
Most of the time we're using WebDriver to communicate with the browser; does it therefore make sense to add something to the WebDriver print command that specifies the safe printable inset? My gut is yes?
|
Here's something I hacked together for testing. https://chromium-review.googlesource.com/c/chromium/src/+/7415241 Does this answer your question? |
Proposed spec changes here: w3c/csswg-drafts#13190
Spec discussion: w3c/csswg-drafts#11395