-
Notifications
You must be signed in to change notification settings - Fork 132
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
x/y/width/height attributes on HTML elements #247
Comments
No "geometric properties" are CSS properties, which is why that sentence was recently corrected! For the SVG-namespaced elements, the geometric properties have equivalent presentation attributes, but for the HTML we are not proposing anything new. The HTML I've just recently added a clarifying note to the Embedding chapter: https://svgwg.org/svg2-draft/embedded.html#Placement I will need to change it to indicate that most of the HTML width/height attributes allow percentages. Canvas is the exception, because the attributes set the actual pixel size of the canvas. Any other suggested changes? |
Thanks!
That would only apply to implementors, not authors, since using percentages is non-conforming. |
Ah, that explains my confusion. I think I'll skirt the issue and not mention them at all; it's only an informative note, with a link to the HTML spec for the details. |
[[
‘canvas’
‘foreignObject’
‘iframe’
‘image’
‘video’
Let box be the tightest rectangle in coordinate space space that contains the positioning rectangle defined by the ‘x’, ‘y’, ‘width’ and ‘height’ geometric properties of the element.
...
]]
https://svgwg.org/svg2-draft/coords.html#ContainerElementBoudingBoxComputation
The HTML elements here do not have 'x' and 'y' attributes defined in HTML. Do you propose making them conforming for HTML?
How is the value taken from the 'width' and 'height' attributes for HTML elements? It could use the computed value from CSS (or some such), or use https://html.spec.whatwg.org/multipage/infrastructure.html#rules-for-parsing-dimension-values (can be error, percentage, or a length) if you want just the attribute and ignore any CSS...
Related
#240
whatwg/html#919
The text was updated successfully, but these errors were encountered: