Decathlon / vitamin-web

Decathlon Design System UI components for web applications
https://decathlon.github.io/vitamin-web
Apache License 2.0
282 stars 76 forks source link

fix(@vtmn/css-toggle): use gap instead of margin #1325

Closed romuleald closed 1 year ago

romuleald commented 1 year ago

Changes description

Minor change to use gap instead of margin

Context

Allow to use easily reflex reverse to flip the label and the input

Does this introduce a breaking change?

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

thibault-mahe commented 1 year ago

Hello @romuleald, thanks for the suggestion!

I understand that gap can be a more logical property than margin-inline-start, no disagreement on that point.

However, from what I understand, the component now has a gap of 0.5rem (rem(8px)) regardless of its size. The initial spacing in --small is also 0.5 ; on the other hand as you point out in your comment the spacing on --medium / by default is 0.75rem (rem(12px)).

Shouldn't we either propose a gap for each toggle size, or default it to rem(12px) and modify this gap for the small size ?

Thank you!

thibault-mahe commented 1 year ago

I reset this PR as a draft for housecleaning, feel free to resubmit it when it's ok for you, thanks!

lauthieb commented 1 year ago

Hello, I'm closing this Pull Request because there is no more activity for several weeks. Feel free to reopen it whenever you want to take up this topic. Thanks again for your contribution. :) Laurent