Soft / secondary. Surface fill + border + secondary text. Default for most actions.
.btn.btn-solid
Primary CTA. var(--foreground) fill + var(--background) text. High-contrast. One per context.
.btn.btn-ghost
Utility / icon-adjacent. No bg, muted text, hover reveals bg. Toolbar helpers, back links.
.btn.btn-icon
Square icon-only size modifier. Pair with any variant: .btn.btn-icon, .btn.btn-icon.btn-ghost.
.btn[disabled]
Disabled state. Opacity 0.42, pointer-events none. No extra class needed.
.btn.is-selected
Selected / active toggle state. Same fill as .btn-solid. Overrides all variant backgrounds.
State Modifier Rules
.is-selected
Universal selected state. Applies to .btn of any variant. Produces var(--foreground) fill + var(--background) text. Used by toggle groups, chip filters, toolbar active states.
Deprecated
Do NOT use: .btn-flat, .btn-md-primary, .btn-md-text, .sw-toggle-active with blue fill, --button-flat-primary-* tokens. All removed or neutralised.
Pattern Reuse Rules
swimlane-task-bar
Use patterns/swimlane-task/pattern.js and call window.PtoSwimlaneTaskPattern.drawTaskBar. The canonical task bar is canvas-rendered, sourced from pypto-swimlane-perf-tool/js/swimlane.js. Do not rebuild it with DOM/CSS or rewrite segment math locally.
memory-architecture-layout
Use patterns/memory-architecture/pattern.js. Call window.PtoMemoryArchitecturePattern.renderArchitecture to build the stage, createRouteOverlay for MTE routes, and renderBufferGrid for per-tier occupancy. Extend it with a new preset for 950B; do not copy raw mem_viewer HTML or redraw route geometry locally.
aic-core-object
Use patterns/aic-core-object/pattern.js and call window.PtoAicCorePattern.render. The shell is config-driven from the design draft; extend the preset data for 950B instead of cloning the generated DOM or restyling the chrome locally.
aiv-core-object
Use patterns/aiv-core-object/pattern.js and call window.PtoAivCorePattern.render. The shell is config-driven from the approved AIV draft; extend the preset data for later chip variants instead of copying the generated DOM or changing card geometry locally.
Preview rule
Preview pages may wrap a pattern for layout, but must not redefine the pattern's internal class styles.
`solid` 只给真正推进主流程的唯一主动作,例如 Run、Generate、Apply、Execute、Start。`soft` 给打开、导入、选择、浏览、加载、本地资源这类入口动作,例如 Open Pass Folder、Open single JSON、加载本地资源。判断标准不是按钮位置,而是点击后是否立即提交或推进核心流程。
Soft
.btn
--button-secondary-bg--button-secondary-border--button-secondary-fgUse for open/import/load