
Smooth Shadow Ring
Skill给卡片、对话框、下拉菜单、提示框等浮起的元素加阴影时,用 smooth-shadow-ring 系列工具类代替边框或 ring 加阴影的写法,避免出现两道边线,并说明描边与阴影的着色、暗色模式和覆盖方式。需要项目里装了 shadow-plugin 这个 Tailwind 插件。
name: smooth-shadow-ring
description: Use when styling any elevated surface (card, dialog, popover, dropdown, menu, tooltip, sheet, toast) in a Tailwind project that has shadow-plugin installed. Prevents the double-border artifact caused by pairing a border/ring with a shadow, by routing elevation through the smooth-shadow-ring-* utilities.
Elevated surfaces: use smooth-shadow-ring, never border + shadow
When this applies
Any element that floats above the page surface: cards, dialogs, modals, popovers, dropdowns, menus, tooltips, sheets, toasts, command palettes.
The problem
Putting a border-* (or ring-*) and a shadow-* on the same element draws
two stacked edges: the border paints a hard 1px stroke, and the shadow begins
just outside it. The result is a visible double border, a crisp line then a
soft one. It looks heavy, greyed, and cheap.
The rule
If you are about to write a border-* or ring-* class next to any shadow-*
on an elevated surface, use smooth-shadow-ring-{size} instead. It bakes a 1px
hairline ring into the final shadow layer, so the edge dissolves into the shadow
as one continuous stroke.
border shadow-md→smooth-shadow-ring-mdring-1 ring-neutral-200 shadow-lg→smooth-shadow-ring-lg- Sizes:
smooth-shadow-ring-xs,-sm,-md(or baresmooth-shadow-ring),-lg,-xl,-2xl - Never keep a
borderorringon an element that already hassmooth-shadow-ring-*. The ring is already in there; a second edge doubles up. - If the surface should have no edge stroke at all, use plain
smooth-shadow-{size}(no ring), not a border.
Coloring
The ring and shadow tint independently and compose on the same element:
shadow-{color}tints the shadow, e.g.shadow-blue-500smooth-ring-{color}tints the ring, e.g.smooth-ring-black/10,smooth-ring-blue-500/40
The ring defaults to rgba(0,0,0,0.05) and flips to rgba(255,255,255,0.18)
in dark mode — under a .dark class, data-theme="dark", or (for
OS-preference dark modes) when the page declares color-scheme: light dark.
It never keys off prefers-color-scheme alone, so light-only sites keep the
light ring for every visitor. If the site's dark mode is driven purely by a
prefers-color-scheme media query, make sure it declares
:root { color-scheme: light dark; } so the ring follows.
The dark alpha is much higher than the light one on purpose. The ring paints
outside the surface, so its rendered colour comes from the page behind it, not
from the surface it outlines. A white hairline therefore lightens toward a
raised dark surface, and too low an alpha makes the edge land on the surface's
own colour and disappear. If a surface is light enough to sit near the ring
anyway (neutral-700 and up on a dark page), set smooth-ring-* explicitly.
Ring width
The hairline is 1px by default and follows the project's Tailwind ring width
automatically, so a project with @theme { --default-ring-width: 0.5px; } gets
a 0.5px hairline here with no extra setup. Do not hardcode a width to match;
override --smooth-ring-width at any scope only when it must differ from the
project ring width — per element via [--smooth-ring-width:2px].
Overriding
The utilities carry no !important and follow the normal cascade, so a later
utility, an inline style, or a JS animation on box-shadow overrides them
normally. When one has to win against CSS that outranks it — a component
library's own box-shadow, which usually ships unlayered — use Tailwind's
important modifier on that element instead of a global override:
<div class="smooth-shadow-ring-md!">…</div>
Example
<!-- Wrong: border + shadow renders a double edge -->
<div class="rounded-2xl border border-neutral-200 shadow-md">…</div>
<!-- Right: one continuous edge -->
<div class="rounded-2xl smooth-shadow-ring-md">…</div>
<!-- Right: tuned ring + tinted shadow -->
<div class="rounded-2xl smooth-shadow-ring-md smooth-ring-black/10 shadow-blue-500">…</div>
相關資源

Tailwind CSS
Skill用 Tailwind CSS 实现界面的通用指南:响应式与状态变体、深色模式、克制使用任意值、优先拆组件再用 @apply,以及动态拼接类名导致生产环境缺样式等常见问题,附按钮与首屏版式示例。
MengTo/Skills8.3k
Beautiful Shadows
Skill提供 sm、md、lg 三档现成的 Tailwind 任意值阴影类,用于卡片、表单控件、浮层、主视觉等表面,做出分层的中性灰阴影,并规定不与默认阴影混用、不染色、不叠加多个阴影。
MengTo/Skills8.3k
Design Lab
Skill先通过提问了解设计范围、痛点、参考产品、品牌调性与约束,再从项目现有的 Tailwind 配置、CSS 变量或组件库主题中提取视觉语言,在临时路由里生成 5 个不同的界面方案并附带交互式反馈浮层,按反馈迭代后输出实现计划,结束或取消时清理所有临时文件。面向 Next.js、Vite 等 React 项目。
0xdesign/design-plugin787
OKLCH Colors
Skill在网页项目中使用 OKLCH 色彩空间:把 hex、rgb、hsl 转成 oklch,生成没有色相漂移的色阶与暗色模式配色,用 APCA 或 WCAG 检查对比度并只调亮度来修正,处理 P3 色域与 sRGB 回退,以及 Tailwind v4 的 @theme 配置;修改结果以前后对照表呈现。
jakubkrehel/oklch-skill290
Swiss Design
Skill用 Tailwind CSS 实现瑞士国际主义风格的设计系统:12 栏网格与 8px 基准间距、IBM Plex Sans 字体与细字重标题、stone 色板,用不透明度而不是换色区分层级,每个项目只用一种强调色,正文宽度不超过 60ch,移动端优先并支持深色模式。
zeke/swiss-design-skill164
Budge
Skill在 Next.js App Router 项目中,agent 只改动单个 CSS 值或 Tailwind 类时,页面上会出现浮动调节条,用户用方向键微调数值、切换相关属性,回车复制修改提示、Esc 还原。需在 app/layout.tsx 引入 budge.design 托管的运行时脚本。
millionco/skills35