本文へ移動
cccskills
無料GitHub で公開

liquid-glass

Liquid glass — Apple-style frosted, refracting surfaces. Use when the user asks for glassmorphism, frosted/translucent panels, cards, menus or a glass topbar; when a glass surface looks wrong (gray, flat, invisible, unreadable text); or when another skill needs the glass recipe.

インストール方法を見る

含まれるファイル(5)

  • SKILL.md5.9 KB
  • assets/liquid-glass.css12.6 KB
  • assets/liquid-glass.directive.ts14.8 KB
  • references/recipes.md4.5 KB
  • references/refraction.md6.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Liquid Glass

Glass is two layers, and the CSS one is not the interesting one.

  1. CSS paints the tint and the rim — a near-transparent white→gray gradient plus three inset highlights that read as a polished edge. This is what most "glassmorphism" snippets stop at.
  2. Refraction bends the backdrop through the panel's edge, the way real glass does: a displacement map baked per element and consumed as backdrop-filter: url(#filter). This is what makes it liquid rather than a blurred rectangle.

They ship as a pair — a class and a directive on the same element:

<div class="liquid-glass" appLiquidGlass>…</div>

assets/liquid-glass.css is the CSS layer, self-contained (its own tokens, light and dark). assets/liquid-glass.directive.ts is the refraction layer for Angular. Any other framework: port it, see references/refraction.md — the port is transcription, not design.

The four rules

Each of these has one failure mode, and in every case the browser shows you something plausible instead of an error.

1. Glass needs a backdrop. Build it first.

Glass shows what is behind it. Behind a flat background there is nothing to show, so the panel renders as a faintly outlined gray box and the effect reads as broken — which sends people reaching for more blur and more opacity, the exact move that kills it.

So the ambient mesh is part of the recipe, not decoration: off-screen radial glows in a few hues (violet / pink / cyan), fixed to the viewport behind the content. Colour that the glass can pick up.

<body class="liquid-glass-backdrop">

Verify this before styling a single panel: the page must look subtly uneven with no glass on it at all.

2. The glass is colorless — the colour arrives from behind.

The tint is white→70%-gray at 6% alpha in both themes. That is deliberate: hue in the tint fights the hue coming through the panel and the surface turns muddy. If a surface must be branded (a primary CTA, a FAB), override the tint locally and leave the rim, the border and the refraction alone:

.my-fab {
  /* refraction still comes from the directive */
  background: linear-gradient(155deg, rgba(79, 70, 229, 0.55), rgba(67, 56, 202, 0.42));
  border: 1px solid rgba(79, 70, 229, 0.5);
}

3. A child of a glass panel paints no surface of its own.

No background, no border, no second radius — the panel already supplies all three. An opaque fill paints over the refracted backdrop, which is the whole effect; a nested border draws a hard edge across the rim. Panels inside a glass dock, rows inside a glass card, a header band inside a glass section: all transparent, separated by spacing and type weight instead.

The cost of getting this wrong is a surface that reads darker and deader than its neighbours, and nothing points at the cause.

4. Refraction is progressive enhancement, and you cannot feature-query it.

backdrop-filter referencing an SVG filter renders in Chromium only. Safari parses it and paints nothing — so @supports reports success and the panel goes blank. Gate on engine (navigator.userAgentData.brands, Chrome/ in the UA), and let everything else keep the stylesheet's plain backdrop-filter: blur(3px) saturate(125%) fallback. The directive already does this; keep it if you port.

Pick the tier

Refraction bakes a canvas displacement map per element size, so it is priced per surface. Match the tier to the element:

TierWhat it isUse for
liquid-glass-chiptokens + blur(6px), no directivechips, pills, badges, anything small or repeated in bulk
liquid-glass + directivethe full effectcards, panels, topbars, circular controls, FABs
liquid-glass-menublur(22px) + a 55% wash of the overlay surface, no directivedropdowns, popovers, context menus
liquid-glass liquid-glass--modal + directiveglass with an opaque frost layer over the tintdialogs

The menu and modal tiers exist for the same reason: text has to stay readable. A dropdown floats over arbitrary page content and a dialog over a scrim, so both trade some transparency for a wash — a menu through heavy blur, a modal through a theme-flipping frost (white in light, dark in dark). Do not "fix" either back to plain .liquid-glass.

Adding glass to a project

  1. Copy assets/liquid-glass.css in and link it. Confirm the app sets data-theme="light|dark" on <html> before first paint — the CSS keys both themes off that attribute; the file header carries the boot snippet.
  2. Put liquid-glass-backdrop on the page shell. Stop and look: uneven, colored, no panels yet.
  3. Apply a tier per element. Radius stays on the element (the directive reads the computed border-radius to shape the map).
  4. Non-Angular: port the directive per references/refraction.md.
  5. Walk the checklist below. Every line is a bug someone shipped.

