- From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
- Date: Tue, 21 May 2024 23:28:41 +0000
- To: public-css-archive@w3.org
How does the indexing work if you have both the shorthand and its longhands? For example:
```js
var {style} = document.createElement("div");
style.cssText = "white-space: pre";
[...style]; // Presumably [ "white-space", "white-space-collapse", "text-wrap-mode", "text-wrap-style" ] ?
s.removeProperty("text-wrap-style");
[...style]; // Maybe [ "white-space-collapse", "text-wrap-mode" ] ???
// Or [ "white-space", "white-space-collapse", "text-wrap-mode" ] ???
s.removeProperty("white-space-collapse");
s.removeProperty("text-wrap-mode");
[...style]; // Hopefully not [ "white-space" ] ??????
```
It seems this would need extra logic in `setProperty` and `removeProperty` to automatically insert or remove a shorthand if necessary (maybe when all longhands are present, or when any longhand is present). Need to ensure this doesn't cause perf regressions.
--
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8398#issuecomment-2123589523 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 21 May 2024 23:28:42 UTC