-
Notifications
You must be signed in to change notification settings - Fork 711
[css-position-3] Auto margin resolution isn't symmetrical. #5374
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
Comments
cc/ @fantasai Unsure what all the UAs do for different writing modes. |
Chromium seems to use the wm of the abspos in order to decide between the algorithms, and Firefox the wm of the containing block. But in both browsers, the |
@Loirooriol For this kind of thing, we generally use the writing mode of the containing block, so I think Firefox is more correct in that respect. |
…s different in vertical vs horizontal axes per CSS2. #5374
Edits checked in to make the behavior match CSS2, translating to vertical writing modes per containing block. |
And specifically, we aligned with Firefox's behavior (using containing block for both the axis and direction), because using the WM of one element but the direction of another, like Chrome does, is almost always wrong. |
Are there additional tests for this now? |
https://drafts.csswg.org/css-position-3/#abspos-margins
There is a sutle different between the horizontal and vertical (or inline, and block? - needs research) algorithms:
https://drafts.csswg.org/css-position-3/#abs-non-replaced-width
https://drafts.csswg.org/css-position-3/#abs-non-replaced-height
See this testcase:
https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=8318
In the vertical (or block, but which block?) direction negative auto margins get distributed evenly between the top and bottom, where-as horizontal (or inline) the inline-start margin is zero.
The text was updated successfully, but these errors were encountered: