| 15 | |
| 16 | impl Parse for Args { |
| 17 | fn parse(input: ParseStream) -> Result<Self> { |
| 18 | match input.parse::<LitStr>()?.value().as_str() { |
| 19 | "yes" => Ok(Self::Yes), |
| 20 | // TODO(keithamus): drop 'invidual properties' after https://github.com/w3c/csswg-drafts/pull/11106 |
| 21 | "see individual properties" | "invidual properties" => Ok(Self::SeeIndividualProperties), |
| 22 | "no" => Ok(Self::No), |
| 23 | s => { |
| 24 | dbg!(format!( |
| 25 | "WARNING:: inherited value {} not recognised. Property will need to impl StyleValue trait manually.", |
| 26 | s |
| 27 | )); |
| 28 | Ok(Self::Unknown) |
| 29 | } |
| 30 | } |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | pub fn generate(args: Args, ast: DeriveInput) -> TokenStream { |