Skip to content

Commit

Permalink
fix(button): make margin reset less browser specific
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan committed Jan 28, 2020
1 parent d1c0061 commit b0fdec3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
9 changes: 0 additions & 9 deletions packages/components/src/components/button/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,6 @@
}
}

// Safari only fix to remove added margins on buttons (see #5155)
@media not all and (min-resolution: 0.001dpcm) {
@supports (-webkit-appearance: none) {
.#{$prefix}--btn {
margin: 0;
}
}
}

// Reset intrisic padding in Firefox (see #731)
.#{$prefix}--btn::-moz-focus-inner {
padding: 0;
Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/components/button/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
outline: none;
position: relative;
max-width: rem(320px);
// Fix to remove added margins on buttons in safari (see #5155)
margin: 0;

&:disabled,
&.#{$prefix}--btn--disabled {
Expand Down
10 changes: 3 additions & 7 deletions packages/components/src/globals/scss/_css--reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,9 @@
box-sizing: border-box;
}

// Safari only fix to remove added margins on buttons (see #5155)
@media not all and (min-resolution: 0.001dpcm) {
@supports (-webkit-appearance: none) {
button {
margin: 0;
}
}
// Fix to remove added margins on buttons in safari (see #5155)
button {
margin: 0;
}

@include carbon--type-reset;
Expand Down

0 comments on commit b0fdec3

Please sign in to comment.