Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Remove margin from body tag, increase Styleguidist font size (#509)
Browse files Browse the repository at this point in the history
* Set 0 margin/padding on html/body

* Increase font size for Styleguidist content now that our base styles are not global

* Move html/body margin reset to AppContainer component
  • Loading branch information
swese44 committed Aug 22, 2018
1 parent 36c86e7 commit 9383cc5
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/styleguide/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,11 @@ module.exports = {
styleguideComponents: {
Wrapper: path.resolve(root, 'src/demos/ExampleWrapper'),
},
styles: {
Sections: {
root: {
fontSize: '1.5rem',
},
},
},
};
4 changes: 4 additions & 0 deletions src/components/AppContainer/AppContainer.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export const getClassNames = memoizeFunction((props: AppContainerClassNameProps)
fontSize: '62.5%',
boxSizing: 'border-box',
},
':global(html, body)': {
margin: 0,
padding: 0,
},
':global(*, *::before, *::after)': {
boxSizing: 'inherit',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ exports[`<AppContainer /> with className matches its snapshot 1`] = `
box-sizing: border-box;
font-size: 62.5%;
}
html, body {
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
padding-bottom: 0px;
padding-left: 0px;
padding-right: 0px;
padding-top: 0px;
}
*, *::before, *::after {
box-sizing: inherit;
}
Expand All @@ -40,6 +50,16 @@ exports[`<AppContainer /> with default options matches its snapshot 1`] = `
box-sizing: border-box;
font-size: 62.5%;
}
html, body {
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
padding-bottom: 0px;
padding-left: 0px;
padding-right: 0px;
padding-top: 0px;
}
*, *::before, *::after {
box-sizing: inherit;
}
Expand Down

0 comments on commit 9383cc5

Please sign in to comment.