- From: Daniel Holbert via GitHub <sysbot+gh@w3.org>
- Date: Fri, 08 Dec 2023 00:59:48 +0000
- To: public-css-archive@w3.org
To make this concrete, here's a testcase: https://bug1867106.bmoattachments.org/attachment.cgi?id=9365919 The relevant style rule there is `@page { size: 3px }`, and if you view the output in web console, the last bit of logged output tries to get the value by logging this expression: ``` document.styleSheets[0].rules[3].style.size ``` In Firefox, this reports `undefined` for reasons that Emily discussed above, which we think is correct, since `.size` isn't available on the interface. But Chromium/WebKit have it there anyway, and they log `3px`. In Firefox, the following longer version with `getPropertyValue` does get the value as-expected: ``` document.styleSheets[0].rules[3].style.getPropertyValue("size") ``` so I think that's what web developers are currently supposed to do, but the fact that `.size` works in other browsers (and feels less-clumsy) makes it tempting to make that officially work for this situation. -- GitHub Notification of comment by dholbert Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9685#issuecomment-1846337382 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 8 December 2023 00:59:51 UTC