@strato-css/core
v1.1.0
Published
Core engine for Strato CSS framework
Downloads
16
Readme
@strato-css/core
Core engine for Strato CSS framework. This package provides the CSS generation engine, rule system, theme system, and variant system.
Installation
pnpm add @strato-css/coreUsage
import { createGenerator } from '@strato-css/core';
const generator = createGenerator({
theme: {
colors: {
primary: '#3b82f6'
}
}
});
const result = await generator.generate('text-primary bg-white');
console.log(result.css);Features
- CSS Generation Engine: Fast and efficient CSS generation
- Rule System: Define custom utility rules with regex patterns
- Theme System: Configurable design tokens (colors, spacing, typography)
- Variant System: Responsive, dark mode, and state variants
- Shortcuts: Combine multiple utilities into semantic classes
Development
Testing
# Run all tests
pnpm test
# Run tests in watch mode
pnpm test --watch
# Run tests with UI
pnpm test:ui
# Run tests with coverage
pnpm test --coverage
# Run specific test file
pnpm test generator.test.tsBuild
# Build the package
pnpm build
# Build in watch mode
pnpm devType Checking
# Run TypeScript type checking
pnpm typecheckLinting & Formatting
# Lint TypeScript files
pnpm lint
# Format code
pnpm formatTest Coverage
| Category | Coverage | Status | |----------|----------|--------| | Unit Tests | ~85% | ✅ | | Integration Tests | ~90% | ✅ | | Snapshot Tests | 100% | ✅ | | Overall | ~85% | ✅ |
License
MIT
