use super::prelude::*;
#[syntax(" fill | none | [ contain | cover ] || scale-down ")]
#[derive(
Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
initial = "fill",
applies_to = Elements,
animation_type = Discrete,
property_group = Images,
computed_value_type = AsSpecified,
canonical_order = "per grammar",
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub enum OObjectFitStyleValue {}
#[syntax(" content-box | border-box ")]
#[derive(
Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
initial = "content-box",
applies_to = Elements,
animation_type = Discrete,
property_group = Sizing,
computed_value_type = AsSpecified,
canonical_order = "per grammar",
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub enum OBoxSizingStyleValue {}
#[syntax(" none | <filter-value-list> ")]
#[derive(
Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
)]
#[declaration_metadata(
initial = "none",
applies_to = Elements,
animation_type = Unknown,
property_group = FilterEffects,
computed_value_type = AsSpecified,
canonical_order = "per grammar",
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
#[derive(csskit_derives::NodeWithMetadata)]
pub struct OFilterStyleValue<'a>;
#[cfg(test)]
mod tests {
use super::*;
use crate::CssAtomSet;
use css_parse::{assert_parse, assert_parse_error};
#[test]
fn test_o_object_fit_parses() {
assert_parse!(CssAtomSet::ATOMS, OObjectFitStyleValue, "fill");
assert_parse!(CssAtomSet::ATOMS, OObjectFitStyleValue, "none");
assert_parse!(CssAtomSet::ATOMS, OObjectFitStyleValue, "contain");
assert_parse!(CssAtomSet::ATOMS, OObjectFitStyleValue, "cover");
assert_parse!(CssAtomSet::ATOMS, OObjectFitStyleValue, "scale-down");
}
#[test]
fn test_o_object_fit_errors() {
assert_parse_error!(CssAtomSet::ATOMS, OObjectFitStyleValue, "invalid");
}
#[test]
fn test_o_box_sizing_parses() {
assert_parse!(CssAtomSet::ATOMS, OBoxSizingStyleValue, "content-box");
assert_parse!(CssAtomSet::ATOMS, OBoxSizingStyleValue, "border-box");
}
#[test]
fn test_o_box_sizing_errors() {
assert_parse_error!(CssAtomSet::ATOMS, OBoxSizingStyleValue, "invalid");
}
#[test]
fn test_o_filter_parses() {
assert_parse!(CssAtomSet::ATOMS, OFilterStyleValue, "none");
assert_parse!(CssAtomSet::ATOMS, OFilterStyleValue, "blur(4px)");
assert_parse!(CssAtomSet::ATOMS, OFilterStyleValue, "brightness(0.5) contrast(1.2)");
}
#[test]
fn test_o_filter_errors() {
assert_parse_error!(CssAtomSet::ATOMS, OFilterStyleValue, "invalid");
}
}