titan_html/
class.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use titan_html_core::StyleRule;

#[derive(Clone, Debug, Hash, Eq, PartialEq)]
pub enum TagClass {
  /// Just a class
  Normal(String),
  /// Style that needs processing.
  //Style(String),
  StyleRule(StyleRule),
}

impl TagClass {
  pub fn text(value: String) -> TagClass {
    Self::Normal(value)
  }

  pub fn styles(value: StyleRule) -> TagClass {
    Self::StyleRule(value)
  }
}