use {
super::{NamespacePrefix, NamespaceUrl},
cssparser::ToCss,
std::fmt,
};
#[derive(Clone, Debug, PartialEq)]
#[allow(missing_docs)]
pub struct NamespaceAtRule {
pub prefix: Option<NamespacePrefix>,
pub url: NamespaceUrl,
}
impl ToCss for NamespaceAtRule {
fn to_css<W: fmt::Write>(&self, dest: &mut W) -> fmt::Result {
dest.write_str("@namespace ")?;
if let Some(ref prefix) = self.prefix {
dest.write_str(&(prefix.0).0)?;
dest.write_str(" ")?;
}
dest.write_str("url(")?;
dest.write_str(&(self.url.0).0)?;
dest.write_str(");")
}
}