User Tools

Site Tools


Sidebar

Passage markup

basics

coding

extra

list

section

whitespace

Macros

basics

colour

data structure

date and time

game state

live

maths

number

revision

saving

showing and hiding

string

styling

url

deprecated

Types of data

Special keywords

Special passage tags

harlowe:css

(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")

Rationale:

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:

harlowe/css.txt · Last modified: 2017/06/18 22:55 by l