惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Vercel News
Vercel News
F
Fortinet All Blogs
月光博客
月光博客
G
Google Developers Blog
博客园 - Franky
GbyAI
GbyAI
The Cloudflare Blog
I
InfoQ
雷峰网
雷峰网
WordPress大学
WordPress大学
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
T
The Blog of Author Tim Ferriss
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
小众软件
小众软件
腾讯CDC
B
Blog
量子位
V
V2EX
S
SegmentFault 最新的问题
Google DeepMind News
Google DeepMind News

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - ulrischa/vanilla-scroll-sky: A lightweight, Java...
ulrischa · 2026-05-07 · via Hacker News: Show HN
AISelect_20260506_215346_Chrome

A pure CSS scrollytelling utility for sticky image reveals and moving captions.

Vanilla Scroll Sky uses normal HTML, CSS classes, CSS Custom Properties, CSS Cascade Layers, @scope, container queries, position: sticky, and CSS scroll-driven animations.

No JavaScript. No Web Components. No framework.

Status

Vanilla Scroll Sky targets modern browsers.

The sticky layout remains readable without scroll-driven animations. If animation-timeline: view() is not supported, images and captions are shown without transform animations.

Features

  • Pure CSS
  • No JavaScript
  • No framework
  • Sticky image stage
  • Scroll-driven image reveal
  • Optional moving caption
  • Per-instance configuration with CSS Custom Properties
  • Scoped component styles with @scope
  • Cascade organization with @layer
  • Container query hook with a named container
  • Reduced-motion handling
  • Fallback for missing scroll-driven animations

Installation

Copy src/vanilla-scroll-sky.css into your project and include it:

<link rel="stylesheet" href="/assets/css/vanilla-scroll-sky.css">

If your site already uses Cascade Layers, import it into your components layer:

@layer base, components, utilities;

@import url("/assets/css/vanilla-scroll-sky.css") layer(components);

Basic markup

<section class="vss vss--image-left">
  <div class="vss__image">
    <img src="image.jpg" alt="Description of the image">
  </div>

  <div class="vss__caption">
    <h2>Caption heading</h2>
    <p>This text scrolls over the sticky image.</p>
  </div>
</section>

If there is no caption, omit the caption element:

<section class="vss vss--image-right">
  <div class="vss__image">
    <img src="image.jpg" alt="Description of the image">
  </div>
</section>

Image reveal classes

Use one of these classes on the .vss element:

vss--image-left
vss--image-right
vss--image-top
vss--image-bottom
vss--image-none

Example:

<section class="vss vss--image-left">

Caption motion classes

Use one of these classes on the .vss element:

vss--caption-left-center
vss--caption-right-center
vss--caption-left-right
vss--caption-right-left

Recommended readable options:

vss--caption-left-center
vss--caption-right-center

Stronger pass-through options:

vss--caption-left-right
vss--caption-right-left

Use pass-through motion mainly for short captions, labels, or visual emphasis.

Per-instance configuration

Set CSS Custom Properties on the .vss element:

<section
  class="vss vss--image-bottom vss--caption-left-center"
  style="
    --vss-image-stick-top: 4.5rem;
    --vss-image-height: 62svh;
    --vss-scene-duration: 220svh;
    --vss-caption-delay: 36svh;
    --vss-caption-motion-distance: 80vw;
  "
>

Custom properties

Timing and layout

--vss-scene-duration
--vss-caption-delay
--vss-scene-exit-space
--vss-image-stick-top
--vss-image-height

Image reveal

--vss-image-start-offset
--vss-image-start-scale
--vss-image-fit
--vss-image-position

Caption

--vss-caption-motion-distance
--vss-caption-max-width
--vss-caption-padding

Defaults

.vss {
  --vss-scene-duration: 220svh;
  --vss-caption-delay: 40svh;
  --vss-caption-motion-distance: 80vw;
  --vss-image-stick-top: 0;
  --vss-image-height: 66svh;
  --vss-image-start-offset: 4rem;
  --vss-image-start-scale: .96;
  --vss-scene-exit-space: 55svh;
  --vss-caption-max-width: 52rem;
  --vss-caption-padding: clamp(1.5rem, 4vw, 3rem);
  --vss-image-fit: cover;
  --vss-image-position: center;
}

Strong image reveal

To make an image appear strongly from the left:

<section
  class="vss vss--image-left"
  style="--vss-image-start-offset: 100vw;"
>

Subtle caption motion

<section
  class="vss vss--caption-right-center"
  style="--vss-caption-motion-distance: 6rem;"
>

Image fitting

<section
  class="vss vss--image-right"
  style="--vss-image-fit: contain;"
>

For wide images where the important content is on the left:

<section
  class="vss vss--image-left"
  style="--vss-image-position: left top;"
>

CSS functions

Custom properties can use normal CSS values and functions:

<section
  class="vss vss--image-bottom vss--caption-left-center"
  style="
    --vss-image-height: clamp(28rem, 65svh, 44rem);
    --vss-scene-duration: calc(190svh + 20rem);
    --vss-caption-delay: clamp(18rem, 35svh, 32rem);
    --vss-caption-motion-distance: clamp(8rem, 40vw, 34rem);
  "
>

Accessibility

Use meaningful alternative text when the image is part of the story:

<img src="image.jpg" alt="A precise description of the image">

If the image is decorative, use an empty alt attribute:

<img src="texture.jpg" alt="">

The caption is regular page HTML. Use semantic headings, paragraphs, links, and lists.

Reduced motion

Vanilla Scroll Sky respects the user's reduced-motion preference.

When prefers-reduced-motion: reduce is active:

  • image transform animation is disabled
  • caption transform animation is disabled
  • the sticky layout still works
  • the content remains readable

Browser behavior

The sticky layout uses position: sticky.

The reveal and caption motion use CSS scroll-driven animations:

animation-timeline: view();

If scroll-driven animations are not supported, Vanilla Scroll Sky falls back to a non-animated state.

Scope and style isolation

Vanilla Scroll Sky uses:

@layer vanilla-scroll-sky {
  @scope (.vss) {
    ...
  }
}

This keeps the utility organized and prevents its selectors from leaking into unrelated markup.

This is not the same as Shadow DOM. Caption content remains normal page HTML and may inherit typography or content styles from your site.

Recommended file structure

vanilla-scroll-sky/
├─ README.md
├─ LICENSE
├─ package.json
├─ src/
│  └─ vanilla-scroll-sky.css
└─ demo/
   └─ index.htm

License

MIT