cssx

Documentation

CSSX is a CSS preprocessor that allows you to write HTML and CSS in a single file. It is structured, easy to read and write.

CSSX

p {
    --content: "This is the content of the paragraph";
    font-size: 16px;
    color: blue;
}

HTML

<p class="cssx-cDU0">This is the content of the paragraph</p>

Any variable will be passed as a property to the element.

CSSX

button {
    --content: "Click me";
    --onclick: "alert('Hello, World!')";
    padding: 10px 16px;
}

HTML

<button class="cssx-YnV0dG9u" onclick="alert(Hello, World!)">Click me</button>