mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Port servo to the new media query system.
Port `width`, and also add the `scan` media feature so I don't need to add ugliness just to workaround the unused keyword_evaluator macro.
This commit is contained in:
parent
8ae1322fb3
commit
935b5393a9
3 changed files with 57 additions and 134 deletions
|
@ -161,6 +161,18 @@ impl MediaFeatureDescription {
|
|||
}
|
||||
}
|
||||
|
||||
/// A simple helper to construct a `MediaFeatureDescription`.
|
||||
macro_rules! feature {
|
||||
($name:expr, $allows_ranges:expr, $evaluator:expr, $reqs:expr,) => {
|
||||
$crate::media_queries::media_feature::MediaFeatureDescription {
|
||||
name: $name,
|
||||
allows_ranges: $allows_ranges,
|
||||
evaluator: $evaluator,
|
||||
requirements: $reqs,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for MediaFeatureDescription {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_struct("MediaFeatureExpression")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue