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

Code refactor for spacing classes! #10625

Merged
merged 10 commits into from
Sep 11, 2017
Merged

Code refactor for spacing classes! #10625

merged 10 commits into from
Sep 11, 2017

Conversation

IamManchanda
Copy link
Contributor

This excludes #10568

Just implemented DRY coding a little bit!

@each $prop in (margin, padding) {
// All Sides
.#{$prop}-#{$spacer} {
@if ($prop == margin) { @include margin($spacer, $spacer, $spacer, $spacer); }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the loops, but lets have the @include on its own line, so more like

@if ($prop == margin) {
  @include margin($spacer, $spacer, $spacer, $spacer);
} @else if ($prop == padding) {
  @include padding($spacer, $spacer, $spacer, $spacer);
}

@IamManchanda
Copy link
Contributor Author

done @kball Indentation and also some more cool refactor

Also,

This removes the dirt of

margin-top: 1rem;
margin-right: 1rem;
margin-bottom: 1rem;
margin-left: 1rem;

@IamManchanda
Copy link
Contributor Author

@kball As discussed, I have removed the map for now, as we would have to then migrate it!

I am closing that above linked PR and will push a new for same (6.5) after this PR merges!

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

Successfully merging this pull request may close these issues.

2 participants