Checklist

  • The backdrop is visible with all glass removed.
  • No child of a glass panel sets background or border.
  • Both themes valued for every token you added, and both eyeballed — a rim tuned for dark disappears on white.
  • Text on glass stays legible over the busiest part of the backdrop, not the calm part you happened to screenshot.
  • Non-Chromium (or directive removed): still a decent frosted panel, nothing blank.
  • Chips and repeated elements are on the CSS-only tier, not the directive.
  • Nothing hardcodes a hex where a token exists.

More variants, hover, and the pitfalls behind each rule: references/recipes.md.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

使用 AACT (Aggregate Analysis of ClinicalTrials.gov) PostgreSQL 数据仓库进行批量、历史、聚合性临床试验数据挖掘。Use this skill when the user requests bulk SQL analysis over the full clinical trials data warehouse — historical trial trends, disease landscapes, similar-design matching, or multi-year aggregations across hundreds of thousands of NCT records. 触发场景包括:AACT 查询、临床试验批量分析、PostgreSQL 试验数据、全量 NCT 检索、试验数据挖掘、历史试验分析、clinical trials data warehouse、SQL trials、bulk trial analysis、disease landscape、试验设计相似性匹配、跨年度聚合、sponsor/phase/country 多维统计。**与 clinical-trials-v2 差异**:本 skill 走批量 SQL · 离线大数据(PostgreSQL);v2 走实时 API · 单查询。两者互补:单条 NCT 实时状态用 v2,百万级历史挖掘用本 skill。支持云端公共 PostgreSQL(aact-db.ctti-clinicaltrials.org · 零部署)和每日 dump 本地还原(高性能 · 离线)两种连接方式,自动检测优先用本地。跨平台(macOS/Linux/Windows)参数化 SQL 防注入,read-only 强制保护。

日本語の概要は準備中です。原文の説明を表示しています。

EthanYoQ/Skill-hub112026年10月5日 更新

使用 AACT (Aggregate Analysis of ClinicalTrials.gov) PostgreSQL 数据库进行大批量临床试验历史分析与数据挖掘。触发场景包括:AACT 查询、临床试验批量分析、PostgreSQL 试验数据、全量 NCT 检索、试验数据挖掘、clinical trials data warehouse、疾病领域全景分析、设计相似试验匹配、跨年度试验趋势聚合。本 skill 通过 SQL 接口处理百万级试验记录,支持云端公共 PostgreSQL 服务(aact-db.ctti-clinicaltrials.org)和每日 dump 本地还原两种连接方式,自动检测并优先使用本地高性能模式。

日本語の概要は準備中です。原文の説明を表示しています。

EthanYoQ/Skill-hub112026年10月5日 更新

Use when work produces a deliverable, factual claim, dataset, code change, decision, publication, deployment, automation, or irreversible action whose failure would matter; when the user asks for a quality gate, acceptance criteria, QA, completeness, validation, audit, evidence, preflight, release readiness, or a definition of done; or before claiming completion on medium- or high-risk work. Automatically decide whether a formal gate is warranted, derive task-specific pass/fail criteria, gather evidence, and block unsupported completion. Make sure to use this skill even when the user does not say "quality gate" if consequential work needs acceptance criteria or completion evidence. Skip formal gating for trivial, reversible, low-impact requests.

日本語の概要は準備中です。原文の説明を表示しています。

EthanYoQ/Skill-hub112026年10月5日 更新

Create a changeset file in .changeset/ that describes a user-facing change for the release notes

日本語の概要は準備中です。原文の説明を表示しています。

EthanYoQ/Skill-hub112026年10月5日 更新

Add a new competitor to the AI Visibility Tool Directory — researches the tool, generates data, takes a screenshot, and inserts into the codebase

日本語の概要は準備中です。原文の説明を表示しています。

EthanYoQ/Skill-hub112026年10月5日 更新

add-lang

無料

Add tree-sitter language support to codegraph end-to-end — wire the grammar + extractor, write tests, then benchmark extraction quality and retrieval value on 3 popular real-world repos. Use when the user runs /add-lang <language> or asks to add/support a new language (e.g. Lua, Elixir, Zig, OCaml) in codegraph.

日本語の概要は準備中です。原文の説明を表示しています。

EthanYoQ/Skill-hub112026年10月5日 更新

EthanYoQ のスキルをすべて見る

このスキルの問題を報告する