Grid line numbers are confusing (but techincally not wrong) when there is no explicit grid
Categories
(DevTools :: Inspector: Layout, defect, P3)
Tracking
(Not tracked)
People
(Reporter: pbro, Unassigned)
Details
(Keywords: testcase)
Attachments
(6 files)
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Updated•6 years ago
|
Comment 4•6 years ago
|
||
Comment 5•5 years ago
|
||
Comment 6•5 years ago
|
||
Comment 7•5 years ago
|
||
The data we send from Layout looks correct to me. ComputedGridTrackInfo has mNumLeadingImplicitTracks=0 mNumExplicitTracks=0 and mSizes has length 1, which implies there is an implicit track ("after" the non-existing explicit tracks),
which is correct for grid-template-rows:none
.
devtools shows these row numbers:
1 -1
2
This is actually technically correct since line 2 is an implicit line and -1 means "last line in the explicit grid" which in this case is the same as line 1.
Comment 8•5 years ago
|
||
Comment 9•5 years ago
|
||
(In this case we report mNumLeadingImplicitTracks=2 mNumExplicitTracks=0 and mSizes has length 3, which seems correct.)
In this case, devtools shows these row line numbers:
-3
Header
-2
Header
1 -1
Header
2
which seems technically correct to me.
Comment 10•5 years ago
|
||
Maybe Brad remembers if we did it like this on purpose or not?
(I don't really see any better way to display it, fwiw.)
Comment 11•5 years ago
|
||
(In reply to Mats Palmgren (:mats) from comment #10)
Maybe Brad remembers if we did it like this on purpose or not?
I think all the negative numbers in all of the testcases are correct because -1 is at the far end of the explicit rows and none are explicit, so it would appear on the first line, in front of the first cell. In testcase #4 it's extra weird because of the grid-row: -3 placement, which dictates where -1 lands even though there are no explicit rows. And then the positive number 1 lands where a grid-row: 1 item would appear. That is the intention behind the reporting of the grid lines -- to make them actionable such that if a user was looking at the grid inspector and devtools and thought "I want to place something there", then that user could use the reported grid lines to do so.
Updated•2 years ago
|
Description
•