-
Notifications
You must be signed in to change notification settings - Fork 645
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
[css-align] are there compatibility issues with replacing overconstraint rules from CSS2? #1428
Comments
This also applies to the rules for |
Also, any differences from CSS 2.1 should be noted explicitly. |
Testing: Horizontal, block
Result: both Chrome and Firefox return "50px" for both margins, compatible with Align. (They do not apply the fixup in an author-observable way.) Horizontal, abspos
Result: Chrome returns "50px" for both margins and "0px" for both insets, compatible with Align. Firefox returns "100px" for 'right', exposing the used-value fixup in an observable way. Vertical, abspos
Result: Chrome returns "10px" for both margins and "0px" for both insets, compatible with Align. Firefox returns "30px" for 'bottom', exposing the used-value fixup in an observable way. |
So looks like Chrome is compatible with the Align text in all cases, but Firefox is only compatible for block flow; for abspos elements, Firefox exposes the fixup and is thus inconsistent with Align. Since browsers are inconsistent, I suspect we can make this change (at least, Align seems to be honored more closely than 2.1 is).
Isn't that what the "rules in [2.1] are ignored in favor of alignment as specified here" is saying? |
The prose is in the form
which explicitly specifies a) that it overrides CSS2.1 and b) that used values are affected as we're discussing here. Since resolved values are defined to reference used values, this means the spec should be sufficiently clear on this point. Adding Agenda+ just to verify with the WG about overriding CSS2.1. |
To add to this, Edge produces the same results as Chrome for both test cases. |
The CSS Working Group just discussed
The full IRC log of that discussion<dael> Topic: are there compatibility issues with replacing overconstraint rules from CSS2<dael> Github: https://github.com//issues/1428 <Rossen_> t, I thought you were irc-only :) <dael> fantasai: What's going on is in the alignment spec we're saying we no longer do the overconstraint rules in CSS 2. Those are if you spec margin and padding and border and width on both sides. IT's spec in CSS2.1 that margin box must fill containing block. If you spec all these it won't fit likely. 2.1 says you take end size margin and treat it as auto. <Rossen_> but you guys are awesome and multitask awesomely! <dael> fantasai: IN alignment we're saying don't do that. When the margin box doesn't match the alignment dictates layout. Observably ther'es no difference. We spec the initial to be start alignmnt. dbaron pointed out we need to investigate situation with object model. Do you get he result of what was spec or what was used? <dael> fantasai: TabAtkins ran tests, it's mostly like the align spec, but there's no compat. We wanted to verify the group is okay with this override <gregwhitworth> fantasai: I just added that Edge matches Chrome <dael> TabAtkins: Chrome always returns specified value for margin right, right or bottom. FF returns margin-right spec value, but fixed for right and bottom. I couldn't test other browsers at the time, but they're in the issue <dael> gregwhitworth: I added, we match Chrome. <dael> TabAtkins: Great. Sounds like there was little matching 2.1 Let's resolve to let align overrule <dael> Rossen_: Okay, so let's match the spec to impl. Other opinions? <dael> Rossen_: Objections to proposal? <dael> RESOLVED: Accept margin and position properties will return the specified values |
Since Align already says it overrides 2.1, there's no change to be made. Closing, but if @dbaron thinks there's anything left to do, please ping this bug. ^_^ |
The rules for
justify-self
on blocks and the rules forjustify-self
on Absolutely-Positioned boxes specify that they replace the overconstraint rules in CSS Level 2 with the rules for justify-self. This replacement is not scoped to values other thannormal
. I think that is probably a good thing.However, one issue where the overconstraint rules have come up is the question of what
getComputedStyle()
returns for the used values ofmargin
(for block) or offset (for abspos) properties. My memory is that this generally hasn't been particularly conformant to a literal reading of the spec, but this may have changed.I think it's worth investigating what implementations do for
getComputedStyle()
and margins, and then either:normal
values (which in some sense would introduce inconsistency), ornormal
values as well, and therefore that the used values of margins (for blocks) or offsets (for abspos) are no longer expected to be adjusted for overconstraint.The text was updated successfully, but these errors were encountered: