New issue
Advanced search Search tips

Issue 716114 link

Starred by 4 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature



Sign in to add a comment

[css-grid] specified value for (eg.) grid-template-columns expands repeat()

Reported by daniel.g...@gmail.com, Apr 27 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36

Steps to reproduce the problem:
1. write a short document with an element having specified 'grid-template-columns' property to 'repeat(2, [e] 40px)' through a style rule
2. query, through the CSS OM, the specified value for that property on that element
3. show the value

What is the expected behavior?
The value should be the specified value, exactly.

What went wrong?
The displayed value is `[e] 40px [e] 40px` ; that behaviour breaks CSS editor that want to preserve precisely what the CSS author specified.

Did this work before? N/A 

Chrome version: 57.0.2987.133  Channel: n/a
OS Version: OS X 10.12.4
Flash Version:
 
Status: Untriaged (was: Unconfirmed)
Here's a reduced testcase:

<!DOCTYPE html>
<body>
<script>
document.body.style.gridTemplateColumns = "repeat(2, [e] 40px)"
console.log(document.body.style.gridTemplateColumns);
</script>

It *should* log "repeat(2, [e] 40px)".

Instead, it logs "[e] 40px [e] 40px".

Comment 2 by rbyers@chromium.org, Apr 27 2017

Components: Blink>Layout>Grid

Comment 3 by r...@igalia.com, Apr 27 2017

Labels: -OS-Mac OS-All
I'm not sure if this is a bug or not.
The text from the spec (https://drafts.csswg.org/css-grid/#resolved-track-list):
> A contiguous run of two or more tracks that have the same size
> and associated line names may be serialized with the repeat() notation.

Note the *may* word, that's why we always thought this was something optional
but not required.
And the test for that in WPT (created by us) checks that any of those
with ore without repeat() are valid:
http://w3c-test.org/css/css-grid-1/grid-definition/grid-template-columns-rows-resolved-values-001.xht

Am I missing something?
Right, but that prose is about the resolved value, not the specified value...

Comment 5 by r...@igalia.com, Apr 27 2017

Cc: svil...@igalia.com jfernan...@igalia.com r...@igalia.com
Status: Available (was: Untriaged)
Oops, right I didn't check the example properly sorry.

Note that we've similar (or even worse) issues for the shorthands (see bug #511177)
but we're waiting for a reply from the CSS WG regarding them:
https://github.com/w3c/csswg-drafts/issues/1041

Project Member

Comment 6 by sheriffbot@chromium.org, Apr 30 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 7 by r...@igalia.com, Apr 30 2018

Status: Available (was: Untriaged)

Sign in to add a comment