CssNumericValue Class
A numeric value: a <number>, a <percentage>, a <dimension> or a math expression (https://drafts.css-houdini.org/css-typed-om-1/#cssnumericvalue).
public abstract class CssNumericValue : CssStyleValue- Inheritance
CssStyleValueCssNumericValue
Methods
| Name | Description |
|---|---|
| Add(ReadOnlySpan<CssNumberish>) | https://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-add |
| Div(ReadOnlySpan<CssNumberish>) | https://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-div |
| Max(ReadOnlySpan<CssNumberish>) | https://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-max |
| Min(ReadOnlySpan<CssNumberish>) | https://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-min |
| Mul(ReadOnlySpan<CssNumberish>) | https://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-mul |
| NumericEquals(ReadOnlySpan<CssNumberish>) | Returns whether the values are equal numeric values to this value (https://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-equals): the same classes, units and values, in the same order. |
| Parse(string) | Parses a numeric value (https://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-parse). |
| Sub(ReadOnlySpan<CssNumberish>) | https://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-sub |
| To(string) | Converts the value to a unit (https://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-to). |
| ToSum(ReadOnlySpan<string>) | Converts the value to a sum of values of the units (https://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-tosum). |
| Type() | Returns the type of the value (https://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-type). |
Add(ReadOnlySpan<CssNumberish>)
CssNumericValue.cshttps://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-add
public CssNumericValue Add(params scoped ReadOnlySpan<CssNumberish> values)Div(ReadOnlySpan<CssNumberish>)
CssNumericValue.cshttps://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-div
public CssNumericValue Div(params scoped ReadOnlySpan<CssNumberish> values)Max(ReadOnlySpan<CssNumberish>)
CssNumericValue.cshttps://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-max
public CssNumericValue Max(params scoped ReadOnlySpan<CssNumberish> values)Min(ReadOnlySpan<CssNumberish>)
CssNumericValue.cshttps://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-min
public CssNumericValue Min(params scoped ReadOnlySpan<CssNumberish> values)Mul(ReadOnlySpan<CssNumberish>)
CssNumericValue.cshttps://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-mul
public CssNumericValue Mul(params scoped ReadOnlySpan<CssNumberish> values)NumericEquals(ReadOnlySpan<CssNumberish>)
CssNumericValue.csReturns whether the values are equal numeric values to this value (https://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-equals): the same classes, units and values, in the same order.
public bool NumericEquals(params scoped ReadOnlySpan<CssNumberish> value)Parameters
Returns
See also
Parse(string)
CssNumericValue.csParses a numeric value (https://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-parse).
public static CssNumericValue Parse(string cssText)Sub(ReadOnlySpan<CssNumberish>)
CssNumericValue.cshttps://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-sub
public CssNumericValue Sub(params scoped ReadOnlySpan<CssNumberish> values)To(string)
CssNumericValue.csConverts the value to a unit (https://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-to).
public CssUnitValue To(string unit)ToSum(ReadOnlySpan<string>)
CssNumericValue.csConverts the value to a sum of values of the units (https://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-tosum).
public CssMathSum ToSum(params scoped ReadOnlySpan<string> units)Type()
CssNumericValue.csReturns the type of the value (https://drafts.css-houdini.org/css-typed-om-1/#dom-cssnumericvalue-type).
public CssNumericType Type()