snaha-net / diete.design

https://diete.design
MIT License
0 stars 0 forks source link

Paddings and sizing should use variables #292

Closed agazso closed 2 months ago

agazso commented 2 months ago

Similarly to #289 many components use paddings internally but they are defined as individual values instead of using variables from diete.css. For example the Input component have many definitions of paddings setting to values like 0.75rem. This does not change automatically when the values are changed in diete.css. Ideally all paddings, margins, top, left, right, bottom variables should be calculated as a multiplier of var(--padding).

For example the padding in input is 0.75rem. Since the default padding in diete.css is defined as 1rem, this could be rewritten as calc(0.75 * var(--padding)). To simplify things we could create variables for the most used values, such as