Loading...
Loading...
Compare original and translation side by side
localStoragelocalStorage--accent--scale--density--mode--motionlocalStorage--accent--scale--density--mode--motionlocalStoragePick a subset that suits the artifact. Don't ship all 5 if only 2 matter — clutter is a regression.
选择适合当前制品的子集即可。如果仅2个旋钮有用,就不要全部5个都加入——冗余会带来体验倒退。
--accent--accentconst ACCENT_PRESETS = [
{ id: 'rust', val: '#c96442', label: 'Rust' },
{ id: 'cobalt', val: '#2c4d8e', label: 'Cobalt' },
{ id: 'sage', val: '#4a7a3f', label: 'Sage' },
{ id: 'plum', val: '#7a3f6a', label: 'Plum' },
{ id: 'graphite',val: '#3a3a3a', label: 'Graphite' },
];var(--accent)const ACCENT_PRESETS = [
{ id: 'rust', val: '#c96442', label: 'Rust' },
{ id: 'cobalt', val: '#2c4d8e', label: 'Cobalt' },
{ id: 'sage', val: '#4a7a3f', label: 'Sage' },
{ id: 'plum', val: '#7a3f6a', label: 'Plum' },
{ id: 'graphite',val: '#3a3a3a', label: 'Graphite' },
];var(--accent)--scale--scalefont-sizevar(--scale)calc(... * var(--scale))font-sizecalc(... * var(--scale))var(--scale)--density--densitypaddinggapmarginvar(--density)paddinggapmarginvar(--density)--mode--modedata-mode="light""dark"<html>:root<html>data-mode="light""dark":root--motion--motion--motion-multtransition-durationanimation-duration0s1.01.6prefers-reduced-motion--motion-multtransition-durationanimation-duration0s1.01.6prefers-reduced-motionassets/wrap.html#hexNpxNremwrap.htmlassets/wrap.htmlKNOBSSTORAGE_KEYtweaks-<artifact-slug>wrap.htmllocalStorage[STORAGE_KEY]document.documentElement.style.setProperty('--accent', ...)changeassets/wrap.html#hexNpxNremwrap.htmlassets/wrap.htmlKNOBSSTORAGE_KEYtweaks-<artifact-slug>wrap.htmllocalStorage[STORAGE_KEY]document.documentElement.style.setProperty('--accent', ...)changeindex.htmlindex.html--accent--scale--density--mode--motion--accent--scale--density--mode--motionassets/wrap.html<style>--accent--scalecolor: #c96442color: var(--accent)font-size: 18pxfont-size: calc(18px * var(--scale))padding: 24px 32pxpadding: calc(24px * var(--density)) calc(32px * var(--density))transition: opacity 200mstransition: opacity calc(200ms * var(--motion-mult))clamp()vwclamp(...)assets/wrap.html<style>--accent--scalecolor: #c96442color: var(--accent)font-size: 18pxfont-size: calc(18px * var(--scale))padding: 24px 32pxpadding: calc(24px * var(--density)) calc(32px * var(--density))transition: opacity 200mstransition: opacity calc(200ms * var(--motion-mult))clamp()vwclamp(...)<style><body>wrap.html<style><body>wrap.html<artifact identifier="tweaks-<artifact-slug>" type="text/html" title="<Artifact Title> · Tweaks">
<!doctype html>
<html>...</html>
</artifact></artifact><artifact identifier="tweaks-<artifact-slug>" type="text/html" title="<Artifact Title> · Tweaks">
<!doctype html>
<html>...</html>
</artifact></artifact>tweaks-<slug>prefers-reduced-motiontweaks-<slug>prefers-reduced-motion