A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/w3c/csswg-drafts/issues/3261 below:

[css-grid] How to serialize the strings in grid-template-areas? · Issue #3261 · w3c/csswg-drafts · GitHub

'grid-template-areas' takes several strings as its value, each representing one row of the grid. These strings are then parsed into area labels.

We're basically using strings here as a convenient way to delimit the rows. They're not strings in the traditional sense, where their value contains uninterpreted text; instead, they're just a funny way of writing an ident sequence. Several implementations thus just store the property's value as a sequence of area labels, and regenerate the string on demand when needed for serialization purposes.

This means that, in Chrome/WebKit/Edge, a declaration like grid-template-areas: " a \9 b "; is serialized in computed values as just "a b", the simplest string that has the same effect. Only Firefox preserves the precise string, serializing as " a \9 b ". Testcase

Firefox is technically correct here, in that strings are preserved and serialized exactly as entered in every other case. But I don't think the other browsers are necessarily wrong here; these aren't traditional strings, and it's reasonable to "forget" what the original string was in favor of just preserving the meaning. Currently the tests for this feature are written with the assumption of simplification; here's a Moz bug about the failure and a Chrome bug they opened pointing out this violates CSSOM's serialization rules.

Should we declare one way or the other correct? Or allow them both?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3