W3C home > Mailing lists > Public > www-style@w3.org > May 2015

[css-grid] Grid shortands computed value and CSSOM serialization

From: Manuel Rego Casasnovas <rego@igalia.com>
Date: Fri, 08 May 2015 16:22:47 +0200
Message-ID: <554CC6B7.2060400@igalia.com>
To: www-style@w3.org

I've a doubt regarding how computed value and CSSOM serialization of
grid shorthands should work.

Let's use the grid-template shorthand as example. Imagine that you've
the following JS (A):
  grid.style.gridTemplate = "100px / 50px";
  console.log("style: " + grid.style.gridTemplate);
  console.log("computedStyle: " + getComputedStyle(grid).gridTemplate);

What should be the output?
  style: 100px / 50px
  computedStyle: 100px / 50px

And in other cases:
  B) JS:
       grid.style.gridTemplate = '"a b" "a b"';
       style: "a b" "a b"
       computedStyle: "a b" "a b"
  C) JS:
       grid.style.gridTemplate = 100px / "a b" 50px;
       style: 100px / "a b" 50px
       computedStyle: 100px / "a b" 50px

And the last example for a different property like grid-row:
  D) JS:
       gridItem.style.gridRow = "2";
       style: 2 / auto
       computedStyle: 2 / auto

I'm asking this because of I'm writing a test for the W3C suite and this
is showing different values in Chromium.

Thank you very much,
Received on Friday, 8 May 2015 14:23:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:54 UTC