cssificator

Crates.iocssificator
lib.rscssificator
version0.1.0
sourcesrc
created_at2024-10-29 10:36:32.013033
updated_at2024-10-29 10:36:32.013033
descriptionGenerate CSS source code through rust functions!
homepage
repositoryhttps://github.com/IsotoxalDev/cssificator
max_upload_size
id1426901
size5,800
Abhinav Kuruvila Joseph (IsotoxalDev)

documentation

README

cssificator

This crate provides an element struct which can be displayed as HTML.

License

This crate is licensed under the MIT license

Usage

[dependencies]
htmlificator = "0.1.0"
use cssificator::{Style, CSS};

fn main() {
    let mut css = CSS::new();
    let mut st1 = Style::new("h1");
    st1.add_declaration("color", "red");
    st1.add_declaration("size", "20px");
    let mut st2 = Style::new("div");
    st2.add_declaration("background-color", "black");
    st2.add_declaration("height", "100vh");
    st2.add_declaration("width", "100vw");
    css.add_style(st1);
    css.add_style(st2);
    println!("{}", css)
}
Commit count: 4

cargo fmt