Etch component
Step Item 1
One step of MAC Steps 1: a number, a title, a short text and an optional photo. The number comes from the step's place in the list.
Documentation
One step of MAC Steps 1: a number, a title, a short text, an optional photo and optional facts. The number comes from the step's place in the list.
How to use it
- Put it in MAC Steps 1's Items, one for each step, and fill Title and Text.
- Pick an Image only when every step has a photo.
- Add Facts for what a client should know at that step, such as What happens, Your part and What comes out: a Label and a short Text for each. Leave it empty for none.
- Title Tag: h3 under a section's h2, h2 when the steps are the page's main sections.
Good to know
- The number isn't typed: it follows the step's place. Screen readers don't hear it, since the list already tells them.
- The number sits beside the title, white in a circle on the primary color.
- The Text is plain: a link typed in it shows as code.
- The facts never wrap two and one: they're all in a row, or all one under the other. They go one under the other at the site's
--mac-lbreakpoint (992px by default), set once for the whole site in Etch's Custom Media Definitions. --mac-step-item-1-fact-min-width(256px by default) is the narrowest a fact gets in the row: in a narrower step, such as one of Steps 1's row of four, or with more facts, they go one under the other sooner.
CSS recipes
The CSS variables set the photo's shape and the facts' narrowest width. The number has none: a recipe restyles it by its class. A recipe changes every step on the site: paste it in the site's main stylesheet, which Etch prints after the components' styles.
A circle with a 1px outline
For a quieter number: the circle drawn in the primary, on the section's ground.
/* A circle with a 1px outline */
.mac-steps-1 .mac-step-item-1 .mac-step-item-1__number {
background: transparent;
color: var(--primary);
border: 1px solid currentColor;
}
The number alone, larger
For steps that read as a sequence without a badge.
/* The number alone, larger */
.mac-steps-1 .mac-step-item-1 .mac-step-item-1__number {
inline-size: auto;
block-size: auto;
background: transparent;
color: var(--primary);
font-size: var(--text-l);
}