`margin: inherit` doesn't respect position-try flipped values
Categories
(Core :: Layout: Positioned, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox149 | --- | affected |
People
(Reporter: jakea, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
1021.79 KB,
video/mp4
|
Details |
Ignore the viewport overflowing, I've filed that in https://bugzilla.mozilla.org/show_bug.cgi?id=2010246
https://codepen.io/t_afif/pen/QwyMrvG
This demo uses margin: inherit to inherit margin values that are flipped by position-try, however Firefox does not inherit the flipped values.
Comment 1•1 month ago
|
||
The severity field is not set for this bug.
:jwatt, could you have a look please?
For more information, please visit BugBot documentation.
Comment 2•1 month ago
|
||
I suspect this might be related to the fact that we don't interleave restyling in the same way that other browsers do... Maybe emilio can confirm whether this inheritance outcome is expected (based on our current setup) or not?
For reference, this seems to be the code that handles flip-block -- I'm not clear on whether the comment's mention of a possible-future-migration-to to_computed_value might be related to this or not. (Seems conceivable that it might be related, since the computed value is the thing that inherits. I don't have a good mental model for where style_adjuster fits in, but I could imagine it making its adjustments as an after-effect, without impacting the value that inherits...)
/// Performs adjustments for position-try-fallbacks. The properties that need adjustments here
/// are luckily not affected by previous adjustments nor by other computed-value-time effects,
/// so we can just perform them here.
///
/// NOTE(emilio): If we ever perform the interleaving dance, this could / should probably move
/// around to the specific properties' to_computed_value implementations, but that seems
/// overkill for now.
fn adjust_for_try_tactic(&mut self, tactic: &PositionTryFallbacksTryTactic) {
...
FlipBlock => {
self.flip_self_alignment(/* block = */ true);
self.flip_insets_and_margins(/* horizontal = */ wm.is_vertical());
},
Tentatively triaging as S3.
Comment 3•1 month ago
|
||
Yeah, same commentary as bug 2010367 comment 2
Comment 4•1 month ago
|
||
Thanks. I'll dupe this to that bug since that one's already in the anchor-positioning-triage-queue (and they're about the same codepen).
Updated•1 month ago
|
Description
•