Skip to content

[COMP, CLI] Add CSS breakpoints to component library config; auto-generate variables #465

@andrewrubin

Description

@andrewrubin

The problem

Next.js, in their switch to Turbopack with version 16, have decided to drop support for the ICSS :export directive (reference).

This affects our use-breakpoints hook, and essentially forces us to define the base breakpoint settings there, which is not ideal due to us then having to manage two sources of truth for our breakpoint list.

Proposed solution

  1. Add a breakpoints object to the component-library config JSON.
  2. Generate the Sass and JavaScript variables based on that, as a single source of truth.

Any updates to this config would simply require the developer to re-initialize the component library as normal.

Metadata

Metadata

Assignees

Labels

CLITickets related to wethegit-components-cliCOMPTickets related to wethegit-components

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions