Skip to content

Global styles component #62

Closed
Closed
@itsdouges

Description

API

We will standardize on the @emotion/react API:

import { Global } from '@compiled/react';

<Global 
  styles={{
    h1: { fontSize: 30 }
  }}
/>

Assumptions

  • Dynamic declarations can't work with global styles
  • Global styles will be extracted to an external stylesheet

Outstanding questions

  • Do we force @font-face declarations to go through this component? Currently they can't be defined anywhere because it will blow up in prod mode
  • How can we conditionally set global styles when they have been extracted to an external stylesheet? If there is no good story for this we may need to just not support this when baked as well.

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions