StylePropertyMap Class

The declarations of a style rule or of the style attribute of an element (https://drafts.css-houdini.org/css-typed-om-1/#declared-stylepropertymap-objects), as CssStyleValue objects. Setting a value updates the declarations.

public sealed class StylePropertyMap : StylePropertyMapReadOnly
Inheritance
StylePropertyMapReadOnly StylePropertyMap

Methods

NameDescription
Append(string, ReadOnlySpan<CssStyleValueOrString>)Appends values to a list-valued property (https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-append).
Clear()Removes all the declarations (https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-clear).
Delete(string)Removes a property (https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-delete); removing a shorthand removes its longhands.
Set(string, ReadOnlySpan<CssStyleValueOrString>)Sets the value of a property (https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set).

Append(string, ReadOnlySpan<CssStyleValueOrString>)

StylePropertyMap.cs

Appends values to a list-valued property (https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-append).

public void Append(string property, params scoped ReadOnlySpan<CssStyleValueOrString> values)

Removes all the declarations (https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-clear).

public void Clear()

Delete(string)

StylePropertyMap.cs

Removes a property (https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-delete); removing a shorthand removes its longhands.

public void Delete(string property)

Set(string, ReadOnlySpan<CssStyleValueOrString>)

StylePropertyMap.cs

Sets the value of a property (https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set).

public void Set(string property, params scoped ReadOnlySpan<CssStyleValueOrString> values)