Skip to content

Commit

Permalink
fix(components): remove default margin on Buttons
Browse files Browse the repository at this point in the history
Safari adds a 2px default margin to buttons.

beta
  • Loading branch information
connor-baer committed Jul 29, 2020
1 parent 33696bd commit b48f3ec
Show file tree
Hide file tree
Showing 15 changed files with 95 additions and 0 deletions.
56 changes: 56 additions & 0 deletions src/__snapshots__/storyshots.spec.js.snap

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const baseStyles = ({ theme }: StyleProps) => css`
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
${textMega({ theme })};
text-align: center;
Expand Down
8 changes: 8 additions & 0 deletions src/components/Button/__snapshots__/Button.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ exports[`Button styles should render a button with icon 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -105,6 +106,7 @@ exports[`Button styles should render a disabled button 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -173,6 +175,7 @@ exports[`Button styles should render a kilo button 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -240,6 +243,7 @@ exports[`Button styles should render a mega button 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -307,6 +311,7 @@ exports[`Button styles should render a primary button by default 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -374,6 +379,7 @@ exports[`Button styles should render a secondary button 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -441,6 +447,7 @@ exports[`Button styles should render a stretched button 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -509,6 +516,7 @@ exports[`Button styles should render a tertiary button 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ exports[`ButtonGroup Center aligment should render with center alignment styles
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -75,6 +76,7 @@ exports[`ButtonGroup Center aligment should render with center alignment styles
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -199,6 +201,7 @@ exports[`ButtonGroup Left aligment should render with left alignment styles 1`]
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -258,6 +261,7 @@ exports[`ButtonGroup Left aligment should render with left alignment styles 1`]
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -430,6 +434,7 @@ exports[`ButtonGroup should render with default styles 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -489,6 +494,7 @@ exports[`ButtonGroup should render with default styles 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down
4 changes: 4 additions & 0 deletions src/components/Carousel/__snapshots__/Carousel.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ exports[`Carousel styles should render with children as a function 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -909,6 +910,7 @@ exports[`Carousel styles should render with children as a node 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -1448,6 +1450,7 @@ exports[`Carousel styles should render with default paused styles 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -2044,6 +2047,7 @@ exports[`Carousel styles should render with default styles 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ exports[`Buttons styles should render with default styles 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ exports[`CloseButton should render with default styles 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ exports[`Hamburger should render with active styles when passed the isActive pro
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -191,6 +192,7 @@ exports[`Hamburger should render with default styles 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ exports[`IconButton should render with the default styles 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ exports[`LoadingButton styles should render with default styles 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -185,6 +186,7 @@ exports[`LoadingButton styles should render with loading styles 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ exports[`Pagination with 2 to 5 pages should render with default styles 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -120,6 +121,7 @@ exports[`Pagination with 2 to 5 pages should render with default styles 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -179,6 +181,7 @@ exports[`Pagination with 2 to 5 pages should render with default styles 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -236,6 +239,7 @@ exports[`Pagination with 2 to 5 pages should render with default styles 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -432,6 +436,7 @@ exports[`Pagination with more than 5 pages should render with default styles 1`]
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -507,6 +512,7 @@ exports[`Pagination with more than 5 pages should render with default styles 1`]
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ exports[`PageList styles should render with default styles 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -87,6 +88,7 @@ exports[`PageList styles should render with default styles 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down
2 changes: 2 additions & 0 deletions src/components/Sidebar/__snapshots__/Sidebar.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ HTMLCollection [
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -264,6 +265,7 @@ HTMLCollection [
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ exports[`CloseButton styles should render and match snapshot when not visible 1`
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down Expand Up @@ -147,6 +148,7 @@ exports[`CloseButton styles should render and match snapshot when visible 1`] =
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down
1 change: 1 addition & 0 deletions src/components/Tag/__snapshots__/Tag.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ exports[`Tag when is selected should change the close icon color 1`] = `
justify-content: center;
width: auto;
height: auto;
margin: 0;
cursor: pointer;
font-size: 16px;
line-height: 24px;
Expand Down

0 comments on commit b48f3ec

Please sign in to comment.