mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Derive HasViewportPercentage 🍷
This commit is contained in:
parent
d1e31f7aa4
commit
90bae7f802
27 changed files with 202 additions and 452 deletions
|
@ -38,19 +38,6 @@ macro_rules! define_numbered_css_keyword_enum {
|
|||
}
|
||||
}
|
||||
|
||||
/// A macro used to implement HasViewportPercentage trait
|
||||
/// for a given type that may never contain viewport units.
|
||||
macro_rules! no_viewport_percentage {
|
||||
($name: ident) => {
|
||||
impl $crate::values::HasViewportPercentage for $name {
|
||||
#[inline]
|
||||
fn has_viewport_percentage(&self) -> bool {
|
||||
false
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/// A macro for implementing `ComputedValueAsSpecified`, `Parse`
|
||||
/// and `HasViewportPercentage` traits for the enums defined
|
||||
/// using `define_css_keyword_enum` macro.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue