mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Don't support a list of selectors in ::slotted yet.
Bug: 1425757 Reviewed-by: xidorn MozReview-Commit-ID: G0I0gM2sWTh
This commit is contained in:
parent
c2cacb69f3
commit
b556ddbf55
3 changed files with 66 additions and 39 deletions
|
@ -415,6 +415,25 @@ fn specific_bucket_for<'a>(
|
|||
lower_name: &selector.lower_name,
|
||||
}
|
||||
}
|
||||
// ::slotted(..) isn't a normal pseudo-element, so we can insert it on
|
||||
// the rule hash normally without much problem. For example, in a
|
||||
// selector like:
|
||||
//
|
||||
// div::slotted(span)::before
|
||||
//
|
||||
// It looks like:
|
||||
//
|
||||
// [
|
||||
// LocalName(div),
|
||||
// Combinator(SlotAssignment),
|
||||
// Slotted(span),
|
||||
// Combinator::PseudoElement,
|
||||
// PseudoElement(::before),
|
||||
// ]
|
||||
//
|
||||
// So inserting `span` in the rule hash makes sense since we want to
|
||||
// match the slotted <span>.
|
||||
Component::Slotted(ref selector) => find_bucket(selector.iter()),
|
||||
_ => Bucket::Universal
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue