MCPInstall

skyline-wxss

Skyline WXSS 样式支持技能。提供 Skyline 支持的 CSS 属性、值和限制信息。触发关键词:WXSS、CSS 支持、样式兼容性、属性支持、不支持的属性、display grid、position sticky、overflow、filter、渐变、gradient、linear-gradient、radial-gradient、conic-gradient、border-style、white-space、font-weight、text-decoration、text-overflow、aspect-ratio、will-change、calc、env、mask、mask-image、background-image、transition、animation、transform、font-feature-settings。

Installs
954
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/wechat-miniprogram/skyline-skills --skill skyline-wxss
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads skyline-wxss automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Skyline WXSS 样式支持

适用场景

  • 检查某个 CSS 属性/值在 Skyline 下是否可用
  • 排查 WXSS 样式在 Skyline 下不生效的问题
  • 从 WebView 迁移到 Skyline 时评估样式兼容性
  • 使用渐变、滤镜、遮罩等高级样式时了解限制
  • 查阅 Skyline 支持的 CSS 属性语法

文档索引

我想要...查阅文档
查看基础数据类型与语法符号references/basics.md
查看布局/定位/盒模型语法references/layout.md
查看 Flex 布局语法references/flex.md
查看背景/边框/滤镜/遮罩语法references/visual.md
查看文本/字体语法references/text.md
查看动画/过渡/变换语法references/animation.md
查看某属性是否支持本文档 Quick Reference
了解渐变/滤镜的具体限制本文档「渐变与滤镜限制」规则
检查 WXSS 语法本文档 「WXSS CLI」

WXSS CLI

请务必调用 skyline CLI 对 WXSS 进行检查,确保用法正确。

npx skyline-cli --help

列出所有支持的 WXSS 属性

npx skyline-cli wxss list

从 stdin 读取 WXSS 文本并检查语法

echo "view { color: red;  }" | npx skyline-cli wxss check --json

检查小程序工程内的 WXSS 文件

npx skyline-cli wxss check --json --miniprogram-root ${PROJECT_ROOT} --files pages/index/index.wxss pages/list/list.wxss

强制规则

NEVER: 使用不支持的 CSS 属性

以下属性设置后不生效:

属性分类替代方案
float布局使用 flex 布局
contain布局使用 -wx-contain
resize布局无替代
writing-mode文本无替代
text-indent文本使用 padding-left 模拟
overflow-wrap文本使用 word-break
text-decoration-thickness文本无替代
background-attachment背景无替代
background-clip背景无替代
background-origin背景无替代
mask-origin / mask-clip / mask-mode遮罩无替代
justify-itemsFlex无替代
list-style-type / list-style-image / list-style-position列表无替代

MUST: 使用支持的属性值

部分属性可用但特定值不支持,会被静默忽略:

Incorrect:

.container {
  display: grid;           /* grid 不支持 */
  position: sticky;        /* sticky 不支持 */
  overflow: auto;          /* auto 不支持 */
}

Correct:

.container {
  display: flex;           /* 使用 flex 替代 grid */
  position: relative;      /* sticky 需使用 sticky-header 组件 */
  overflow: hidden;        /* 使用 hidden,滚动用 scroll-view */
}

MUST: 注意渐变限制

渐变限制汇总:

  • radial-gradient 仅支持 circle 形状(不支持 ellipse),尺寸仅支持 px,颜色停止仅支持 %
  • linear-gradient 停止位置仅支持 % 和固定长度单位(px、rpx 等)
  • conic-gradient 完全支持(无额外限制)

MUST: 注意背景/遮罩多值限制

  • background-image / mask-image 最多支持 2 个值
  • background-position 最多支持 2 组值
  • background-repeat / background-size 不支持多组值

MUST: calc() 不支持角度类型

calc() 支持长度计算,但不支持角度计算,需直接写角度值。

MUST: text-overflow 仅在 text 组件生效

text-overflow: ellipsis 在 Skyline 下仅在 <text> 组件上生效,在 <view> 上不生效。推荐使用 <text> 组件的 overflow 和 max-lines 属性。

