Skip to content

Commit

Permalink
style: Allow ::slotted()::placeholder.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed Nov 10, 2018
1 parent 3b1078b commit 9845a85
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions components/style/gecko/pseudo_element.rs
Expand Up @@ -27,12 +27,16 @@ include!(concat!(
impl ::selectors::parser::PseudoElement for PseudoElement {
type Impl = SelectorImpl;

// ::slotted() should support all tree-abiding pseudo-elements, see
// https://drafts.csswg.org/css-scoping/#slotted-pseudo
// https://drafts.csswg.org/css-pseudo-4/#treelike
fn valid_after_slotted(&self) -> bool {
// TODO(emilio): Remove this function or this comment after [1] is
// resolved.
//
// [1]: https://github.com/w3c/csswg-drafts/issues/3150
self.is_before_or_after()
matches!(
*self,
PseudoElement::Before |
PseudoElement::After |
PseudoElement::Placeholder
)
}

fn supports_pseudo_class(&self, pseudo_class: &NonTSPseudoClass) -> bool {
Expand Down

0 comments on commit 9845a85

Please sign in to comment.