helpers/inline_style#

InlineStyle helper class.

This is the declarative builder of an inline style using PostCSS. The output string by toString() is sanitized unexpected declarations.

Methods#

delete(prop) → {InlineStyle}#

Delete declaration.

Parameters:
NameTypeDescription
propstring

A property name of declaration.

Returns:

Returns myself for chaining methods.

Type: 
InlineStyle

set(prop, value) → {InlineStyle}#

Set declaration.

Parameters:
NameTypeDescription
propstring

A property name of declaration.

valuestring

A value of declaration.

Returns:

Returns myself for chaining methods.

Type: 
InlineStyle

toString()#

Build a string of declarations for the inline style.

The unexpected declarations will strip to prevent a style injection.

(inner) constructor(initialDeclsopt)#

Create an InlineStyle instance.

Parameters:
NameTypeAttributesDescription
initialDeclsObject | String | InlineStyle<optional>

The initial declarations.