pub enum CssParseErrorInner<'a> {
ParseError(CssSyntaxError),
UnclosedBlock,
MalformedCss,
DynamicCssParseError(DynamicCssParseError<'a>),
PseudoSelectorParseError(CssPseudoSelectorParseError<'a>),
NodeTypePath(NodeTypePathParseError<'a>),
UnknownPropertyKey(&'a str, &'a str),
VarOnShorthandProperty {
key: CombinedCssPropertyType,
value: &'a str,
},
}
Variants§
ParseError(CssSyntaxError)
A hard error in the CSS syntax
UnclosedBlock
Braces are not balanced properly
MalformedCss
Invalid syntax, such as #div { #div: "my-value" }
DynamicCssParseError(DynamicCssParseError<'a>)
Error parsing dynamic CSS property, such as
#div { width: {{ my_id }} /* no default case */ }
PseudoSelectorParseError(CssPseudoSelectorParseError<'a>)
Error while parsing a pseudo selector (like :aldkfja
)
NodeTypePath(NodeTypePathParseError<'a>)
The path has to be either *
, div
, p
or something like that
UnknownPropertyKey(&'a str, &'a str)
A certain property has an unknown key, for example: alsdfkj: 500px
= unknown CSS key "alsdfkj: 500px"
VarOnShorthandProperty
var()
can’t be used on properties that expand to multiple values, since they would be ambigouus
and degrade performance - for example margin: var(--blah)
would be ambigouus because it’s not clear
when setting the variable, whether all sides should be set, instead, you have to use margin-top: var(--blah)
,
margin-bottom: var(--baz)
in order to work around this limitation.
Trait Implementations§
Source§impl<'a> Clone for CssParseErrorInner<'a>
impl<'a> Clone for CssParseErrorInner<'a>
Source§fn clone(&self) -> CssParseErrorInner<'a>
fn clone(&self) -> CssParseErrorInner<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more