W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2020

Re: [csswg-drafts] [cssom] Define serialization of specified values with more detail (#5642)

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Wed, 21 Oct 2020 00:03:49 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-713208838-1603238628-sysbot+gh@w3.org>
Some common patterns:

 - Remove optional components when the default value was provided (according to the shortest serialization principle):

    ```js
    document.body.style.margin = "1px 1px 1px 1px";
    document.body.style.margin; // "1px" in Chromium, WebKit and Firefox
    ```
    ```js
    document.body.style.gridAutoFlow = "row dense";
    document.body.style.gridAutoFlow; // "dense" in Firefox (stays as "row dense" in Chromium and WebKit)
    ```

 - Add optional components that were omitted (against the shortest serialization principle):

    ```js
    document.body.style.counterIncrement = "c";
    document.body.style.counterIncrement; // "c 1" in Chromium, WebKit and Firefox
    ```
    ```js
   document.body.style.borderTop = "solid";
   document.body.style.borderTop; // "medium solid" in Firefox (stays as "solid" in Chromium and WebKit)
    ```

 - Normalize to canonical order

    ```js
   document.body.style.flexFlow = "wrap column";
   document.body.style.flexFlow; // "column wrap" in Chromium, WebKit and Firefox
    ```

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5642#issuecomment-713208838 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 21 October 2020 00:03:51 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:20 UTC