tailwind_css_fixes/systems/units/negative/mod.rs
1use super::*;
2
3mod traits;
4
5#[derive(Copy, Clone, Debug)]
6pub struct Negative(pub(crate) bool);
7
8impl Negative {
9 pub fn write(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
10 match self.0 {
11 true => write!(f, "-"),
12 false => write!(f, ""),
13 }
14 }
15 pub fn get_properties(&self, value: &str) -> String {
16 match self.0 {
17 true => format!("-{}", value),
18 false => value.to_string(),
19 }
20 }
21}