-
Heyo 👋 Big new fan of open-props 🥇. I was going through the repository and documentation site and wanted to ask if there was any rationale for the approach to naming the negative custom properties.
We have been building something similar for our Design System and we have been avoiding negative values in our custom properties and encouraging folks to:
I am not a fan of all the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
i agree, not a fan of the calc function when i need a negative value.. but it does work great. i went with the 0 convention cuz i couldnt do negative 1 lol, like the rationale is, use vars with 0's with intention. they're "odd" in the list because they should be pretty rare in the code. i'd have left them out, but there's some very common ones that seems to travel amongst projects, even if we dont want them to. so i left them in, but put them behind a "hopefully" consistent convention that forced the user to be aware of the choice. like, all vars with 0s may come with side effects or baggage. that was the thought, but maybe it wont pan out. thanks for sharing your thoughts here! |
Beta Was this translation helpful? Give feedback.
i agree, not a fan of the calc function when i need a negative value.. but it does work great.
i went with the 0 convention cuz i couldnt do negative 1 lol, like
var(--size--1)
, that's just dorky. and sometimes they're not negative, like withvar(--font-lineheight-0)
.the rationale is, use vars with 0's with intention. they're "odd" in the list because they should be pretty rare in the code. i'd have left them out, but there's some very common ones that seems to travel amongst projects, even if we dont want them to. so i left them in, but put them behind a "hopefully" consistent convention that forced the user to be aware of the choice. like, all vars with 0s may come with side effects or…