Skip to main content

Crate pliego_css

Crate pliego_css 

Source
Expand description

Public facade for PliegoCSS.

The public API validates utilities during Rust compilation and exposes their emitted class identity to Rust renderers.

The supported candidate surface is pc!, pcx!, Style, and StyleId. Internal compiler crates remain an exact-version implementation graph rather than application APIs.

use pliego_css::{Style, pc, pcx};

const CARD: Style = pc!("flex gap-4 rounded-lg");

let active = true;
let selected = pcx!(
    "block",
    if active { "opacity-100" } else { "opacity-50" },
);

assert!(!CARD.is_empty());
assert!(selected.class_name().starts_with("pc_"));
assert_eq!(Style::EMPTY.class_name(), "");

Macros§

pc
Validates one utility string at compile time and returns its static Style.
pcx
Compiles every visible combination of conditional utility strings and selects one Style.

Structs§

Style
A compile-time validated style literal.
StyleId
A compact identity for one normalized, theme-scoped style.