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.

Source:
Parameters:
Name Type Description
prop string

A property name of declaration.

Returns:
Type:
InlineStyle

Returns myself for chaining methods.

set(prop, value) → {InlineStyle}

Set declaration.

Source:
Parameters:
Name Type Description
prop string

A property name of declaration.

value string

A value of declaration.

Returns:
Type:
InlineStyle

Returns myself for chaining methods.

toString()

Build a string of declarations for the inline style.

The unexpected declarations will strip to prevent a style injection.

Source:

(inner) constructor(initialDeclsopt)

Create an InlineStyle instance.

Source:
Parameters:
Name Type Attributes Description
initialDecls Object | String | InlineStyle <optional>

The initial declarations.