Bug 2015413 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

CSS variables / custom properties can be referenced in the `style()` property of a `@container` query (see https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Containment/Container_size_and_style_queries#container_style_queries)
We can probably show the same tooltip that we have in property values
Note that we should make sure that the value we show is the one for the element the parent selector applies to, not the currently selected element.
For example, in :

```css
<meta charset="utf8" />
<style>
  :root {
    --theme: red;
  }

  h1 {
    --theme: blue;
  }

  @container style(--theme: red) {
    h1 {
      color: var(--theme);  
    }
  }
</style>
<h1>Hello</h1>
```

in `@container style(--theme: red)` the tooltip should (obviously) indicate `red`, which is the value on the parent of h1 (and actually the root element), whereas in the `color: var(--theme)`, the tooltip will say `blue`
CSS variables / custom properties can be referenced in the `style()` property of a `@container` query (see https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Containment/Container_size_and_style_queries#container_style_queries)
We can probably show the same tooltip that we have in property values
Note that we should make sure that the value we show is the one for the element the parent selector applies to, not the currently selected element.
For example, in :

```html
<meta charset="utf8" />
<style>
  :root {
    --theme: red;
  }

  h1 {
    --theme: blue;
  }

  @container style(--theme: red) {
    h1 {
      color: var(--theme);  
    }
  }
</style>
<h1>Hello</h1>
```

in `@container style(--theme: red)` the tooltip should (obviously) indicate `red`, which is the value on the parent of h1 (and actually the root element), whereas in the `color: var(--theme)`, the tooltip will say `blue`

Back to Bug 2015413 Comment 0