Some words need a short explanation, but not every reader wants one. Mark a word in any text and write what it means. A reader clicks or taps the word and sees the explanation in a small panel. Everyone else reads on.
Explain a word
Select the word in your text.
Open the small arrow in the text toolbar and choose Define term.
Under What does this word mean?, write the explanation, then press Save.
The word gets a dotted line under it, so readers can see that it opens. To change the explanation, select the word and choose Define term again. Remove takes it away.
What a reader does
- Click or tap the word to open the panel.
- From the keyboard, press Tab to reach the word and Enter to open the panel.
- Press Escape to close it.
It needs no script on the page.
Keep your words in one list
With Gillish Core you can keep one list of words and explanations for the whole site, under Gillish → Word list. Keep a word list shows how.
In Define term, pick the word under Use a word from your list. If the list has the word you selected, it is picked for you.
- When you change the explanation in the list, it changes everywhere the word is marked.
- If you write in the explanation field, the text becomes your own and no longer follows the list.
- Each marked word keeps a copy of its explanation. Readers still see it if you delete the word from the list or switch off Gillish Core.
Without Gillish Core there is no list, and you write each explanation by hand.
With Gillish Core you can also choose the panel’s colours, under Gillish → Word list in How an explanation looks: a panel colour, a text colour and an edge colour for light pages, and if you like also for dark pages and for high contrast. The panel uses the dark colours when the page under the word is dark, and the high-contrast colours when a visitor’s device asks for more contrast. Keep Use the theme’s colours and the panel follows your theme The design of your whole site: its fonts, colours and where the menu and footer go. You pick it under Appearance, then Themes.. The same colours are used for the notes of the Footnotes block A piece of a page, such as a paragraph, a picture or a button. In WordPress you build a page by putting blocks one after another.. Keep a word list shows how.
For developers: the panel takes four CSS custom properties, set on :root or any element around the text: --cairn-term-bg (background), --cairn-term-text (text colour), --cairn-term-border (the whole border, for example 1px solid #0C6E78) and --cairn-term-shadow (a box-shadow value, or none). Without them the panel takes its colours from the theme: the background around the word with 12% of the text colour mixed in, a border in the text colour, and near-black or near-white text. The colours chosen in Gillish Core arrive at no weight, so the four properties still win over them. A theme with its own mode switch can put data-gillish-mode="dark" or data-gillish-mode="contrast" on the <html> element to use the dark or high-contrast colours.
Good to know
- A word inside a link or a button stays plain text, because a reader could not press both.
Next, read Add a note to a word.