You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-display][css-position] Computed value of float with absolute positioning when there is no box? #1436
If 'display' has the value 'none', then 'position' and 'float' do not apply. In this case, the element generates no box.
But does this affect the computed value of position or float?
Both Firefox and Chrome seem to think that the computed value should be the specified one. However, if you specify both absolute positioning and floating, Edge computes float to none, according to
Otherwise, if 'position' has the value 'absolute' or 'fixed', the box is absolutely positioned, the computed value of 'float' is 'none'
Anyways, the interesting case is display: contents, which didn't exist in CSS 2.1. I guess it should interact with position and float just like display: none does.
However, in this case Firefox and Chrome also compute float to none when an element with display: contents has both both absolute positioning and floating.
Proposed resolution is that an element with display: none, a child of an element with display: none, and an element with display: contents should all behave the same with respect to computed value computations, and therefore the full set of computed value transformations in CSS2.1§9.7 should be applied in all three of these cases.
Put “if 'position' has the value 'absolute' or 'fixed', the computed value of 'float' is 'none'” as step 0. In step 2, remove “the computed value of 'float' is 'none'”. (Then renumber the steps to start with 1 again.)
The CSS Working Group just discussed Computed value of float with absolute positioning when there is no box?, and agreed to the following resolutions:
RESOLVED: Make the changes listed in css2.1 and position
The full IRC log of that discussion
<dael> Topic: Computed value of float with absolute positioning when there is no box?
<dael> Github: https://github.com//issues/1436
<dael> fantasai: The issue is about if display has value of none 2.1 rules say position and flow don't apply and this short circuts the rest of display conputations. Normally if you have position absolute and float left float computes to none. If you have display none the computation doesn't happen. However, this becomes interesting with display: contents. What do we do for that one.
<dael> TabAtkins: This is where display: contents is the same problem as none, it's just someone is more freshly looking.
<dael> fantasai: Anything display: none due to parents the float computes to none. We propose any element with display: none , chidl of display: none or display: contents they all behave the same in respect to these transformations.
<fantasai> https://github.com//issues/1436#issuecomment-313215820
<dael> fantasai: We proposed specific edits in the issue. We'ld like a resolution to make them consistant and then a second for people tor eview the proposed edits.
<dael> dbaron: Idea is you make them consistant by always applying the rule where if position is absolute float is none.
<dael> TabAtkins: It's bad that it's inconsistant.
<dael> Rossen_: We already do...in all cases we would applyt hte rules and it seems FF and Chrome from reading the issue have a half and half where you do it for display: content but not display: none so you ahve branching somewhere.
<dael> dbaron: I'd be hesitant to have special rules for decendants.
<fantasai> dbaron: But I'd be okay to make them all float: none
<dael> Rossen_: There shouldn't be any special casing for decendants. I was highlighting that in this case you're not going to apply float computation rules, but with display: contents you will. If we all align and make it always apply then it will be more itnernally consistant and interop
<dael> TabAtkins: It matches IE always and Chrome & FF except in cases with display: none. Always applies is a small change.
<dbaron> s/float is none./float is none?/
<dael> Rossen_: I'm fine making the changes to css position. fantasai you said there might be changes to css 2?
<dael> Rossen_: Or is it css display?
<dael> fantasai: Yes for css2. There are edits in the issue. IT would be good for someone to check those
<dael> Rossen_: I did check, but those edits appear in css2.1 section 9.7 and in css position. I can reflect the position changes. Q is do we need to do anything on css-display
<dael> TabAtkins: I don't think so. Algo is only in 2.1 and position. There's nothing special in display.
<dael> Rossen_: Sounds good.
<dael> astearns: sounds like we need to resolve to make edits in css position. WOuld it make sense to make the edits, round of review, and then backport to css2?
<dael> TabAtkins: We were operating off 2.1 algo so we know what needs to be changed.
<ChrisL> we resolved to request CR on css display in February. Is there some issue with the disposition of comments of the transition request? bert was handling it
<dael> astearns: So we'd resolve the change for both position & 2.1
<dael> TabAtkins: Yeah.
<dael> astearns: Obj?
<dael> RESOLVED: Make the changes listed in css2.1 and position
Activity
Loirooriol commentedon May 24, 2017
There is also the case of being inside a
display: noneelement:I don't see why this should be different than when having
display: noneitself.fantasai commentedon Jul 5, 2017
Proposed resolution is that an element with
display: none, a child of an element withdisplay: none, and an element withdisplay: contentsshould all behave the same with respect to computed value computations, and therefore the full set of computed value transformations in CSS2.1§9.7 should be applied in all three of these cases.Possible edits:
display: nonedoesn't generate a box is already described under the definition ofdisplay: none.css-meeting-bot commentedon Jul 19, 2017
The CSS Working Group just discussed
Computed value of float with absolute positioning when there is no box?, and agreed to the following resolutions:RESOLVED: Make the changes listed in css2.1 and positionThe full IRC log of that discussion
<dael> Topic: Computed value of float with absolute positioning when there is no box?<dael> Github: https://github.com//issues/1436
<dael> fantasai: The issue is about if display has value of none 2.1 rules say position and flow don't apply and this short circuts the rest of display conputations. Normally if you have position absolute and float left float computes to none. If you have display none the computation doesn't happen. However, this becomes interesting with display: contents. What do we do for that one.
<dael> TabAtkins: This is where display: contents is the same problem as none, it's just someone is more freshly looking.
<dael> fantasai: Anything display: none due to parents the float computes to none. We propose any element with display: none , chidl of display: none or display: contents they all behave the same in respect to these transformations.
<fantasai> https://github.com//issues/1436#issuecomment-313215820
<dael> fantasai: We proposed specific edits in the issue. We'ld like a resolution to make them consistant and then a second for people tor eview the proposed edits.
<dael> dbaron: Idea is you make them consistant by always applying the rule where if position is absolute float is none.
<dael> TabAtkins: It's bad that it's inconsistant.
<dael> Rossen_: We already do...in all cases we would applyt hte rules and it seems FF and Chrome from reading the issue have a half and half where you do it for display: content but not display: none so you ahve branching somewhere.
<dael> dbaron: I'd be hesitant to have special rules for decendants.
<fantasai> dbaron: But I'd be okay to make them all float: none
<dael> Rossen_: There shouldn't be any special casing for decendants. I was highlighting that in this case you're not going to apply float computation rules, but with display: contents you will. If we all align and make it always apply then it will be more itnernally consistant and interop
<dael> TabAtkins: It matches IE always and Chrome & FF except in cases with display: none. Always applies is a small change.
<dbaron> s/float is none./float is none?/
<dael> Rossen_: I'm fine making the changes to css position. fantasai you said there might be changes to css 2?
<dael> Rossen_: Or is it css display?
<dael> fantasai: Yes for css2. There are edits in the issue. IT would be good for someone to check those
<dael> Rossen_: I did check, but those edits appear in css2.1 section 9.7 and in css position. I can reflect the position changes. Q is do we need to do anything on css-display
<dael> TabAtkins: I don't think so. Algo is only in 2.1 and position. There's nothing special in display.
<dael> Rossen_: Sounds good.
<dael> astearns: sounds like we need to resolve to make edits in css position. WOuld it make sense to make the edits, round of review, and then backport to css2?
<dael> TabAtkins: We were operating off 2.1 algo so we know what needs to be changed.
<ChrisL> we resolved to request CR on css display in February. Is there some issue with the disposition of comments of the transition request? bert was handling it
<dael> astearns: So we'd resolve the change for both position & 2.1
<dael> TabAtkins: Yeah.
<dael> astearns: Obj?
<dael> RESOLVED: Make the changes listed in css2.1 and position
dbaron commentedon Jul 19, 2017
Could somebody:
(I think it's reasonable to ask that when we're proposing changes to 2.1.)
The computed value of float with absolute positioning when there is n…
FremyCompany commentedon Nov 6, 2018
Hey, just fwiw, I started making the process of filing this kind of small tests more friction-less; here is the current workflow:
https://wptest.center/
I will spend a couple of my cycles improving this workflow even further in the near future, so if you have feedback please feel free to reach out :) @tabatkins @fantasai @frivoal in particular; cc @gregwhitworth @foolip @lukebjerring
The computed value of float with absolute positioning when there is n…
FremyCompany commentedon Nov 12, 2018
Just realized I hadn't included the url of the site, so for those who didn't know already, the url to try the new tool is https://wptest.center/
Bug 1505232 [wpt PR 13958] - The computed value of float with absolut…
Bug 1505232 [wpt PR 13958] - The computed value of float with absolut…
Make computed value of float with absolute positioning be "none".
Bug 1505232 [wpt PR 13958] - The computed value of float with absolut…
Bug 1505232 [wpt PR 13958] - The computed value of float with absolut…
Bug 1505232 [wpt PR 13958] - The computed value of float with absolut…
Bug 1505232 [wpt PR 13958] - The computed value of float with absolut…