basic/
basic.rs

1use termio::*;
2
3fn main() {
4    let mut tcss = Termio::new();
5    
6    let tcss_content = r#"
7        @element "header" {
8            color: blue;
9            background: i-blue;
10            decoration: bold;
11        }
12
13        @element "warning" {
14            color: yellow;
15            background: i-yellow;
16            decoration: bold italic;
17        }
18
19        @element "info" {
20            color: cyan;
21            background: i-cyan;
22            decoration: underline;
23        }
24    "#;
25
26    tcss.parse(tcss_content).unwrap();
27
28    println!("{}", "Welcome to Terminal CSS!".style("header", &tcss));
29    println!("{}", "This is a warning message".style("warning", &tcss));
30    println!("{}", "And this is an info message".style("info", &tcss));
31}