# GH_CssStyle class

Namespace: [Grasshopper.GUI.HTML](https://developer.rhino3d.com/api/gh1/namespace/grasshopper.gui.html.md) · Assembly: [Grasshopper](https://developer.rhino3d.com/api/gh1/assembly/grasshopper.md)

```cs
public class GH_CssStyle : IComparable<GH_CssStyle>
```

Represents a single CSS style, consisting of a selector and a collection of properties.

## Constructors

- [GH_CssStyle](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.html.gh-cssstyle/ctor.md): (4 overloads) Create a new blank CSS style.

## Properties

- [Comments](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.html.gh-cssstyle/comments.md): Gets all the comments associated with this style.
- [IsClassSelector](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.html.gh-cssstyle/isclassselector.md): Gets a value indicating whether this style defines a CSS class.
- [IsIdSelector](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.html.gh-cssstyle/isidselector.md): Gets a value indicating whether this style defines a CSS id.
- [IsPluralSelector](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.html.gh-cssstyle/ispluralselector.md): Gets a value indicating whether this style targets multiple selectors.
- [Properties](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.html.gh-cssstyle/properties.md): Gets all the properties in this CSS style.
- [Selector](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.html.gh-cssstyle/selector.md): Gets or sets the selector field for this property.

## Methods

- [AddComment](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.html.gh-cssstyle/addcomment.md): Add a comment to this style.
- [AddProperty](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.html.gh-cssstyle/addproperty.md): (2 overloads) Add a property to this style. If the new property conflicts with an existing property, it will not be added.
- [CompareTo](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.html.gh-cssstyle/compareto.md): Compare this CSS style to another one. Comments are ignored in the comparison.
- [FormatCss](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.html.gh-cssstyle/formatcss.md): Format the style as CSS code.
