mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Use CustomIdent for transition-property
This commit is contained in:
parent
cdcc8157c6
commit
51a4481388
3 changed files with 31 additions and 32 deletions
|
@ -7,6 +7,7 @@ use servo_atoms::Atom;
|
|||
use style::properties::animated_properties::TransitionProperty;
|
||||
use style::properties::longhands::transition_property;
|
||||
use style::properties::shorthands::transition;
|
||||
use style::values::CustomIdent;
|
||||
use style_traits::ToCss;
|
||||
|
||||
#[test]
|
||||
|
@ -19,12 +20,15 @@ fn test_longhand_properties() {
|
|||
assert_roundtrip_with_context!(transition_property::parse, "-other-unsupported-property");
|
||||
assert_roundtrip_with_context!(transition_property::parse, "--var");
|
||||
|
||||
assert_eq!(parse_longhand!(transition_property, "margin-left, transition-delay, width, --var"),
|
||||
transition_property::SpecifiedValue(
|
||||
vec![TransitionProperty::MarginLeft,
|
||||
TransitionProperty::Unsupported(Atom::from("transition-delay")),
|
||||
TransitionProperty::Width,
|
||||
TransitionProperty::Unsupported(Atom::from("--var"))]));
|
||||
assert_eq!(
|
||||
parse_longhand!(transition_property, "margin-left, transition-delay, width, --var"),
|
||||
transition_property::SpecifiedValue(vec![
|
||||
TransitionProperty::MarginLeft,
|
||||
TransitionProperty::Unsupported(CustomIdent(Atom::from("transition-delay"))),
|
||||
TransitionProperty::Width,
|
||||
TransitionProperty::Unsupported(CustomIdent(Atom::from("--var"))),
|
||||
])
|
||||
);
|
||||
|
||||
assert!(parse(transition_property::parse, ".width").is_err());
|
||||
assert!(parse(transition_property::parse, "1width").is_err());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue