- From: Carlos Lopez via GitHub <sysbot+gh@w3.org>
 - Date: Fri, 28 Oct 2022 16:49:06 +0000
 - To: public-css-archive@w3.org
 
Working well on Chrome v109 (Canary):
https://user-images.githubusercontent.com/9271155/198690200-144c1202-b528-4132-b324-bf70cad621c8.mp4
JS:
```js
static supportsCSSLineHeightUnit = CSS.supports('height', '1lh');
function resize() {
  if (!TextArea.supportsCSSLineHeightUnit) {
    const { lineHeight } = window.getComputedStyle(textarea);
    this._lineHeight = lineHeight; // Calls style.setProperty('--line-height', newValue);
  }
  /* ... */
````
CSS:
````css
:host {
  --line-height: var(--mdw-typescale__body-large__line-height);
}
@supports({width: 1lh}) {
  --line-height: 1lh;
}
```
Very happy to remove the `window.getComputedStyle` calls.
-- 
GitHub Notification of comment by clshortfuse
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7542#issuecomment-1295227946 using your GitHub account
-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 28 October 2022 16:49:08 UTC