Bug 229816 - Serialization of CSS custom property value is incorrect for a custom string
Summary: Serialization of CSS custom property value is incorrect for a custom string
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 14
Hardware: Unspecified macOS 10.15
: P2 Minor
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-09-02 10:55 PDT by kj.kim
Modified: 2021-09-13 10:50 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kj.kim 2021-09-02 10:55:48 PDT
Steps to reproduce the problem:
1. set CSS custom property with a custom string that is surrounded by single quotes, e.g., "--logo-path: '/20210629/asset/logo.svg';"
2. fetch the value via JS, e.g., getComputedStyle(document.body).getPropertyValue("--logo-path");

What is the expected behavior?
returned value is '/20210629/asset/logo.svg'.

What went wrong?
returned value is "/20210629/asset/logo.svg".

Repro: https://codepen.io/kj-kim-sfdc/pen/zYzBNyg

Spec clarification: https://github.com/w3c/csswg-drafts/issues/6572#issuecomment-911910455
Comment 1 Kevin Neal 2021-09-09 10:07:33 PDT
Thank you for your filing. The appropriate engineers have been notified.
Comment 2 Radar WebKit Bug Importer 2021-09-09 10:07:49 PDT
<rdar://problem/82930930>