5 * Find the at-rule in which a rule is nested.
7 * Returns `null` if the rule is not nested within an at-rule.
9 module.exports = function findAtRuleContext(
10 rule /*: postcss$rule */
11 ) /*: ?postcss$node*/ {
12 const parent = rule.parent;
14 if (parent.type === "root") {
17 if (parent.type === "atrule") {
20 return findAtRuleContext(parent);