Skip to content

Commit

Permalink
Move remaining body styles to bodyStyles
Browse files Browse the repository at this point in the history
This isn't a complete fix for #54, but it is a step forward, as it allows users to safely do:

```js
import { createGlobalStyle } from 'styled-components';
import { global } from '@storybook/design-system';

const CustomGlobalStyle = createGlobalStyle`
   body {
     ${global.bodyStyles}
   }
}`
```

In their own code to avoid the `@import`.
  • Loading branch information
tmeasday authored Sep 11, 2019
1 parent 4f589d4 commit a4b4dce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/shared/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ export const bodyStyles = css`
font-size: ${typography.size.s3}px;
color: ${color.darkest};
margin: 0;
overflow-y: auto;
overflow-x: hidden;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
Expand Down Expand Up @@ -116,9 +120,5 @@ export const GlobalStyle = createGlobalStyle`
body {
${bodyStyles}
margin: 0;
overflow-y: auto;
overflow-x: hidden;
}
`;

0 comments on commit a4b4dce

Please sign in to comment.