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

[motion] CSS and SVG box correspondence seems overly-simplistic #66

Closed
fantasai opened this issue Nov 5, 2016 · 6 comments
Closed

[motion] CSS and SVG box correspondence seems overly-simplistic #66

fantasai opened this issue Nov 5, 2016 · 6 comments

Comments

@fantasai
Copy link
Contributor

fantasai commented Nov 5, 2016

For SVG elements without associated CSS layout box, the used value for content-box, padding-box, border-box and margin-box is fill-box.

For elements with associated CSS layout box, the used value for fill-box, stroke-box and view-box is border-box.

The Paint module uses a bit more sophistication in its box mappings: content-box | padding-box -> fill-box and border-box -> stroke-box. (The mapping in the other direction relates to text bounds, which is maybe not appropriate here.) At the very least, these two modules should be consistent in how they map the SVG and CSS terms where possible.

@dbaron
Copy link
Member

dbaron commented Apr 21, 2017

This should maybe be a duplicate of w3c/csswg-drafts#857.

@fantasai
Copy link
Contributor Author

fantasai commented Jul 2, 2018

Resolved in w3c/csswg-drafts#857 (comment)

@fantasai
Copy link
Contributor Author

I've copied out the definitions into the css-box-3 module, since that seems like a useful place to centralize these definitions: https://drafts.csswg.org/css-box-3/

My proposal is that we adopt these definitions in css-box-3 and rebase all the other specs' -box property value definitions over it, then push the spec to CR (dropping margin-trim if necessary).

[See also https://github.com/w3c/csswg-drafts/issues/4662 ; I've left the coordinate aspect of the view-box definition out until that's resolved.]

@AmeliaBR
Copy link

AmeliaBR commented Mar 4, 2020

I agree that it makes sense to define these in a single place & the box model spec makes as much sense as any.

With respect to the definition text:

  • The phrases “SVG context” and “CSS context” should be defined.

  • It's important to note that some elements (<svg> and <foreignObject>) can have both SVG and CSS contexts associated with them, for the internal vs external layout systems. So the fallbacks should be worded as “if this element doesn't have a [CSS|SVG] layout context, use this fallback”.

@fantasai
Copy link
Contributor Author

fantasai commented Mar 5, 2020

@tabatkins
Copy link
Member

Partially fixed in b0cc95a

tabatkins added a commit that referenced this issue May 20, 2021
…ppings. Actually define what <coord-box>'s shape is when used alone. #66
tabatkins added a commit that referenced this issue May 20, 2021
…ppings. Actually define what <coord-box>'s shape is when used alone. #66
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy