Anthony Ramine
39e29f557e
Simplify machinery to serialise optional parts of CSS values
...
We simply implement ToCss for Option<T>, printing nothing if the value is None,
and we then use SequenceWriter to skip writing of separators around empty parts.
2017-06-21 11:17:22 +02:00
Anthony Ramine
fd1ab75af9
Derive ToCss for ShapeRadius<L>
2017-06-13 10:19:23 +02:00
Anthony Ramine
45e8b0e8c7
Support unit variants when deriving ToCss
2017-06-07 16:47:59 +02:00
Anthony Ramine
c4f1d647a0
Derive the most trivial ToCss implementations 🌋
...
For now, all variants get serialised as the space-separated serialisations
of their fields. Unit variants are not supported.
2017-06-04 16:17:56 +02:00
Anthony Ramine
af3ede418b
Refactor BorderRadius and move it to the border modules
...
BorderRadius now parses itself reusing Rect<T>.
2017-05-28 14:36:37 +02:00
Anthony Ramine
150c9df246
Use Rect in InsetRect
2017-05-25 17:27:19 +02:00
Anthony Ramine
6f3c46ca61
Remove uses of parse_four_sides and serialize_four_sides
2017-05-25 17:27:17 +02:00
Anthony Ramine
a65c874ec8
Refactor basic shapes
2017-05-22 14:03:12 +02:00
Anthony Ramine
07c0456cfd
Derive ToComputedValue
...
For now, only impls for types like in style::values::generics can be derived.
This also needed a few ToComputedValueAsSpecified impls that I would like to
replace by some #[to_computed_value(clone)] attribute, but I think it is ok
to keep it like this for now.
2017-05-21 15:31:17 +02:00
Anthony Ramine
cb2e04acf6
Remove style::values::HasViewportPercentage reexport
2017-05-20 22:00:05 +02:00
Ravi Shankar
d56aec4109
Make ShapeSource generic
2017-04-25 17:42:02 +05:30
Ravi Shankar
24226af794
Make InsetRect generic
2017-04-25 17:40:41 +05:30
Ravi Shankar
f4b18643c2
Cleanup Polygon and make it generic
2017-04-25 17:13:45 +05:30
Ravi Shankar
a36bf9efc4
Make ShapeRadius generic
2017-04-25 17:13:44 +05:30
Ravi Shankar
b2b3f99427
Make BorderRadius generic
2017-04-25 17:13:42 +05:30