Table of Contents
Utility classes
Utility classes adjust the layout in targeted ways where the block editor reaches its limits. Add them under Advanced › Additional CSS class(es). We remove a utility class once WordPress covers the same thing in core.
| Class | Effect | Typical use |
|---|---|---|
is-style-all-unset | all: unset; box-sizing: border-box; resets the element to a clean initial state | Base for custom components in block content |
is-style-expanded-click-container | position: relative; isolation: isolate; prepares a wrapper for an expanded click area | The card or list item that should become fully clickable |
is-style-expand-click-after | Stretches the first link or button over the whole container with an absolutely positioned ::after, with a focus outline on :focus-visible. Works on the link, button or label itself, or on a wrapper, where it takes the first link or button among its direct children | Fully clickable cards, keyboard focus included |
is-style-expand-click-before | The same with ::before. Use one of the two per component | When ::after is already taken |
is-style-over-expanded-click | position: relative with a z-index above the expanded click area, so the element stays clickable | A second link inside a fully clickable card |
is-style-hide-scrollbar | Hides the native scrollbar; scrolling still works | Horizontal overflow areas such as chips |
is-style-hyphens-auto | hyphens: auto with word breaking | Narrow columns, cards, long URLs |
is-style-icon | fill: currentColor; flex-shrink: 0; at 1.5rem | Inline SVGs in buttons, menus, badges |
is-style-icon-small | The same at 1.25rem | Dense interfaces, secondary actions |
is-style-overflow-clip | overflow: clip: no scrollbar, nothing visible outside | Decorative masking, tightly cropped media |
is-style-text-balance | text-wrap: balance distributes lines evenly | Multi-line headings |
is-style-text-overflow-ellipsis | One line, cut off with an ellipsis | Titles and labels that must not wrap |
is-style-visually-hidden | Hidden on screen, read by assistive technology. Does not become visible on focus | Labels for icon-only buttons, screen reader text |
is-style-flex-grow-0 | flex-grow: 0 | The item keeps its intrinsic width |
is-style-flex-grow-1 | flex-grow: 1 | The item fills the remaining space |
is-style-flex-grow-99999 | flex-grow: 99999, dominates every other item | One item takes as much space as possible |
is-style-flex-shrink-0 | flex-shrink: 0 | The item is never compressed, for example an icon |
is-style-flex-shrink-1 | flex-shrink: 1 | The default behaviour, restored |
is-style-justify-content-center | justify-content: center, flex containers only | Centre content in a row or column |
is-style-justify-items-center | justify-items: center, grid containers only | Centre grid children within their track |
is-style-order--1 | order: -1 | Move an item to the front |
is-style-order-0 is-style-order-1 is-style-order-2 is-style-order-3 is-style-order-4 is-style-order-5 is-style-order-6 is-style-order-7 is-style-order-8 is-style-order-9 | order: 0 to order: 9 | Reorder items manually |
is-style-count-up | No styling: a hook for the JavaScript, which counts the number up once when it enters the viewport. The text has to be a whole number without separators, optionally followed by a suffix such as % or + | Figures in the counting facts pattern |
Sliders
The sliders use Swiper, bundled locally. The slider patterns come prepared; when you build your own, these classes must be present:
| Class | Role |
|---|---|
.swiper | On a parent of the slider wrapper; initialises the slider |
.swiper-wrapper | The direct parent of the moving items |
.swiper-slide | Each moving item; added automatically |
.swiper-button-prev button, .swiper-button-next button | The previous and next buttons |
The number of visible slides changes at 500, 700 and 900px.
Class names the JavaScript relies on
The modules of the Custom theme select on fixed names. Renaming one of them in a pattern silently switches the behaviour off.
| Behaviour | Required hooks |
|---|---|
| Slider | .swiper > .swiper-wrapper, .swiper-button-prev button, .swiper-button-next button |
| Tabs (hash for the open tab) | .wp-block-tabs .wp-block-tab-list, button[aria-controls]: the panel ID goes into location.hash; reading it back is the core block’s own job |
| Term filter | .filter-container around the filterable area, .item per entry, .filter-term inside an item for the text that is filtered on |
| Counting numbers | .is-style-count-up |
| Table of contents | #toc-box for the list, #toc-content for the h2 headings it reads; [data-toc-container], [data-toc-current] |
| Header | .header on the root group, next to its variant, e.g. .header-2. .header__menu on the menu’s Disclosure, whose Breakpoint switches between the small and large layout; Header 8 opens its menu in a modal dialog and has neither. A class starting with header__nav- gives a Navigation block the theme’s sub-menu icons |
| Collapsible footer navigation | .navigation-container--is-collapsible around a .navigation-title paragraph and the menu |
| Share and print | #kbButtonShare and #kbButtonPrint on the button wrappers; the script uses the link inside |
| Back to top | .back-to-top |
The table of contents lists every h2 heading inside #toc-content that has an ID. WordPress assigns IDs to headings automatically; remove a heading’s ID to leave it out.