mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +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
|
@ -28,8 +28,7 @@ fn test_linear_gradient() {
|
|||
assert_roundtrip_with_context!(Image::parse, "linear-gradient(to right top, red, green)");
|
||||
|
||||
// Parsing with <angle>
|
||||
assert_roundtrip_with_context!(Image::parse, "linear-gradient(45deg, red, green)",
|
||||
"linear-gradient(0.7853982rad, red, green)");
|
||||
assert_roundtrip_with_context!(Image::parse, "linear-gradient(45deg, red, green)");
|
||||
|
||||
// Parsing with more than two entries in <color-stop-list>
|
||||
assert_roundtrip_with_context!(Image::parse, "linear-gradient(red, yellow, green)");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue