PropertyDefinition Class

The definition of a custom property registered by Css.RegisterProperty (https://drafts.css-houdini.org/css-properties-values-api/#dictdef-propertydefinition).

public sealed class PropertyDefinition

Constructors

NameDescription
PropertyDefinition()

PropertyDefinition()

PropertyDefinition.cs
  • Obsolete: Constructors of types with required members are not supported in this version of your compiler.
[Obsolete("Constructors of types with required members are not supported in this version of your compiler.", true)]
public PropertyDefinition()

No documentation is available.

Properties

NameDescription
InheritsGets a value indicating whether the custom property inherits its value from its parent.
InitialValueThe initial value, required unless the syntax is "*". It must be computationally independent (e.g. 10px, but not 1em or var(--x)).
NameThe name of the custom property (e.g. "--my-color").
SyntaxThe syntax of the values (e.g. "<color>" or "<length>+ | auto"), "*" for any value.

Gets a value indicating whether the custom property inherits its value from its parent.

public bool Inherits { get; init; }

The initial value, required unless the syntax is "*". It must be computationally independent (e.g. 10px, but not 1em or var(--x)).

public string? InitialValue { get; init; }

The name of the custom property (e.g. "--my-color").

public required string Name { get; init; }

The syntax of the values (e.g. "<color>" or "<length>+ | auto"), "*" for any value.

public string Syntax { get; init; }