Skip to content

Commit

Permalink
Pass body styles to scoped element
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnblk committed Mar 12, 2019
1 parent f91b231 commit 3302ab3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/typography/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ export const typography = props => {
const el = elements[key]
const rules = typographyStyles({ theme, ...el })
// flatten & merge??
if (scoped && key === 'body') {
styles['&'] = [ el, ...rules ]
continue
}
const selector = scoped ? getScopedSelector(key) : key
styles[selector] = [ el, ...rules ]
}
Expand Down

0 comments on commit 3302ab3

Please sign in to comment.