CssUnitValue Class
A value with a single unit, a number or a percentage (https://drafts.css-houdini.org/css-typed-om-1/#cssunitvalue), e.g. 42px (the unit is "px"), 10 (the unit is "number") or 50% (the unit is "percent").
public sealed class CssUnitValue : CssNumericValue- Inheritance
CssNumericValueCssUnitValue
Constructors
| Name | Description |
|---|---|
| CssUnitValue(double, string) | https://drafts.css-houdini.org/css-typed-om-1/#dom-cssunitvalue-cssunitvalue |
CssUnitValue(double, string)
CssNumericValue.cshttps://drafts.css-houdini.org/css-typed-om-1/#dom-cssunitvalue-cssunitvalue
Parameters
See also
Properties
| Name | Description |
|---|---|
| Unit | The unit: "number", "percent" or the unit of a dimension (ASCII lowercase, e.g. "px", "q", "hz"). |
| Value | Gets or sets the numeric value, without its unit. |
The unit: "number", "percent" or the unit of a dimension (ASCII lowercase, e.g. "px", "q", "hz").
public string Unit { get; }Value
CssNumericValue.csGets or sets the numeric value, without its unit.
public double Value { get; set; }Methods
| Name | Description |
|---|---|
| ToString() | https://drafts.css-houdini.org/css-typed-om-1/#cssunitvalue-serialization |