Closed Bug 1004197 Opened 11 years ago Closed 10 years ago

Serializing 'grid-template-columns' values fails

Categories

(DevTools :: Inspector, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: MatsPalmgren_bugz, Unassigned)

References

(Blocks 1 open bug)

Details

data:text/html,<div style="display:grid; grid-template-columns:(x) 0"> The 'grid-template-columns' value isn't displayed properly in DevTools Inspector. I do get the correct style data values in layout code though so I think it's just serializing it that fails.
I can reproduce this (the value serializes as 'undefinedx) 0px' and is marked "invalid"), but I don’t understand why. I don’t what API the devtools are using, since the serialization of both the specified and computed value looks fine. Test cases: data:text/html,<body style="grid-template-columns:(x) 0"><script>document.write(document.body.style.gridTemplateColumns)</script> data:text/html,<body style="grid-template-columns:(x) 0"><script>document.write(getComputedStyle(document.body).gridTemplateColumns)</script> Output in Nightly 2014-05-05 for both: (x) 0px
Yeah, I can't find anything wrong in the style system code either. Maybe someone in the DevTools team can tell us what goes wrong? (note that you have to set the pref layout.css.grid.enabled to true)
Component: CSS Parsing and Computation → Developer Tools: Inspector
Product: Core → Firefox
Any idea what's going on here?
Flags: needinfo?(ttromey)
Note that 'grid-template-columns' now uses square brackets (changed in bug 1164953), so the current version of comment 0's data URI is now: data:text/html,<div style="display:grid; grid-template-columns:[x] 0"> It looks right to me in DevTools inspector, too. Mats, is this still broken for you?
Flags: needinfo?(mats)
FWIW I can confirm that the (x) syntax does not work for me (and I see a message in the console about this), but that the [x] syntax does.
Flags: needinfo?(ttromey)
Sounds like it's WORKSFORME then, though leaving the needinfo? to mats in case he disagrees.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Works for me too. I wonder if it was that bracketing change that "fixed" it?
Flags: needinfo?(mats)
(In reply to Mats Palmgren (:mats) from comment #7) > Works for me too. I wonder if it was that bracketing change that "fixed" it? Here, the invalid property was dropped by the platform (and logged on the console), so the inspector never saw it. So, yeah, fixing the syntax made it ok. I don't know why I got different results from comment #0 and comment #1 though.
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.