mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Introduce #[css(skip)]
This commit is contained in:
parent
7931df716d
commit
ca45695db1
8 changed files with 31 additions and 96 deletions
|
@ -53,6 +53,9 @@ pub fn derive(input: syn::DeriveInput) -> Tokens {
|
|||
} else {
|
||||
for binding in bindings {
|
||||
let attrs = cg::parse_field_attrs::<CssFieldAttrs>(&binding.ast());
|
||||
if attrs.skip {
|
||||
continue;
|
||||
}
|
||||
if !attrs.ignore_bound {
|
||||
where_clause.add_trait_bound(&binding.ast().ty);
|
||||
}
|
||||
|
@ -152,4 +155,5 @@ pub struct CssVariantAttrs {
|
|||
#[derive(Default, FromField)]
|
||||
struct CssFieldAttrs {
|
||||
ignore_bound: bool,
|
||||
skip: bool,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue