bub·ble
/ˈbʌb.əl/ n., component. Dict. 01[ orig. a marginal blurb in broadsheet, lifted free of the page and given breath ]
- 1. A note that rises from the page as its passage meets the eye, lingers while it is read, and withdraws as the eye travels on.
- 2. Being dismissed, it folds to a small pill by which it may be recalled; or dev. departs once, and for good.
- 3. typog. Set as plain prose, it stays legible though all motion be stilled — nothing of the sense is lost.
- 4. chameleon. It wears the livery of whatever page holds it, wanting only a few
--bubble-*tokens changed.
The plainest placement: the note keeps its place in the column and simply appears as it reaches the middle of the leaf. The little tail points back up at the matter it glosses.
Scroll it to the centre of the page — it arrives. Scroll on — it withdraws. Dismiss it — it folds to a recall pill.
Given data-bubble-place="beside" and an anchor, the note issues from
that figure — inheriting its accent — and, on a narrow leaf, stacks politely
beneath rather than running into the margin.
Set data-bubble-dismiss="once" for a remark the reader oughtn't have
to keep closing. The × dismisses it for good — for this sitting. Nothing is
kept; a fresh reading brings every note back.
Every surface, ink, rule, face and accent reads from a token that falls back to the shared set. Change a handful — here, a gilt-on-board livery — and the note re-dresses itself without a word of its behaviour altered.
The same component as Plate I — only its --bubble-* tokens differ.
Two files — bubble.css in the head, bubble.js
after your own scripts — then set the markup. It self-initializes, supplies the × and
the recall pill, and wires the scroll. No build, no dependencies.
<link rel="stylesheet" href="bubble.css">
<div class="bubble" data-bubble
data-bubble-place="in-flow" in-flow | beside | corner
data-bubble-dismiss="recall" recall | once
data-bubble-anchor="#some-element" optional: element to pop from
data-bubble-label="Short label"> shown on the recall pill
<p>The description, as normal prose.</p>
</div>
<script src="bubble.js"></script>
| attribute | values | default | sense |
|---|---|---|---|
| data-bubble | — | — | marks the element as a bubble. required. |
| data-bubble-place | in-flow · beside · corner | in-flow | in the column, or fixed off an anchor. |
| data-bubble-dismiss | recall · once | recall | fold to a recall pill, or depart for the sitting. |
| data-bubble-anchor | selector | self | the element it issues from / reveals with. |
| data-bubble-label | text | Note | the word on the recall pill. |
Re-dress it by overriding the --bubble-* tokens on the bubble
or any ancestor. Its state is of the sitting only — nothing is written down.