Re: [csswg-drafts] [css-values] enable the use of counter() inside calc() (#1026)

@LeaVerou 
> Could you elaborate a bit on this? `n` cannot be used in `calc()`, and it's unclear ....

Yeah I know this isn't possible. I find this discussion when I was playing with CSS: https://codepen.io/shahriarkh/pen/rNGwQMQ
I wanted to place some bars inside the circle like this: 
<img src="https://user-images.githubusercontent.com/31452340/146781743-49a59a88-4137-4e47-8c0e-7d1e98b992b5.png" alt="drawing" width="200px" />
Declaring rotation for every bar isn't a good idea, so I wondered it will be useful if we had something like this:
```css
.bar:nth-of-type(n) {  
    transform: rotate(calc(n * 36deg))
}
```


-- 
GitHub Notification of comment by ShahriarKh
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1026#issuecomment-997973835 using your GitHub account


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

Received on Monday, 20 December 2021 14:28:38 UTC