Skip to content
Introducing StyloftCSS 0.1 / A small foundation for your next big idea. Meet the framework
Layout

Flex & rows

Wrapping rows, aligned actions, and responsive sidebar arrangements.

CSS only4 examplesKeyboard friendly HTML

Wrapping rows

Cluster is a wrapping flex row. Items stay usable when space is limited.

Live preview
DesignDevelopmentGood defaults
Explore patterns ↗
View HTML / PlaygroundHTML source
example.htmlHTML
<div class="sl-cluster sl-justify-between sl-gap-6">
  <div class="sl-cluster sl-gap-2">
    <span class="sl-badge">Design</span><span class="sl-badge">Development</span
    ><span class="sl-badge">Good defaults</span>
  </div>
  <a class="sl-btn sl-btn--outline" href="/light/layouts/">Explore patterns ↗</a>
</div>
HTML source · enable JavaScript for the playground7 lines · UTF-8

Sidebar and content

The pair stacks naturally when its minimum widths no longer fit.

Live preview

Your content, in focus.

A flexible content region beside a comfortable navigation column. No fixed pixel widths.

View HTML / PlaygroundHTML source
example.htmlHTML
<div class="sl-sidebar sl-gap-6">
  <aside class="sl-card sl-stack">
    <h3 class="sl-text-lg">On this page</h3>
    <a href="/light/getting-started/">The foundation</a
    ><a href="/light/themes/">Your palette</a>
  </aside>
  <article class="sl-card sl-stack">
    <h3 class="sl-text-xl">Your content, in focus.</h3>
    <p class="sl-text-muted">
      A flexible content region beside a comfortable navigation column. No fixed pixel
      widths.
    </p>
  </article>
</div>
HTML source · enable JavaScript for the playground14 lines · UTF-8

A row that becomes a column at 767px

Live preview
First item
Second item
See layouts
View HTML / PlaygroundHTML source
example.htmlHTML
<div class="sl-flex sl-row sl-down-767:column sl-gap-4">
  <div class="sl-card sl-grow">First item</div>
  <div class="sl-card sl-grow">Second item</div>
  <a href="/light/layouts/" class="sl-btn"
    >See layouts
    <svg
      viewBox="0 0 24 24"
      fill="none"
      stroke="currentColor"
      stroke-width="2"
      aria-hidden="true"
    >
      <path d="M5 12h14m-6-6 6 6-6 6" /></svg
  ></a>
</div>
HTML source · enable JavaScript for the playground15 lines · UTF-8

Aligned action row

Live preview

Illustrative settings action bar

View HTML / PlaygroundHTML source
example.htmlHTML
<div class="sl-card sl-cluster sl-justify-between">
  <p class="sl-help">Illustrative settings action bar</p>
  <div class="sl-cluster">
    <button type="button" class="sl-btn sl-btn--ghost">Cancel example</button
    ><button type="button" class="sl-btn sl-hover-sheen">
      Save example
      <svg
        viewBox="0 0 24 24"
        fill="none"
        stroke="currentColor"
        stroke-width="2"
        aria-hidden="true"
      >
        <path d="M5 12h14m-6-6 6 6-6 6" />
      </svg>
    </button>
  </div>
</div>
HTML source · enable JavaScript for the playground18 lines · UTF-8

Classes beginning with sl- come from StyloftCSS. Examples with demo- classes also use our optional demo extension CSS ↓. Load it after the core to reproduce those details.