GH_CssProperty

References
Represents a single Property/Values pair in a CSS style.

Constructors

GH_CssProperty

#
public GH_CssProperty(string property, IEnumerable<string> values)
Create a new CSS property.
property (string)Property name.
values (IEnumerable<string>)Property values.

GH_CssProperty

#
public GH_CssProperty(string property, string value)
Create a new CSS property.
property (string)Property name.
value (string)Property value.

GH_CssProperty

#
public GH_CssProperty(string property)
Create a new CSS property.
property (string)Property name.

Properties

Name

#
public string Name { get; }
Gets the property name.

ValueCount

#
public int ValueCount { get; }
Gets the number of values stored in this property.

Values

#
public ReadOnlyCollection<string> Values { get; }
Gets the local values as a readonly collection.

Indexers

Value

#
public string this[int index] { get; }
Gets a specific value.
index (int)Index of value.
The Css property value at the given index.

Methods

AddValue

#
public void AddValue(string value)
Append a value to this property.
value (string)Value to append.

AddValues

#
public void AddValues(IEnumerable<string> values)
Append a collection of values to this property.
values (IEnumerable<string>)Values to append.

CompareTo

#
public int CompareTo(GH_CssProperty other)
Compare this CSS property to another one.
other (GH_CssProperty)Property to compare with.
Comparison flag.

FormatCss

#
public string FormatCss(int indent)
Format the property as CSS code.
indent (int)Indentation depth of property.
A CSS 2.0 compliant property string.