Skip to main content
PimentCSS v1.0.1, what's new
Home

Dividers

Horizontal rules and vertical keylines for section separation.

Styles live in scss/components/_keyline.scss. Dividers separate content with border-primary at 1, 2, or 4 px. Use a native <hr> for thematic breaks, or a <div class="keyline"> when you need a non-semantic separator in flex layouts.

HR (horizontal rule)

Classes .hr or .keyline on <hr>. Default thickness is 1 px; add .hr--2 or .hr--4 for heavier lines.

Border 1px (default)
Border 2px
Border 4px

Keyline (div)

Same visuals on a <div>. Mark decorative lines aria-hidden="true" when nearby headings or labels already convey structure.

Border 1px (default)
Border 2px
Border 4px

In context

Prefer <hr> between sections of prose so assistive tech can announce a thematic break. Avoid stacking multiple adjacent rules.

Section one

Introductory copy before the break.


Section two

Content after a semantic horizontal rule.

Tab bars reuse the same 1px token via .tabs__separator (see Tabs).

Class reference

ClassDescription
.keyline / .hrHorizontal rule (1px border-primary)
.keyline--2 / .hr--22px top border
.keyline--4 / .hr--44px top border

Customize (Sass)

  1. Keyline width

    Override max-width when dividers should span the full content column.
    @use "pimentcss-design-system" with (
      $keyline-max-width: 100%
    );
  2. Rebuild CSS

    Run after editing _keyline.scss.
    npm run build:css

Accessibility (RGAA / WCAG)

Dividers

  • Semantic breaks, use <hr> between thematic sections; do not replace headings.
  • Decorative lines, on <div class="keyline"> use role="separator" and aria-hidden="true" when structure is already exposed.
  • Contrast, lines use --border-primary; verify on tinted backgrounds in your theme.
  • Density, avoid multiple consecutive rules; one divider per logical break is enough.

Next steps