helpers/inline_style
Source: inline_style.js:12
InlineStyle helper class.
This is the declarative builder of an inline style using PostCSS. The output string by toString() is sanitized unexpected declarations.
Alias: module:helpers/inline_style
Instance Methods
constructor(initialDecls?: Object | String | InlineStyle)
Create an InlineStyle instance.
Parameters
initialDecls(Object | String | InlineStyle, optional) — The initial declarations.
delete(prop: string): InlineStyle
Delete declaration.
Parameters
prop(string) — A property name of declaration.
Returns
InlineStyle— Returns myself for chaining methods.
set(prop: string, value: string): InlineStyle
Set declaration.
Parameters
prop(string) — A property name of declaration.value(string) — A value of declaration.
Returns
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.