I built a lightweight runtime for FSCSS property shorthands (with a JS API)
说明与用途
fscss-props 是一个轻量级运行时,可在浏览器中展开 FSCSS 缩写,允许通过小型 DOM API 管理样式,而无需完整编译。
问题
Full FSCSS is heavy when only simple property shorthands are needed in the browser.
结果
fscss-props enables lightweight, property‑only runtime expansion of FSCSS shorthands, keeping DOM updates fast and avoiding large CSS files.
工作流
- Include fscss-props.min.js early in
<head> - Use el.fscssProp.property = value to set shorthands
- Use el.fscssPropText = 'stack: 12px; p: 16px' to bulk set shorthands
- Set el.fscssProp.property = null to clear owned longhands
证据
fscss-props: a properties-only runtime. It expands those shorthands at runtime and exposes a small DOM API.
It does not parse advanced FSCSS features, so it stays fast even when the DOM is large.
- 记录日期: 2026-10-03T12:41:03.468Z