|
@@ -1,20 +1,3 @@
|
|
|
-use termio::{StyledText, Termio};
|
|
|
|
|
-
|
|
|
|
|
fn main() {
|
|
fn main() {
|
|
|
- let mut termio = Termio::new();
|
|
|
|
|
-
|
|
|
|
|
- // Parse CSS-like syntax from a string
|
|
|
|
|
- let css = r#"
|
|
|
|
|
- @element "header" {
|
|
|
|
|
- color: red;
|
|
|
|
|
- background: black;
|
|
|
|
|
- decoration: bold;
|
|
|
|
|
- padding: 1;
|
|
|
|
|
- }
|
|
|
|
|
- "#;
|
|
|
|
|
-
|
|
|
|
|
- termio.parse(css).unwrap();
|
|
|
|
|
-
|
|
|
|
|
- // Style text using the parsed styles
|
|
|
|
|
- println!("{}", "This is a header".style("header", &termio));
|
|
|
|
|
|
|
+ println!("Hello");
|
|
|
}
|
|
}
|