- From: Philip Walton <philip@philipwalton.com>
- Date: Sun, 8 Nov 2015 10:51:35 -0800
- To: www-style list <www-style@w3.org>
Received on Sunday, 8 November 2015 18:52:05 UTC
For example, if I have a gutter size and I want to use the positive version
in a child element margin and then negate that in the parent element's
negative margin, currently I'd do something like this:
```
.parent {
margin: -1em;
}
.child {
margin: 1em;
}
```
If I try doing the same thing with custom properties in Firefox is fails.
I'm assuming that's a bug, but I wanted to ask here to make sure.
```
.parent {
--gutter: 1em;
margin: -var(--gutter); /* declaration ignored in FF */
}
.child {
margin: var(--gutter);
}
```
To make this work in FF today you have to do `calc(-1*var(--gutter))`,
which isn't ideal.
Received on Sunday, 8 November 2015 18:52:05 UTC