Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistency on component paddings and margins #23674

Closed
andresgalante opened this issue Aug 25, 2017 · 2 comments
Closed

Consistency on component paddings and margins #23674

andresgalante opened this issue Aug 25, 2017 · 2 comments
Labels

Comments

@andresgalante
Copy link
Collaborator

andresgalante commented Aug 25, 2017

On _varibles.scss there are several definitions of margins and paddings, and although the numbers are consistant, it is really hard to change one and keep consistency across all components.

I want to suggest that we introduce a set of component spacer variables with different sizes that will rule all components paddings and margins. That way by changing the variables in one place we'd have full control of all components and keep them consistant.

For example we have now:

$input-btn-padding-y:       .5rem !default;
$pagination-padding-y:      .5rem !default;

And I want to change it to:

$component-spacer-xs:   .5rem !default;

$input-btn-padding-y:    $component-spacer-xs !default;
$pagination-padding-y:   $component-spacer-xs !default;

We can even use the same $spacer mapping to generate them so utility classes follow the same meassurements we use on components.

You can read more about it here:
https://medium.com/eightshapes-llc/space-in-design-systems-188bcbae0d62

This is a large change that requieres a lot of testing, if you guys are ok with it, I can send a PR to see how it looks,

What do you think?

@XhmikosR
Copy link
Member

/CC @mdo

@mdo
Copy link
Member

mdo commented Oct 2, 2017

This feels like an unnecessary abstraction right now. The example here at least doesn't seem to buy us more, and adds one more layer to the input-button variables. Passing for now I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants