public final class MediaPlugin extends Object implements Plugin
@media
).
In custom refiner plugins, you can reuse the logic from this class to parse declarations with the delegateRefinement(AtRule, Grammar, Broadcaster)
method.
MediaQueryList
,
MediaQueryListParser
Constructor and Description |
---|
MediaPlugin() |
Modifier and Type | Method and Description |
---|---|
static void |
delegateRefinement(AtRule atRule,
Grammar grammar,
Broadcaster broadcaster)
A convenience method to delegate refinement of an
AtRule to this class. |
void |
refine(AtRule rule,
Grammar grammar,
Broadcaster broadcaster)
Refines
MediaQuery s. |
public void refine(AtRule rule, Grammar grammar, Broadcaster broadcaster)
MediaQuery
s.
If refinement is successful the new AtRuleExpression
and AtRuleBlock
will be broadcasted via the given
Broadcaster
.
rule
- The at-rule.grammar
- The grammar.broadcaster
- The broadcaster.public static void delegateRefinement(AtRule atRule, Grammar grammar, Broadcaster broadcaster)
AtRule
to this class.
This is mainly used by Refine
subscription methods.
If refinement is successful the new AtRuleExpression
and AtRuleBlock
will be broadcasted via the given
Broadcaster
.
atRule
- The AtRule.grammar
- The grammar.broadcaster
- The broadcaster.Copyright (c) 2019, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE file in the repository.