mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
style: Document css(iterable) and css(dimension).
This commit is contained in:
parent
194c2712b5
commit
b750f7096c
1 changed files with 6 additions and 0 deletions
|
@ -24,6 +24,12 @@ use std::fmt::{self, Write};
|
|||
/// commas, otherwise, by spaces;
|
||||
/// * if `#[css(function)]` is found on a variant, the variant name gets
|
||||
/// serialised like unit variants and its fields are surrounded by parentheses;
|
||||
/// * if `#[css(iterable)]` is found on a function variant, that variant needs
|
||||
/// to have a single member, and that member needs to be iterable. The
|
||||
/// iterable will be serialized as the arguments for the function.
|
||||
/// * if `#[css(dimension)]` is found on a variant, that variant needs
|
||||
/// to have a single member. The variant would be serialized as a CSS
|
||||
/// dimension token, like: <member><identifier>.
|
||||
/// * finally, one can put `#[css(derive_debug)]` on the whole type, to
|
||||
/// implement `Debug` by a single call to `ToCss::to_css`.
|
||||
pub trait ToCss {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue