parent_rule property

parent_rule property

If this rule is contained inside another rule (e.g. a style rule inside an @media block), this is the containing rule. If this rule is not nested inside any other rules, this returns null.

Definition:

@property
def parent_rule(self):
    ...

See Also