Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion packages/docs/content/docs/llm-resources.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,18 @@ Steps to install or integrate StyleX across Vite, Next.js, Webpack, Rspack, and

<LLMInstallationFile />


## Style authoring guide

Context on defining and using styles, StyleX APIs, and common antipatterns.

<LLMStylingFile />

## Migration guides

Guides for LLM agents to migrate codebases from existing styling systems to
StyleX while preserving behavior and clearly reporting anything that cannot be
converted.

### CSS Modules → StyleX

<LLMMigrationFile />
11 changes: 11 additions & 0 deletions packages/docs/src/components/mdx/LLMFiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,14 @@ export function LLMStylingFile() {
/>
);
}

export function LLMMigrationFile() {
const content = getFileContent('stylex-migration-css-modules.md');
return (
<ScrollableCodeBlock
content={content}
maxHeight={400}
title="stylex-migration-css-modules.md"
/>
);
}
7 changes: 6 additions & 1 deletion packages/docs/src/components/mdx/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ import {
import { Li, Ol, P, Ul } from './core';
import Image from './Image';
import { CodeBlock, Pre } from './CodeBlock';
import { LLMInstallationFile, LLMStylingFile } from './LLMFiles';
import {
LLMInstallationFile,
LLMMigrationFile,
LLMStylingFile,
} from './LLMFiles';
import { preMarker } from './mdx.stylex';
import { vars } from '@/theming/vars.stylex';

Expand Down Expand Up @@ -92,6 +96,7 @@ export const mdxComponents = {
),
CodeBlock,
LLMInstallationFile,
LLMMigrationFile,
LLMStylingFile,
};

Expand Down
Loading
Loading