Introduction
CSSX is compiler for CSS. Generate HTML and CSS from a single file. Structured, easy to read and write.
Example
The button below is styled with CSSX and has a custom touch-action property that triggers a confetti effect when clicked.
script {
--src: "https://cdn.jsdelivr.net/npm/canvas-confetti@1.9.3/dist/confetti.browser.min.js";
}
button {
--content: "Click me!";
--onclick: "confetti()";
padding: 10px 16px;
border: none;
border-radius: 8px;
color: white;
background-color: #007bff;
}
This page is generated from a single CSSX file. View thesource code in the GitHub repository
Usage
npx cssx-build
This will compile the CSSX files from the src/pages directory to the dist directory.
Sponsors
Really? You want to sponsor this project? 😂