mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
style: Add support for parsing container-query-specific features
There are some mediaqueries-5 features that we still don't support and explain the remaining failures in at-container-{parsing,serialization}. Differential Revision: https://phabricator.services.mozilla.com/D144446
This commit is contained in:
parent
989f8d89c4
commit
1003d644aa
16 changed files with 205 additions and 79 deletions
|
@ -6,7 +6,7 @@
|
|||
//!
|
||||
//! https://drafts.csswg.org/mediaqueries/#typedef-media-query
|
||||
|
||||
use crate::queries::QueryCondition;
|
||||
use crate::queries::{QueryCondition, FeatureType};
|
||||
use crate::parser::ParserContext;
|
||||
use crate::str::string_as_ascii_lowercase;
|
||||
use crate::values::CustomIdent;
|
||||
|
@ -134,9 +134,9 @@ impl MediaQuery {
|
|||
.unwrap_or_default();
|
||||
|
||||
let condition = if explicit_media_type.is_none() {
|
||||
Some(QueryCondition::parse(context, input)?)
|
||||
Some(QueryCondition::parse(context, input, FeatureType::Media)?)
|
||||
} else if input.try_parse(|i| i.expect_ident_matching("and")).is_ok() {
|
||||
Some(QueryCondition::parse_disallow_or(context, input)?)
|
||||
Some(QueryCondition::parse_disallow_or(context, input, FeatureType::Media)?)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue