Add serialize_four_sides, use for serializing BorderRadius

This commit is contained in:
Manish Goregaokar 2016-08-02 15:43:52 +05:30
parent c6feae3c5c
commit d1e45f78af
No known key found for this signature in database
GPG key ID: 3BBF4D3E2EF79F98
5 changed files with 110 additions and 27 deletions

View file

@ -25,6 +25,10 @@ fn test_position() {
assert_roundtrip!(Position::parse, "center 10%", "50% 10%");
assert_roundtrip!(Position::parse, "right 10%", "100% 10%");
// Only keywords can be reordered
assert!(parse(Position::parse, "top 40%").is_err());
assert!(parse(Position::parse, "40% left").is_err());
// we don't yet handle 4-valued positions
// https://github.com/servo/servo/issues/12690
}