layoutcss_parser/utilities/h.rs
1use indoc::formatdoc;
2use crate::harmonic::get_harmonic;
3
4use std::collections::HashSet;
5pub fn h_css(value: &str, harmonic_ratio: f64, set: &mut HashSet<String>) {
6 let harmonic_value = get_harmonic(value, harmonic_ratio);
7 set.insert(formatdoc!(
8 r#"
9 [layout~="h:{value}"]{{
10 height: {harmonic_value};
11 }}
12 "#
13 ));
14}