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

Hover & motion

Small CSS enhancements that respect the user’s motion preferences.

CSS only9 examplesKeyboard friendly HTML

Lift on interaction

Hover with a pointer or Tab to the link. Motion is a website extension, not part of the core.

Live preview
Hover or focus

A subtle lift.

A little feedback can make a surface feel more responsive.

Explore cards ↗
View HTML / PlaygroundHTML source
example.htmlHTML
<div class="sl-grid sl-md:cols-2 sl-gap-6">
  <article class="sl-card sl-stack demo-lift">
    <span class="sl-badge">Hover or focus</span>
    <h3 class="sl-text-xl">A subtle lift.</h3>
    <p class="sl-text-muted">
      A little feedback can make a surface feel more responsive.
    </p>
    <a href="/light/components/cards/">Explore cards ↗</a>
  </article>
  <article class="sl-card sl-stack demo-glow">
    <span class="sl-badge">Hover or focus</span>
    <h3 class="sl-text-xl">A quiet glow.</h3>
    <p class="sl-text-muted">A border and shadow shift, with no moving content.</p>
    <a href="/light/themes/">Explore the palette ↗</a>
  </article>
</div>
HTML source · enable JavaScript for the playground16 lines · UTF-8

An expressive link

Live preview

Follow your next idea.

Make something thoughtful

A keyboard focus ring remains visible throughout.

View HTML / PlaygroundHTML source
example.htmlHTML
<div class="sl-stack demo-narrow">
  <h3 class="sl-text-xl">Follow your next idea.</h3>
  <a class="demo-animated-link" href="/light/getting-started/"
    >Make something thoughtful <span aria-hidden="true">→</span></a
  >
  <p class="sl-help">A keyboard focus ring remains visible throughout.</p>
</div>
HTML source · enable JavaScript for the playground7 lines · UTF-8

Reveal as you scroll

Scroll this page to reveal the cards. Supported browsers use native CSS view timelines; other browsers show the content normally.

Live preview
Scroll reveal

A gentle entrance.

Opacity and vertical movement follow this card entering the viewport.

CSS only

Nothing to initialize.

Content stays visible if view timelines are unsupported or reduced motion is enabled.

View HTML / PlaygroundHTML source
example.htmlHTML
<div class="sl-grid sl-md:cols-2 sl-gap-6">
  <article class="sl-card sl-stack demo-scroll-reveal">
    <span class="sl-badge">Scroll reveal</span>
    <h3 class="sl-text-xl">A gentle entrance.</h3>
    <p class="sl-text-muted">
      Opacity and vertical movement follow this card entering the viewport.
    </p>
  </article>
  <article class="sl-card sl-stack demo-scroll-reveal">
    <span class="sl-badge">CSS only</span>
    <h3 class="sl-text-xl">Nothing to initialize.</h3>
    <p class="sl-text-muted">
      Content stays visible if view timelines are unsupported or reduced motion is
      enabled.
    </p>
  </article>
</div>
HTML source · enable JavaScript for the playground17 lines · UTF-8

Reusable reveal primitives

Live preview
View HTML / PlaygroundHTML source
example.htmlHTML
<div class="sl-grid sl-md:cols-2 sl-gap-6">
  <article class="sl-card sl-stack sl-reveal-left">
    <h3 class="sl-text-xl">Slide in.</h3>
    <p class="sl-text-muted">Use sl-reveal-left for an entry from the inline edge.</p>
    <a href="/light/getting-started/">Explore the guide ↗</a>
  </article>
  <article class="sl-card sl-stack sl-reveal-scale">
    <h3 class="sl-text-xl">Scale into view.</h3>
    <p class="sl-text-muted">A small, bounded scale effect.</p>
    <a href="/light/getting-started/">Explore the guide ↗</a>
  </article>
</div>
HTML source · enable JavaScript for the playground12 lines · UTF-8

Staggered cards

Set --sl-i to sequence siblings as they enter the viewport.

Live preview

Structure

An indexed CSS reveal.

Expression

An indexed CSS reveal.

Possibility

An indexed CSS reveal.

View HTML / PlaygroundHTML source
example.htmlHTML
<div class="sl-grid sl-md:cols-3 sl-gap-4 sl-stagger">
  <article class="sl-card sl-stack" style="--sl-i: 0">
    <h3 class="sl-text-lg">Structure</h3>
    <p class="sl-text-muted">An indexed CSS reveal.</p>
  </article>
  <article class="sl-card sl-stack" style="--sl-i: 1">
    <h3 class="sl-text-lg">Expression</h3>
    <p class="sl-text-muted">An indexed CSS reveal.</p>
  </article>
  <article class="sl-card sl-stack" style="--sl-i: 2">
    <h3 class="sl-text-lg">Possibility</h3>
    <p class="sl-text-muted">An indexed CSS reveal.</p>
  </article>
</div>
HTML source · enable JavaScript for the playground14 lines · UTF-8

