#[derive(Serialize, Deserialize, Debug, Copy, Clone, Hash, PartialEq, Eq)]
#[serde(rename_all = "kebab-case")]
pub enum ClearFloat {
Left,
Right,
Both,
}
impl ClearFloat {
pub fn wd_html_style(self) -> &'static str {
match self {
ClearFloat::Left => "clear:left; height: 0px; font-size: 1px",
ClearFloat::Right => "clear:right; height: 0px; font-size: 1px",
ClearFloat::Both => "clear:both; height: 0px; font-size: 1px",
}
}
pub fn wj_html_class(self) -> &'static str {
match self {
ClearFloat::Left => "wj-clear-float-left",
ClearFloat::Right => "wj-clear-float-right",
ClearFloat::Both => "wj-clear-float-both",
}
}
}