Bug 167699 - Serialization of custom props in longhand should be "" not value of shorthand
Summary: Serialization of custom props in longhand should be "" not value of shorthand
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 10
Hardware: Unspecified All
: P2 Normal
Assignee: Dean Jackson
URL: https://jsfiddle.net/ok8uwunf/
Keywords: FromImplementor, InRadar
Depends on:
Blocks:
 
Reported: 2017-02-01 11:00 PST by Greg Whitworth
Modified: 2017-03-24 16:18 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.84 KB, patch)
2017-03-24 16:00 PDT, Dean Jackson
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Whitworth 2017-02-01 11:00:37 PST
Example URL:
https://jsfiddle.net/ok8uwunf/

Steps to reproduce the problem:
1. Open https://jsfiddle.net/ok8uwunf/
2. Look at value displayed in target element

What is the expected behavior?
================================
The value should be "" since the variable substitution hasn't occurred

What went wrong?
================================
It seems that Blink doesn't follow this line of the spec:

"Pending-substitution values must be serialized as the empty string, if an API allows them to be observed."

Since we are looking at specified style, this needs to be an empty string.

Firefox: no repro
Edge: no repro
Blink: Repro
Comment 1 Radar WebKit Bug Importer 2017-02-02 00:13:58 PST
<rdar://problem/30324200>
Comment 2 Dean Jackson 2017-03-24 16:00:38 PDT
Created attachment 305329 [details]
Patch
Comment 3 Sam Weinig 2017-03-24 16:04:10 PDT
Comment on attachment 305329 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=305329&action=review

> LayoutTests/fast/css/variables/rule-property-get.html:9
> +/* https://www.w3.org/TR/css-variables/#variables-in-shorthands
> +   "Pending-substitution values must be serialized as the empty string, if an API allows them to be observed." */

I think this comment could use some context, explaining what the test is testing.
Comment 4 Dean Jackson 2017-03-24 16:18:26 PDT
Committed r214383: <http://trac.webkit.org/changeset/214383>