Search


Conjunctions (and/or) - documentation

Purpose

Use the conjunction (and/or) design to clearly demonstrate that there are options or that there are content blocks that are complementary or associated.

This is a mobile first design, and requires extra code for it to go from stacked to side-by-side in larger resolutions (similar to grids).

Usage

"Or" design

  • Use to clearly demonstrate there are options
  • Use to make the options, and number of options, easily scannable
  • Use to ensure a user can easily identify which block of content applies to them so they don't spend time reading unneccessary content, before they see the next option (which is the default experience when content is stacked vertically)

"And" design

This design has limited use as headings don't typically bridge and connect to each other.

When necessary:

  • Use it to clearly demonstrate there are content blocks that are complementary or associated

Working examples

Evaluation and report

Accessibility guidance

Most screen readers can read CSS text these days, but it's still good practice to use text to convey that the options are either mutually exclusive (or), or part of an entire concept (and).

Some recommendations are:

How to implement

List element

"Or" design

<p>Lead in statement</p>
    <ul class="cnjnctn-type-or">
        <li class="cnjnctn-col">
            ...
        </li>
        <li class="cnjnctn-col">
            ...
        </li>
    </ul>

"And" design

<p>Lead in statement</p>
   <ul class="cnjnctn-type-and">
        <li class="cnjnctn-col">
            ...
        </li>
        <li class="cnjnctn-col">
            ...
        </li>
    </ul>

Block element (e.g. <div>)

"Or" design

<div class="cnjnctn-type-or">
        <div class="cnjnctn-col">
            ...
        </div>
        <div class="cnjnctn-col">
            ...
        </div>
    </div>

"And" design

<div class="cnjnctn-type-and">
        <div class="cnjnctn-col">
            ...
        </div>
        <div class="cnjnctn-col">
            ...
        </div>
    </div>

Configuration options

Side-by-side design at certain resolution points

Add these classes to the element with the cnjnctn-type-or or cnjnctn-type-and class.

Only use the "always side-by-side" class (cnjnctn-xs) sparingly and when there is very little text. The design may not scale down well to smaller devices.

Custom column widths

A column can be set to a percentage of itself to allow larger content in another column to wrap less. The default is 100% (cnjnctn-col).

Only apply to a column that have less content than others, as the class reduces the width of a column, and the column that does not have the custom width class will expand to compensate.

This class can be applied to more than one column (e.g. if 1 column out of 3 has more content than the other 2).

The width cannot be adjusted based on different resolutions, and it best to stack the columns when content becomes difficult to read on smaller devices.

List of classes for custom column widths
Class name With of column compared to default (in percentage)
cnjnctn-col 100% (Default)
cnjnctn-col-90 90%
cnjnctn-col-80 80%
cnjnctn-col-75 75%
cnjnctn-col-70 70%
cnjnctn-col-60 60%
cnjnctn-col-50 50%
cnjnctn-col-40 40%
cnjnctn-col-30 30%
cnjnctn-col-25 25%
cnjnctn-col-20 20%

These class names are mutually exclusive, so you only use one of them when defining your column width.

No left border on stacked

This can be used when a design (e.g. zebra striping, panel, well, etc.) already has a defined border. The line that splits the column will disappear when the items are stacked.

To remove the border when stacked, add the class brdr-0 to the element with the cnjnctn-type-or or cnjnctn-type-and class.

The border should not be removed if there is sibling (surrounding) information contained within the existing bordered design that does not relate to the conjunction (and/or) design. It may be unclear when the conjunction point has started or ended.

Source code

Source code for the conjunction plugin on GitHub

Page details

Date modified: