Files
supabase/apps/design-system
Ivan Vasilov 070316cb87 chore: Migrate all scss files to css (#44268)
This pull request migrates all SCSS stylesheets in the `apps/studio` and
`apps/docs` projects to CSS, updates import paths accordingly, and
consolidates PostCSS configuration to use a shared config. The migration
includes renaming files, updating import statements, converting SCSS
comments to CSS comments, and removing redundant or legacy configuration
files. The changes improve maintainability and consistency across the
codebase.

**Migration from SCSS to CSS:**

* All SCSS stylesheets in `apps/studio/styles` and `apps/docs/styles`
have been renamed to `.css`, and their contents updated by converting
SCSS comments (`// ...`) to CSS comments (`/* ... */`). All relevant
import statements in the app entry points have been updated to reference
the new `.css` files.

**PostCSS configuration consolidation:**

* The separate `postcss.config.cjs` files in `apps/design-system`,
`apps/learn`, and `apps/studio` now all import from a shared
`config/postcss.config`, ensuring consistent PostCSS setup across
projects. The legacy `postcss.config.js` in `apps/studio` has been
removed.

**Code and style consistency improvements:**

* All instances of the SCSS-specific `#{!important}` in Tailwind
`@apply` rules have been replaced with the standard CSS `!important`
syntax.
* Minor fixes and comment updates were made throughout the stylesheets
to improve readability and maintainability, such as moving or clarifying
TODOs and notes.

These changes streamline the styling approach, reduce build complexity,
and make it easier to maintain and scale the design system and
documentation styles.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
  * Consolidated PostCSS configuration across apps
  * Migrated many stylesheet imports from SCSS to CSS
  * Standardized CSS comment and @apply syntax for consistency

* **Chores**
  * Removed SCSS (sass) dev dependency
  * Added autoprefixer and tailwindcss/nesting to PostCSS plugins
  * Removed SCSS module type declarations (cleaned up typings)
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-20 13:58:01 +02:00
..

Supabase Design System

Design resources for building consistent user experiences at Supabase.

Getting started

First, make a copy of .env.local.example and name it env.local. Then install any required packages and start the development server:

cd apps/design-system
pnpm i
pnpm dev:full

The dev:full command runs both the Next.js development server and Contentlayer concurrently, which is recommended for most development workflows.

Alternative commands

You can also run the development server and content watcher separately:

# Run only the Next.js development server
pnpm dev

# Run only the content watcher (in a separate terminal shell)
pnpm content:dev

Or run the development server from the root directory:

pnpm dev:design-system

To run both the development server and content watcher from the root directory, you can use:

# Run the development server
pnpm dev:design-system

# Run the content watcher (in a separate terminal shell)
pnpm --filter=design-system content:dev

Open http://localhost:3003 in your browser to see the result.

Watching for MDX changes

The dev:full command automatically watches for changes to MDX files with hot reload. If you're running the pnpm dev separately, you'll need to run pnpm content:dev in a separate terminal shell to watch for content changes.

Adding components

The design system references components rather than housing them. Thats an important distinction to make, as everything that follows here is about the documentation of components. You can add or edit components in one of these two places:

There are several parts of this design system that need to be manually updated after components have been added or removed (from documentation). These include:

  • config/docs.ts: list of components in the sidebar
  • content/docs: the actual component documentation
  • registry/examples.ts: list of example components
  • registry/fragments.ts: list of fragment components
  • registry/charts.ts: list of chart components
  • registry/default/example/*: the actual example components

You will need to rebuild the design systems registry after making new additions:

cd apps/design-system
pnpm build:registry