[Inactive CSS] 'grid-column' etc have an effect for abs.pos. boxes with a grid container as "containing block"
Categories
(DevTools :: Inspector, defect, P2)
Tracking
(firefox70 verified, firefox71 verified)
People
(Reporter: MatsPalmgren_bugz, Assigned: miker)
References
(Blocks 1 open bug)
Details
(Keywords: testcase)
Attachments
(3 files)
STR
- load the attached testcase
- open DevTools > Inspector
- select the
<x>element
ACTUAL RESULTS
In the Style pane, the grid-column declaration is greyed out and there is an information box that says:
grid-column has no effect on this element since it’s not a grid item. Try adding display:grid or display:inline-grid to the item’s parent. Learn more
This is incorrect. Abs.pos. descendants (not just children) that has a grid/subgrid container as their containing block are aligned to the grid using their grid-placement properties, so the properties do have an effect.
https://drafts.csswg.org/css-grid/#abspos-items
EXPECTED RESULTS
The grid-column declaration should be displayed normally.
Comment 1•6 years ago
|
||
Thanks Mats for filing this. This is important to address quickly and maybe even uplift to beta to avoid cases where users might lose trust in the tool because it shows incorrect information.
Mike, could you please add this to your radar?
Updated•6 years ago
|
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 2•6 years ago
|
||
This applies to:
- grid-area
- grid-column
- grid-column-end
- grid-column-start
- grid-row
- grid-row-end
- grid-row-start
We can use a special case for justify-self, which is within the same validator (it has no effect on absolutely positioned elements).
| Assignee | ||
Comment 3•6 years ago
|
||
Comment 5•6 years ago
|
||
| bugherder | ||
Comment 6•6 years ago
|
||
Please verify this fix in nightly with the test case and steps in comment 0.
Thanks!
Comment 7•6 years ago
|
||
Comment on attachment 9092636 [details]
Bug 1579582 - 'grid-column' etc have an effect for abs.pos. boxes with a grid container as 'containing block' r?pbro!
Beta/Release Uplift Approval Request
- User impact if declined: "Inactive CSS" is a new DevTools feature in 70 that provides super useful help to webdevs by telling them when certain parts of their CSS doesn't do what they thought it did.
Unfortunately there are cases (such as this bug) where the logic is wrong and the tool tells people something is wrong when really it's right.
If we decline this uplift, we run the risk of people seeing this false warning and therefore losing trust in the tool. This is bad because they will be much less likely to use the feature after this point.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: I just added the qe-verify+ flag to get someone to verify this in nightly. The steps are in comment 0.
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Not risky because a) it's just for devtools (general population unimpacted) and b) the fix is trivial, it's only removing a check for absolute positions. The rest of the code doesn't change.
- String changes made/needed:
Updated•6 years ago
|
Comment 8•6 years ago
|
||
Reproduced the issue on Firefox Nightly 71.0a1 (2017-09-06).
Verified fixed with the test case and steps from Description on Windows 7 x64, Ubuntu 18.04 x64 and macOS 10.14 using latest Nightly 71.0a1 (2019-09-27).
Comment 9•6 years ago
|
||
Comment on attachment 9092636 [details]
Bug 1579582 - 'grid-column' etc have an effect for abs.pos. boxes with a grid container as 'containing block' r?pbro!
New feature for 70, fix verified in nightly.
Let's uplift for beta 11.
Comment 10•6 years ago
|
||
While I was importing this patch for an uplift I got a conflict. Looks like bug 1551581 is needed also.
This was the conflict I've got:
Comment 11•6 years ago
|
||
I'll let Mike reply but, fwiw, I think we should make a specific patch for beta that doesn't have merge conflicts, instead of also pulling bug 1551581, so as to minimize the risk. Bug 1551581 is a new feature, not a bug fix.
| Assignee | ||
Comment 12•6 years ago
•
|
||
Recreating a version of this patch specifically for Beta.
| Assignee | ||
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
| bugherder uplift | ||
Comment 15•6 years ago
|
||
Verified fixed on Windows 7 x64, Ubuntu 18.04 x64 and macOS 10.14 using Firefox 70 Beta 12 build from treeherder (https://treeherder.mozilla.org/#/jobs?repo=mozilla-beta&revision=17b4f7b2c9697d78f98a702572864bd96001d1e0&selectedJob=269495211).
Updated•6 years ago
|
Description
•