Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
28e7a22
feat: use the new pug babel plugn and eslint plugin from 'react-pug' …
cray0000 Mar 24, 2026
c5edcd0
chore: add commands to publish alpha version
cray0000 Mar 25, 2026
a57f604
chore: force publish for alpha minor
cray0000 Mar 25, 2026
f8b469f
v0.3.0-alpha.0
cray0000 Mar 25, 2026
cdd8f00
chore: use the actual cssxjs eslint plugin from monorepo
cray0000 Mar 25, 2026
6317ee3
perf: update babel pug plugin to short-circuit processing of files wh…
cray0000 Mar 25, 2026
54f5990
v0.3.0-alpha.1
cray0000 Mar 25, 2026
eb62d55
fix(eslint-plugin-cssxjs): update react-pug eslint plugin
cray0000 Mar 29, 2026
167ac39
v0.3.0-alpha.2
cray0000 Mar 29, 2026
0e2c261
chore: update eslint plugin
cray0000 Apr 3, 2026
5340776
v0.3.0-alpha.3
cray0000 Apr 3, 2026
1afc458
chore: upgrade react-pug babel and eslint
cray0000 Apr 6, 2026
082a03e
v0.3.0-alpha.4
cray0000 Apr 6, 2026
20196bb
chore: update react-pug eslint
cray0000 Apr 9, 2026
7e6c9cd
v0.3.0-alpha.5
cray0000 Apr 9, 2026
6448df4
chore: update react-pug to fix a bug with expressions in attributes
cray0000 Apr 12, 2026
45c938f
v0.3.0-alpha.6
cray0000 Apr 12, 2026
726d007
chore: update react-pug deps for better support of multi-line JS/TS i…
cray0000 Apr 16, 2026
b6ee43c
v0.3.0-alpha.7
cray0000 Apr 16, 2026
a6ae399
chore: update eslint plugin
cray0000 Apr 19, 2026
331302e
v0.3.0-alpha.8
cray0000 Apr 19, 2026
717efac
fix(cssxjs): add typings for using styl and css as functions
cray0000 Apr 20, 2026
c92e287
v0.3.0-alpha.9
cray0000 Apr 20, 2026
e8c6f36
feat(cssxjs): add pug typecheck command
cray0000 May 2, 2026
402913c
feat(cssxjs): expose check helper
cray0000 May 3, 2026
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
92 changes: 92 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,98 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.3.0-alpha.9](https://github.com/startupjs/cssx/compare/v0.3.0-alpha.8...v0.3.0-alpha.9) (2026-04-20)


### Bug Fixes

* **cssxjs:** add typings for using styl and css as functions ([717efac](https://github.com/startupjs/cssx/commit/717efacd6391fdd9e38abd4fb783a945e6a52309))





# [0.3.0-alpha.8](https://github.com/startupjs/cssx/compare/v0.3.0-alpha.7...v0.3.0-alpha.8) (2026-04-19)

**Note:** Version bump only for package cssx





# [0.3.0-alpha.7](https://github.com/startupjs/cssx/compare/v0.3.0-alpha.6...v0.3.0-alpha.7) (2026-04-16)

**Note:** Version bump only for package cssx





# [0.3.0-alpha.6](https://github.com/startupjs/cssx/compare/v0.3.0-alpha.5...v0.3.0-alpha.6) (2026-04-12)

**Note:** Version bump only for package cssx





# [0.3.0-alpha.5](https://github.com/startupjs/cssx/compare/v0.3.0-alpha.4...v0.3.0-alpha.5) (2026-04-09)

**Note:** Version bump only for package cssx





# [0.3.0-alpha.4](https://github.com/startupjs/cssx/compare/v0.3.0-alpha.3...v0.3.0-alpha.4) (2026-04-06)

**Note:** Version bump only for package cssx





# [0.3.0-alpha.3](https://github.com/startupjs/cssx/compare/v0.3.0-alpha.2...v0.3.0-alpha.3) (2026-04-03)

**Note:** Version bump only for package cssx





# [0.3.0-alpha.2](https://github.com/startupjs/cssx/compare/v0.3.0-alpha.1...v0.3.0-alpha.2) (2026-03-29)


### Bug Fixes

* **eslint-plugin-cssxjs:** update react-pug eslint plugin ([eb62d55](https://github.com/startupjs/cssx/commit/eb62d556f061c2711b9e4803d15bfd97cbfb8fbd))





# [0.3.0-alpha.1](https://github.com/startupjs/cssx/compare/v0.3.0-alpha.0...v0.3.0-alpha.1) (2026-03-25)


### Performance Improvements

* update babel pug plugin to short-circuit processing of files which don't have pug ([6317ee3](https://github.com/startupjs/cssx/commit/6317ee3d9b30a218cc6a5157327ad85fa46e1ac2))





# [0.3.0-alpha.0](https://github.com/startupjs/cssx/compare/v0.2.33...v0.3.0-alpha.0) (2026-03-25)


### Features

* use the new pug babel plugn and eslint plugin from 'react-pug' with support for 'style' tags and full TSX support ([28e7a22](https://github.com/startupjs/cssx/commit/28e7a22e8069dec77c4a120f42b951ef90a4bef9))





## [0.2.33](https://github.com/startupjs/cssx/compare/v0.2.32...v0.2.33) (2026-01-25)


Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ Features:

For installation and documentation see [cssx.dev](https://cssx.dev)

## VS Code Extension

Install the following extension for full CSSX support with Pug and CSS/Stylus in `style` or `style(lang='styl')` tags:

[`vscode-react-pug-tsx`](https://marketplace.visualstudio.com/items?itemName=startupjs.vscode-react-pug-tsx)

## License

MIT
12 changes: 6 additions & 6 deletions docs-theme/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ export * from '@rspress/core/theme-original'

export function Layout () {
return (
<div className="project-layout">
<ProjectSidebar activeProject="cssx" />
<div className="project-layout-content">
<div className='project-layout'>
<ProjectSidebar activeProject='cssx' />
<div className='project-layout-content'>
<DefaultLayout />
</div>
</div>
Expand Down Expand Up @@ -58,16 +58,16 @@ interface ProjectSidebarProps {

function ProjectSidebar ({ activeProject }: ProjectSidebarProps) {
return (
<nav className="project-sidebar">
<nav className='project-sidebar'>
{PROJECTS.map((project) => (
<a
key={project.id}
href={project.url}
className={`project-sidebar-button project-sidebar-button--${project.id} ${project.id === activeProject ? 'active' : ''}`}
aria-label={project.name}
>
<span className="project-sidebar-button__text">{project.label}</span>
<span className="project-sidebar-button__tooltip">{project.name}</span>
<span className='project-sidebar-button__text'>{project.label}</span>
<span className='project-sidebar-button__tooltip'>{project.name}</span>
</a>
))}
</nav>
Expand Down
11 changes: 7 additions & 4 deletions docs/api/babel.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ The Babel preset transforms:
1. **`styl` template literals** → Compiled style objects
2. **`css` template literals** → Compiled style objects
3. **`pug` template literals** → JSX elements (if enabled)
4. **`styleName` props** → Connected to compiled styles
5. **`part` props** → Part style injection points
4. **`style` blocks inside `pug` templates** → Local `css` or `styl` template literals
5. **`styleName` props** → Connected to compiled styles
6. **`part` props** → Part style injection points

### Before Transform

Expand Down Expand Up @@ -105,7 +106,7 @@ The Babel preset converts this into optimized runtime code that:

## TypeScript

CSSX works with TypeScript. The `styl` and `pug` template literals are removed at compile time, so no runtime types are needed.
CSSX works with TypeScript. The `styl`, `css`, and `pug` template literals are removed at compile time, so no runtime types are needed.

```tsx
import { styl } from 'cssxjs'
Expand Down Expand Up @@ -133,4 +134,6 @@ function Card({ title, children }: CardProps) {
}
```

For `styleName` prop typing, you may need to extend JSX types in your project.
For `styleName` prop typing, you may need to extend JSX types in your project. For Pug-aware type checking, use `npx cssxjs check` instead of relying on `tsc --noEmit` alone.

See [TypeScript Support](/guide/typescript) for the full guide.
5 changes: 3 additions & 2 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
**Templates:**
- [styl Template](/api/styl) — Stylus syntax, variables, mixins, `u` unit
- [css Template](/api/css) — Plain CSS syntax
- [pug Template](/api/pug) — JSX alternative with Pug syntax
- [pug Template](/api/pug) — JSX alternative with Pug syntax, TypeScript expressions, and embedded style blocks

**Styling:**
- [styl() Function](/api/styl-function) — Apply styles via spread
Expand All @@ -31,14 +31,15 @@ import {

**Configuration:**
- [Babel Config](/api/babel) — Preset options
- [TypeScript Support](/guide/typescript) — Pug-aware type checking with `cssxjs check`

## Quick Reference

| Export | Type | Description |
|--------|------|-------------|
| `styl` | Template literal / Function | Write styles in Stylus syntax, or apply styles via spread |
| `css` | Template literal | Write styles in plain CSS syntax |
| `pug` | Template literal | Write JSX in Pug syntax |
| `pug` | Template literal | Write JSX in Pug syntax, with TypeScript expressions and embedded `style` blocks |
| `variables` | Observable object | Set CSS variable values at runtime |
| `setDefaultVariables` | Function | Set default CSS variable values |
| `defaultVariables` | Object | Read-only default variable values |
Expand Down
Loading
Loading