Thank you for your interest in contributing to Luxa CSS! This guide will help you get started quickly.
- Fork and clone the repository
- Install dependencies:
npm install - Make your changes in the
/cssdirectory - Build the framework:
npm run build - Submit a pull request
- Node.js 18 or higher
- npm, pnpm, or bun
# Install all dependencies (workspace setup)
npm installThis uses npm workspaces to install dependencies for both the framework and documentation site. Shared dependencies (like Next.js and React) are installed once at the root to avoid duplication.
luxacss/
├── css/ # Source CSS files (edit these)
│ ├── colors.css
│ ├── tokens.css
│ ├── typography.css
│ ├── spacing.css
│ ├── reset.css
│ ├── grid.css
│ ├── utilities.css
│ └── luxa.css # Main entry point
│
├── dist/ # Compiled output (auto-generated)
│ ├── compressed/ # Minified versions
│ ├── expanded/ # Expanded versions
│ └── individual/ # Individual module files
│
├── docs/ # Documentation website (Next.js)
├── scripts/ # Build and utility scripts (TypeScript)
│ ├── build.ts # Build script (framework + docs)
│ ├── build-framework.ts # Framework build script
│ ├── dev.ts # Development mode (watch + dev server)
│ └── lint.ts # Linting and formatting
├── postcss.config.js # PostCSS configuration
└── package.json
Always edit files in /css, never /dist.
The /dist directory is auto-generated from source files. When you make changes:
- Edit the appropriate file in
/css - Run
npm run buildto compile - The build script will update
/distautomatically
# Build once (framework + docs)
npm run buildThe build process:
- Resolves
@importstatements - Adds vendor prefixes
- Generates minified and expanded versions
- Creates individual module files
# Start development mode (watches CSS files and starts docs dev server)
npm run devThis automatically:
- Watches CSS files and rebuilds on changes
- Starts the documentation dev server with hot reload
- Visit
http://localhost:3000to see your changes in the documentation site
- Use standard CSS only (no PostCSS-specific syntax)
- Use CSS custom properties for values
- Follow the existing naming conventions
- Use kebab-case for class names
- Keep files focused and modular
- Use British English spelling where applicable (e.g., 'colour' in variable names)
- Colors:
css/colors.css - Design tokens:
css/tokens.css - Typography:
css/typography.css - Spacing:
css/spacing.css - Reset styles:
css/reset.css - Grid system:
css/grid.css - Utilities:
css/utilities.css
# Format and lint code
npm run lint- Ask first: For significant features, open a discussion first
- Target branch: Submit PRs to
main(ordevif it exists) - Build: Run
npm run buildand commit the/distchanges - Test: Verify your changes work (use
npm run devfor development) - Lint: Run
npm run lint
- Changes made in
/cssdirectory - Build completed successfully (
npm run build) - Code formatted (
npm run lint) - Documentation updated (if needed)
- Changes tested locally
Use clear, descriptive titles:
fix: correct grid column calculationfeat: add new utility classdocs: update installation guide
Use the issue tracker for:
- Bug reports and non-critical issues
- Documentation improvements
Not for:
- Personal support requests (use discussions)
- Feature requests (use discussions)
When reporting bugs, include:
- Clear description of the issue
- Steps to reproduce
- Expected vs actual behavior
- Browser/device information
- Screenshots (if applicable)
- Check existing discussions to avoid duplicates
- Open a new discussion in the "Ideas" category
- Describe the feature and use case
- Wait for feedback before implementing
The documentation site is in /docs. To contribute:
# Start development mode (watches CSS + docs dev server)
npm run dev
# Build for production (framework + docs)
npm run buildDocumentation files are in /docs/content (MDX format).
- Check the documentation
- Search existing issues
- Ask in discussions
- Edit
css/utilities.css - Add your utility class
- Use
npm run devto see changes automatically
- Edit
css/colors.css - Update OKLCH values
- Use
npm run devto see changes automatically
- Edit
css/grid.css - Make your changes
- Use
npm run devto see changes automatically
If you have questions about contributing:
- Open a discussion
- Check existing issues and PRs
- Review the codebase structure
Thank you for contributing to Luxa CSS!