Masked text reveal

Live preview

Let the next chapter unfold.

Native view timelines reveal the heading as it enters the viewport.

View HTML / PlaygroundHTML source
example.htmlHTML
<div class="sl-stack">
  <h3 class="sl-text-xl sl-reveal-text">Let the next chapter unfold.</h3>
  <p>Native view timelines reveal the heading as it enters the viewport.</p>
</div>
HTML source · enable JavaScript for the playground4 lines · UTF-8

Split words and characters

Live preview

View HTML / PlaygroundHTML source
example.htmlHTML
<div class="sl-stack sl-gap-8">
  <h3 class="sl-text-xl sl-split" aria-label="Build something thoughtful">
    <span class="sl-word" aria-hidden="true" style="--sl-i: 0">Build</span>
    <span class="sl-word" aria-hidden="true" style="--sl-i: 1">something</span>
    <span class="sl-word" aria-hidden="true" style="--sl-i: 2">thoughtful</span>
  </h3>
  <h3 class="sl-text-xl sl-split" aria-label="Create freely">
    <span class="sl-word" aria-hidden="true" style="--sl-i: 0"
      ><span class="sl-char" style="--sl-i: 1">C</span
      ><span class="sl-char" style="--sl-i: 2">r</span
      ><span class="sl-char" style="--sl-i: 3">e</span
      ><span class="sl-char" style="--sl-i: 4">a</span
      ><span class="sl-char" style="--sl-i: 5">t</span
      ><span class="sl-char" style="--sl-i: 6">e</span></span
    >
    <span class="sl-word" aria-hidden="true" style="--sl-i: 7"
      ><span class="sl-char" style="--sl-i: 8">f</span
      ><span class="sl-char" style="--sl-i: 9">r</span
      ><span class="sl-char" style="--sl-i: 10">e</span
      ><span class="sl-char" style="--sl-i: 11">e</span
      ><span class="sl-char" style="--sl-i: 12">l</span
      ><span class="sl-char" style="--sl-i: 13">y</span></span
    >
  </h3>
</div>
HTML source · enable JavaScript for the playground25 lines · UTF-8

Sticky scroll scene

A prebuilt CSS scene with a sticky visual, scroll-progress line and parallax. On phones it becomes an ordinary stacked layout.

Live preview
CSS scene

A new perspective.

Sticky positioning and native timelines; no GSAP or runtime JavaScript.

01

Start with structure

Scroll to move through this scene. Content stays readable without animation support.

02

Add your expression

Scroll to move through this scene. Content stays readable without animation support.

03

Make it yours

Scroll to move through this scene. Content stays readable without animation support.

View HTML / PlaygroundHTML source
example.htmlHTML
<section class="sl-scene">
  <div class="sl-scene__visual sl-stack">
    <span class="sl-badge">CSS scene</span>
    <h3 class="sl-text-xl sl-parallax">A new perspective.</h3>
    <div class="sl-scroll-progress" aria-hidden="true"></div>
    <p>Sticky positioning and native timelines; no GSAP or runtime JavaScript.</p>
  </div>
  <div>
    <article class="sl-scene__step sl-reveal">
      <span class="sl-badge">01</span>
      <h3 class="sl-text-xl sl-my-4">Start with structure</h3>
      <p class="sl-text-muted">
        Scroll to move through this scene. Content stays readable without animation
        support.
      </p>
    </article>
    <article class="sl-scene__step sl-reveal">
      <span class="sl-badge">02</span>
      <h3 class="sl-text-xl sl-my-4">Add your expression</h3>
      <p class="sl-text-muted">
        Scroll to move through this scene. Content stays readable without animation
        support.
      </p>
    </article>
    <article class="sl-scene__step sl-reveal">
      <span class="sl-badge">03</span>
      <h3 class="sl-text-xl sl-my-4">Make it yours</h3>
      <p class="sl-text-muted">
        Scroll to move through this scene. Content stays readable without animation
        support.
      </p>
    </article>
  </div>
</section>
HTML source · enable JavaScript for the playground34 lines · UTF-8

Keyboard-friendly card interactions

Live preview
View HTML / PlaygroundHTML source
example.htmlHTML
<div class="sl-grid sl-md:cols-2 sl-gap-6">
  <article class="sl-card sl-stack sl-hover-tilt">
    <h3 class="sl-text-xl">A touch of tilt.</h3>
    <p class="sl-text-muted">
      Focus the link to try the same effect without a pointer.
    </p>
    <a href="/light/getting-started/">Explore the guide ↗</a>
  </article>
  <article class="sl-card sl-stack sl-hover-glow">
    <h3 class="sl-text-xl">A gentle glow.</h3>
    <p class="sl-text-muted">A shared motion token, without a runtime library.</p>
    <a href="/light/getting-started/">Explore the guide ↗</a>
  </article>
</div>
HTML source · enable JavaScript for the playground14 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.