⚠️ 详见 skyline-components 技能了解 text 组件的属性限制。

NEVER: 使用 filter 的 url() 和 drop-shadow()

filter/backdrop-filter 不支持 url() 和 drop-shadow(),也不支持多个函数组合。用 box-shadow 替代 drop-shadow。

支持的函数:blur(), brightness(), contrast(), grayscale(), hue-rotate(), invert(), opacity(), saturate(), sepia()。

MUST: text-decoration-line 仅支持单值

仅支持单个值(none, underline, overline, line-through),不支持多值组合如 underline line-through。

MUST: mask-image 渐变不可用

mask-image 的 linear-gradient() 和 radial-gradient() 不支持,仅 url() 形式可用。

MUST: 注意简写属性的部分有效行为

以下 CSS 简写属性在展开后,部分子属性不生效:

简写属性不生效的子属性
backgroundbackground-attachment, background-origin, background-clip
text-decorationtext-decoration-thickness
maskmask-origin, mask-clip

💡 mask-position 简写有效:会自动展开为 mask-position-x + mask-position-y(类似 background-position 的机制)。

Quick Reference

布局属性速查

属性支持的值不支持的值
displaynone, block, inline, inline-block, flex, inline-flexgrid, flow-root
positionstatic, relative, absolute, fixedsticky
overflowvisible, hiddenauto, scroll, overflow-x, overflow-y
visibilityvisible, hiddencollapse
box-sizingcontent-box, border-boxpadding-box
aspect-ratioauto, <number>, <number>/<number>—
contentnone, normal, <string>, <url>—
direction—不支持

文本属性速查

属性支持的值不支持的值
white-spacenormal, nowrappre, pre-wrap, pre-line
font-weightnormal, bold, 数值(100-900)bolder, lighter
font-stylenormal, italicoblique
word-breaknormal, break-all, keep-allbreak-word(映射为 normal)
vertical-alignbaseline, top, middle, bottomtext-top, text-bottom
text-alignleft, center, right, justify, start, endjustify-all, match-parent
text-decoration-linenone, underline, overline, line-through(仅单值)多值组合, blink
text-overflowclip, ellipsis(⚠️ 仅 text 组件生效)—

边框与背景速查

属性支持的值不支持的值
border-*-stylenone, solid, dashed, dottedhidden, double, groove, ridge, inset, outset
background-repeatrepeat, repeat-x, repeat-y, no-repeatspace, round

Flex 属性(全部支持)

以下 Flex 属性的所有定义值完全支持: flex-direction, flex-wrap, align-items, align-self, align-content, justify-content, flex-grow, flex-shrink, flex-basis, order

非标准默认值

以下属性的默认值与 Web 标准不同,需注意:

属性Skyline 默认值Web 标准默认值条件
displayflexinlinedefaultDisplayBlock: true 时为 block
positionrelativestatic—
box-sizingborder-boxcontent-boxdefaultContentBox: true 时为 content-box
flex-directioncolumnrowdefaultDisplayBlock: true 时为 row
align-itemsstretchnormaldefaultDisplayBlock: true 时为 normal
text-alignstartleft—
mask-repeatno-repeatrepeat—

完全支持的其他属性

pointer-events, text-decoration-style, background-size, transform, opacity, transition-*, animation-*, border-radius, box-shadow, text-shadow, color, font-size, font-family, font-feature-settings, line-height, letter-spacing, word-spacing, z-index, aspect-ratio, content, will-change(仅 auto/contents), conic-gradient

相关技能

场景推荐技能说明
Skyline JSON 配置skyline-configrendererOptions 影响默认 display/flex-direction/align-items/box-sizing
组件使用skyline-componentsscroll-view 替代 overflow:auto
Worklet 动画skyline-worklettransform/opacity 动画最佳实践
Skyline 概览skyline-overview渲染引擎概览与迁移指南

References 目录结构

references/
├── animation.md
├── basics.md
├── flex.md
├── layout.md
├── text.md
└── visual.md

FAQ

