Skip to content

Prototyping responsiveness with Primer React is impossible due to the lack of docs and/or presets #5998

Open
@maximedegreve

Description

@maximedegreve

Description

All the docs below talk about the sx prop however internally we have communicated to avoid this:

This leaves us with CSS modules but those don't support breakpoint vars out the box. On dotcom and storybook we have solved this by introducing a postcss-preset however this is not documented and exported and therefore can't be used. This makes the adoption of responsiveness in Primer prototypes almost impossible as it requires a lot of reading and fiddling to mimic this functionality:

Steps to reproduce

  1. Create a React app (with Vite)
  2. Follow the instructions in the getting started docs
  3. Try to make anything responsiveness using @media vars.

Perhaps we could do some user testing too to see how easy it is for someone internally to adopt Primer outside dotcom.

Version

All

Browser

No response

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions