aboutsummaryrefslogtreecommitdiffstats
path: root/components/style_traits/values.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2018-04-29 04:48:47 +0200
committerEmilio Cobos Álvarez <emilio@crisal.io>2018-05-05 16:20:22 +0200
commitc508d8576dafb13a4f0d51a837508f7984e4c1a8 (patch)
treec6d6a2b1c135dbfda7f11ea6599b53b9f086bfae /components/style_traits/values.rs
parenta375baf84b029c56222d3fe8a304f374ab1c9549 (diff)
downloadservo-c508d8576dafb13a4f0d51a837508f7984e4c1a8.tar.gz
servo-c508d8576dafb13a4f0d51a837508f7984e4c1a8.zip
style: Move represents_keyword to the css attributes.
Bug: 1457635 Reviewed-by: xidorn MozReview-Commit-ID: 21yuU4h34AQ
Diffstat (limited to 'components/style_traits/values.rs')
-rw-r--r--components/style_traits/values.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/components/style_traits/values.rs b/components/style_traits/values.rs
index 481eb1aff6d..9a618067fd7 100644
--- a/components/style_traits/values.rs
+++ b/components/style_traits/values.rs
@@ -37,6 +37,9 @@ use std::fmt::{self, Write};
/// * if `#[css(skip_if = "function")]` is found on a field, the `ToCss` call
/// for that field is skipped if `function` returns true. This function is
/// provided the field as an argument;
+/// * `#[css(represents_keyword)]` can be used on bool fields in order to
+/// serialize the field name if the field is true, or nothing otherwise. It
+/// also collects those keywords for `SpecifiedValueInfo`.
/// * 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 {