Closed Bug 1579582 Opened 6 years ago Closed 6 years ago

[Inactive CSS] 'grid-column' etc have an effect for abs.pos. boxes with a grid container as "containing block"

Categories

(DevTools :: Inspector, defect, P2)

defect

Tracking

(firefox70 verified, firefox71 verified)

VERIFIED FIXED
Firefox 71
Tracking Status
firefox70 --- verified
firefox71 --- verified

People

(Reporter: MatsPalmgren_bugz, Assigned: miker)

References

(Blocks 1 open bug)

Details

(Keywords: testcase)

Attachments

(3 files)

Attached file Testcase

STR

  1. load the attached testcase
  2. open DevTools > Inspector
  3. 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.

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?

Flags: needinfo?(mratcliffe)
Summary: 'grid-column' etc have an effect for abs.pos. boxes with a grid container as "containing block" → [Inactive CSS] 'grid-column' etc have an effect for abs.pos. boxes with a grid container as "containing block"
Priority: -- → P2
Flags: needinfo?(mratcliffe)

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: nobody → mratcliffe
Pushed by mratcliffe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3bfc227fb884 'grid-column' etc have an effect for abs.pos. boxes with a grid container as 'containing block' r=pbro
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71

Please verify this fix in nightly with the test case and steps in comment 0.
Thanks!

Flags: qe-verify+

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:
Attachment #9092636 - Flags: approval-mozilla-beta?
QA Whiteboard: [qa-triaged]

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 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.

Attachment #9092636 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

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:

https://irccloud.mozilla.com/file/Rm3i2lvI/image.png

Flags: needinfo?(mratcliffe)

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.

Recreating a version of this patch specifically for Beta.

Flags: needinfo?(mratcliffe)

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).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: