cssificator 0.1.0

Generate CSS source code through rust functions!
Documentation
  • Coverage
  • 66.67%
    4 out of 6 items documented0 out of 3 items with examples
  • Size
  • Source code size: 5.31 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 508.04 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • IsotoxalDev/cssificator
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • IsotoxalDev

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)
}