(css: String) → Changer

This takes a string of inline CSS, and applies it to the hook, as if it were a HTML “style” property.

Usage example:

(css: "background-color:indigo")


The built-in macros for layout and styling hooks, such as (text-style:), are powerful and geared toward ease-of-use, but do not entirely provide comprehensive access to the browser's styling. This Changer macro allows extended styling, using inline CSS, to be applied to hooks.

This is, however, intended solely as a “macro of last resort” - as it requires basic knowledge of CSS - a separate language distinct from Harlowe - to use, and requires it be provided a single inert string, it's not as accommodating as the other such macros.

See also: