Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
zamadatix
5 months ago
|
parent
|
context
|
favorite
| on:
The "most hated" CSS feature: cos() and sin()
Inlining isn't necessarily a requirement for how it's used here. E.g. you could put something like:
.container:nth-child(1) {--i: 1} .container:nth-child(2) {--i: 2} ...
In your CSS. Still not all that ideal given you need to ensure you have enough entries for all the entries you might have... but at least a more dynamic and self-contained option until the `sibling-index()` feature they mention roles out.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: