mirror of
https://github.com/servo/servo.git
synced 2025-08-14 09:55:35 +01:00
Implement serialization for transform functions.
Preserve more information from transform function parsing. Preserve angle unit while parsing. Simplify SpecifiedMatrix. Use the write! macro for formatting with a helper called Css. Implement ToCss for &T if T implements ToCss. Add some tests and update others. closes #15194
This commit is contained in:
parent
e2671459cb
commit
480f59c880
8 changed files with 459 additions and 315 deletions
|
@ -26,3 +26,11 @@ fn test_will_change() {
|
|||
assert!(parse(will_change::parse, "contents, inherit, initial").is_err());
|
||||
assert!(parse(will_change::parse, "transform scroll-position").is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_transform_translate() {
|
||||
use style::properties::longhands::transform;
|
||||
assert_roundtrip_with_context!(transform::parse, "translate(2px)");
|
||||
assert_roundtrip_with_context!(transform::parse, "translate(2px, 5px)");
|
||||
assert!(parse(transform::parse, "translate(2px foo)").is_err());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue