Re: [css-houdini-drafts] [css-properties-values-api][css-paint-api] Feature proposal: Value Transform worklets (#1088)

## Additional use cases

### Importing / sharing JS values with CSS

```js
import { breakpoints } from './media.js'

registerValue('media', class {
  static get inputArguments() { return ['small | medium | large']; }
  static get output() { return ['<length>']; }

  value(_ctx, _size, _props, args) {
    return CSS.px(breakpoints[args[0].value])
  }
})
```
```css
@media (min-width: use(media, 'large')) {
  // ...
}
```



-- 
GitHub Notification of comment by matthew-dean
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/1088#issuecomment-1483913558 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 25 March 2023 20:18:30 UTC