InlineStyle helper class.
This is the declarative builder of an inline style using PostCSS. The output string by toString()
is sanitized unexpected declarations.
- Source
Methods
delete(prop) → {InlineStyle}
Delete declaration.
Parameters:
Name | Type | Description |
---|---|---|
prop | string | A property name of declaration. |
- Source
Returns:
Returns myself for chaining methods.
- Type:
- InlineStyle
set(prop, value) → {InlineStyle}
Set declaration.
Parameters:
Name | Type | Description |
---|---|---|
prop | string | A property name of declaration. |
value | string | A value of declaration. |
- Source
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.
- Source
(inner) constructor(initialDeclsopt)
Create an InlineStyle instance.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
initialDecls | Object | | <optional> | The initial declarations. |
- Source