Skip to content

Commit

Permalink
Remove unnecessary margin-top and margin-bottom from center-block mixin.
Browse files Browse the repository at this point in the history
Setting top and bottom margins is not necessary to center the element, and it can potentially override the margins set by another rule.
  • Loading branch information
iandunn committed Jan 11, 2015
1 parent 6b2e7c8 commit 3d6bd4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sass/mixins/_mixins-master.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
// Center block
@mixin center-block {
display: block;
margin: 0 auto;
margin-left: auto;
margin-right: auto;
}

// Clearfix
Expand Down
3 changes: 2 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,8 @@ a:active {
.aligncenter {
clear: both;
display: block;
margin: 0 auto;
margin-left: auto;
margin-right: auto;
}

/*--------------------------------------------------------------
Expand Down

0 comments on commit 3d6bd4d

Please sign in to comment.