What does the skyline-wxss skill do?

Skyline WXSS 样式支持技能。提供 Skyline 支持的 CSS 属性、值和限制信息。触发关键词:WXSS、CSS 支持、样式兼容性、属性支持、不支持的属性、display grid、position sticky、overflow、filter、渐变、gradient、linear-gradient、radial-gradient、conic-gradient、border-style、white-space、font-weight、text-decoration、text-overflow、aspect-ratio、will-change、calc、env、mask、mask-image、background-image、transition、animation、transform、font-feature-settings。

How do I install skyline-wxss?

Run npx skills add https://github.com/wechat-miniprogram/skyline-skills --skill skyline-wxss in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/skyline-wxss/ (personal) or .claude/skills/skyline-wxss/ (project).

Which AI agents can use skyline-wxss?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is skyline-wxss safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains skyline-wxss?

It is published by wechat-miniprogram in wechat-miniprogram/skyline-skills. It has 954 recorded installs.

More from wechat-miniprogram/skyline-skills

View all →

skyline-components

wechat-miniprogram/skyline-skills

Skyline 组件开发技能。涵盖 scroll-view 及其增强模式(列表/嵌套滚动)、swiper 高级特性、表单组件、图片/文本组件、半屏可拖拽组件、共享元素动画等。适用于需要开发滚动列表、轮播、表单输入、页面过渡动画等场景。

1.1K installs

skyline-overview

wechat-miniprogram/skyline-skills

Skyline 渲染引擎概览与迁移技能。了解 Skyline 架构、性能优势、功能特性、迁移指南和最佳实践时使用此技能。适用于初次接触 Skyline、评估迁移成本、或需要了解整体框架的场景。

1.1K installs

skyline-worklet

wechat-miniprogram/skyline-skills

Skyline Worklet 动画系统技能。使用 worklet 函数、共享变量(SharedValue)、动画类型(timing/spring/decay)、Easing 缓动函数、组合动画和线程通信(runOnUI/runOnJS)开发高性能交互动画时使用此技能。适用于拖拽、手势跟随、弹簧回弹等需要 UI 线程直接响应的动画场景。触发关键词:worklet、worklet 动画、SharedValue、共享变量、timing、spring、decay、Easing、runOnUI、runOnJS、applyAnimatedStyle、交互动画、手势动画、UI 线程动画。

skyline-route

wechat-miniprogram/skyline-skills

Skyline 自定义路由与页面转场技能。涵盖自定义路由动画(routeBuilder)、预设路由(7 种 wx:// 类型)、页面返回手势、容器转场动画(open-container)、Router API。适用于实现半屏弹窗、页面缩放、底部弹出、卡片展开等转场效果。触发关键词:自定义路由、custom-route、routeBuilder、navigateTo、页面转场、半屏、预设路由、返回手势、open-container。

Backend & APIs996 installs

skyline-config

wechat-miniprogram/skyline-skills

Skyline 小程序 JSON 配置规范技能。涵盖 app.json 全局配置(renderer、rendererOptions、componentFramework)、页面 json 配置(navigationStyle、disableScroll)、project.config.json 项目配置。适用于创建新 Skyline 项目、迁移 WebView 项目、配置混合渲染。触发关键词:app.json、页面配置、renderer、rendererOptions、skyline配置、navigationStyle、disableScroll、componentFramework、glass-easel、project.config.json。

976 installs

skyline-scroll-api

wechat-miniprogram/skyline-skills

Skyline 滚动控制 API 技能。涵盖 ScrollViewContext(程序化下拉刷新、下拉二级、滚动定位)、DraggableSheetContext(半屏面板程序化滚动)、worklet.scrollViewContext(UI 线程直接控制滚动)。适用于程序化触发刷新/二级、控制 DraggableSheet 位置、在 worklet 中操作滚动。触发关键词:ScrollViewContext、DraggableSheetContext、scrollTo、triggerRefresh、triggerTwoLevel、下拉刷新API、下拉二级API、滚动API、worklet scrollViewContext。

Backend & APIs916 installs

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs