CSSPrimitiveValue Class
Contents
[
Hide
]CSSPrimitiveValue class
The CSSPrimitiveValue interface derives from the CSSValue interface and represents the current computed value of a CSS property.
Note: This interface was part of an attempt to create a typed CSS Object Model. This attempt has been abandoned, and most browsers do not implement it.
public abstract class CSSPrimitiveValue : CSSValue
Properties
Name | Description |
---|---|
abstract CSSText { get; set; } | The cssText property of the CSSValue interface represents the current computed CSS property value. |
CSSValueType { get; } | A code defining the type of the value. |
PrimitiveType { get; } | The type of the value as defined by the constants specified above. |
Methods
Name | Description |
---|---|
override Equals(object) | Determines whether the specified Object is equal to this instance. |
abstract GetCounterValue() | This method is used to get the Counter value. If this CSS value doesn’t contain a counter value, a DOMException is raised. Modification to the corresponding style property can be achieved using the Counter interface. |
abstract GetFloatValue(ushort) | This method is used to get a float value in a specified unit. If this CSS value doesn’t contain a float value or can’t be converted into the specified unit, a DOMException is raised. |
override GetHashCode() | Returns a hash code for this instance. |
abstract GetIntValue(ushort) | This method is used to get an int value in a specified unit. If this CSS value doesn’t contain an int value or can’t be converted into the specified unit, a DOMException is raised. |
override GetPlatformType() | This method is used to retrieve ECMAScript object Type. |
abstract GetRectValue() | This method is used to get the Rect value. If this CSS value doesn’t contain a rect value, a DOMException is raised. Modification to the corresponding style property can be achieved using the Rect interface. |
abstract GetRGBColorValue() | This method is used to get the RGB color. If this CSS value doesn’t contain a RGB color value, a DOMException is raised. Modification to the corresponding style property can be achieved using the RGBColor interface. |
abstract GetStringValue() | This method is used to get the string value. If the CSS value doesn’t contain a string value, a DOMException is raised. |
abstract SetFloatValue(ushort, float) | A method to set the float value with a specified unit. If the property attached with this value can not accept the specified unit or the float value, the value will be unchanged and a DOMException will be raised. |
abstract SetIntValue(ushort, int) | A method to set the int value with a specified unit. If the property attached with this value can not accept the specified unit or the int value, the value will be unchanged and a DOMException will be raised. |
abstract SetStringValue(ushort, string) | A method to set the string value with the specified unit. If the property attached to this value can’t accept the specified unit or the string value, the value will be unchanged and a DOMException will be raised. |
override ToString() | Returns a String that represents this instance. |
Fields
Name | Description |
---|---|
const CSS_ATTR | The value is a attribute function. The value can be obtained by using the getStringValue method. |
const CSS_CH | The value is a length (ch). The value can be obtained by using the getFloatValue method. |
const CSS_CM | The value is a length (cm). The value can be obtained by using the getFloatValue method. |
const CSS_COUNTER | The value is a counter or counters function. The value can be obtained by using the GetCounterValue method. |
const CSS_DEG | The value is an angle (deg). The value can be obtained by using the getFloatValue method. |
const CSS_DIMENSION | The value is a number with an unknown dimension. The value can be obtained by using the getFloatValue method. |
const CSS_DPCM | The value is a dots per centimeter (dpcm). |
const CSS_DPI | The value is a dots per inch (dpi). |
const CSS_DPPX | The value is a dots per ‘px’ unit (dppx). |
const CSS_EMS | The value is a length (ems). The value can be obtained by using the getFloatValue method. |
const CSS_EXS | The value is a length (exs). The value can be obtained by using the getFloatValue method. |
const CSS_GRAD | The value is an angle (grad). The value can be obtained by using the getFloatValue method. |
const CSS_HZ | The value is a frequency (Hz). The value can be obtained by using the getFloatValue method. |
const CSS_IDENT | The value is an identifier. The value can be obtained by using the getStringValue method. |
const CSS_IN | The value is a length (in). The value can be obtained by using the getFloatValue method. |
const CSS_KHZ | The value is a frequency (kHz). The value can be obtained by using the getFloatValue method. |
const CSS_MM | The value is a length (mm). The value can be obtained by using the getFloatValue method. |
const CSS_MS | The value is a time (ms). The value can be obtained by using the getFloatValue method. |
const CSS_NUMBER | The value is a simple number. The value can be obtained by using the getFloatValue method. |
const CSS_PC | The value is a length (pc). The value can be obtained by using the getFloatValue method. |
const CSS_PERCENTAGE | The value is a percentage. The value can be obtained by using the getFloatValue method. |
const CSS_PT | The value is a length (pt). The value can be obtained by using the getFloatValue method. |
const CSS_PX | The value is a length (px). The value can be obtained by using the getFloatValue method. |
const CSS_RAD | The value is an angle (rad). The value can be obtained by using the getFloatValue method. |
const CSS_RECT | The value is a rect function. The value can be obtained by using the GetRectValue method. |
const CSS_REM | The value is a length (rem). The value can be obtained by using the getFloatValue method. |
const CSS_RGBCOLOR | The value is a RGB color. The value can be obtained by using the GetRGBColorValue method. |
const CSS_S | The value is a time (s). The value can be obtained by using the getFloatValue method. |
const CSS_STRING | The value is a STRING. The value can be obtained by using the getStringValue method. |
const CSS_UNKNOWN | The value is not a recognized CSS2 value. The value can only be obtained by using the cssText attribute. |
const CSS_URI | The value is a URI. The value can be obtained by using the getStringValue method. |
const CSS_VH | The value is a percentage of the full viewport height. |
const CSS_VMAX | The value is a percentage of the viewport width or height, whichever is larger. |
const CSS_VMIN | The value is a percentage of the viewport width or height, whichever is smaller. |
const CSS_VW | The value is a percentage of the full viewport width. |
See Also
- class CSSValue
- namespace Aspose.Html.Dom.Css
- assembly Aspose.HTML