---
title: "ICSSRule.ParentRule"
url: "https://reference.aspose.com/html/net/aspose.html.dom.css/icssrule/parentrule/"
product: "Aspose.HTML for .NET API Reference"
description: "ICSSRule ParentRule 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"
---

## ICSSRule.ParentRule 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.

```csharp
public ICSSRule ParentRule { get; }
```

### See Also

* interface [ICSSRule](../)
* namespace [Aspose.Html.Dom.Css](../../../aspose.html.dom.css/)
* assembly [Aspose.HTML](../../../)
