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

Commit 9383cc5

Browse files
authored
Remove margin from body tag, increase Styleguidist font size (#509)
* 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
1 parent 36c86e7 commit 9383cc5

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

config/styleguide/config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,11 @@ module.exports = {
6868
styleguideComponents: {
6969
Wrapper: path.resolve(root, 'src/demos/ExampleWrapper'),
7070
},
71+
styles: {
72+
Sections: {
73+
root: {
74+
fontSize: '1.5rem',
75+
},
76+
},
77+
},
7178
};

src/components/AppContainer/AppContainer.styles.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ export const getClassNames = memoizeFunction((props: AppContainerClassNameProps)
2424
fontSize: '62.5%',
2525
boxSizing: 'border-box',
2626
},
27+
':global(html, body)': {
28+
margin: 0,
29+
padding: 0,
30+
},
2731
':global(*, *::before, *::after)': {
2832
boxSizing: 'inherit',
2933
},

src/components/AppContainer/__snapshots__/AppContainer.test.tsx.snap

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ exports[`<AppContainer /> with className matches its snapshot 1`] = `
1616
box-sizing: border-box;
1717
font-size: 62.5%;
1818
}
19+
html, body {
20+
margin-bottom: 0px;
21+
margin-left: 0px;
22+
margin-right: 0px;
23+
margin-top: 0px;
24+
padding-bottom: 0px;
25+
padding-left: 0px;
26+
padding-right: 0px;
27+
padding-top: 0px;
28+
}
1929
*, *::before, *::after {
2030
box-sizing: inherit;
2131
}
@@ -40,6 +50,16 @@ exports[`<AppContainer /> with default options matches its snapshot 1`] = `
4050
box-sizing: border-box;
4151
font-size: 62.5%;
4252
}
53+
html, body {
54+
margin-bottom: 0px;
55+
margin-left: 0px;
56+
margin-right: 0px;
57+
margin-top: 0px;
58+
padding-bottom: 0px;
59+
padding-left: 0px;
60+
padding-right: 0px;
61+
padding-top: 0px;
62+
}
4363
*, *::before, *::after {
4464
box-sizing: inherit;
4565
}

0 commit comments

Comments
 (0)