首页

Push button

按钮、带外环的默认按钮、按下状态和停用状态。作用于 <button>、.btn 和 input 按钮。

<div class="field-row" style="gap: 16px">
  <button>Cancel</button>
  <button class="default">OK</button>
  <button class="active">Pressed</button>
  <button disabled>Eject</button>
</div>
Mac OS 四个年代并排对照
System 6
System 7
Drawing Board
Mac OS 9 Platinum

Push button 简介

选择器
button .btn .default .btn-default button:active button.active button:disabled input[type=submit]
Token
--clio-button-bg --clio-button-border --clio-button-radius --clio-button-shadow --clio-button-active-bg --clio-button-default-width --clio-button-default-radius --clio-control-height
无障碍
指针悬停不会改变按钮的样子:只有按下指针、空格键或 Enter 才算按下。键盘焦点画一圈虚线框(System 6)或 2px 的 #6666cc 环(Platinum),和默认按钮的外环分开。

也接受: system.css 的标记(.btn, .btn-default, .standard-button); AI System 6 的标记(.btn.default).

证据(27)
每个数值的来源(英文)
年代数值状态来源
Classic erasclio.js: a held button draws pressed only while the pointer is on it; released elsewhere it does nothing推断Inside Macintosh: Macintosh Toolbox Essentials (1992), TrackControl
data-clio-off turns the held look off; browsers already click only on release over the button
Classic erasclio.js: Return or Enter presses the default button, Esc or Cmd-. the Cancel button, after showing it pressed for 8 ticks实测the Dialog Manager in the Mac IIx, Quadra 650 and New World ROMs (HiliteControl, Delay(8), HiliteControl); clio.css capture, System 7.5.3 in Infinite Mac, Find File's Find button after Return (dark at 76 ms, back at 211 ms)
Esc and Cmd-. from the Macintosh Human Interface Guidelines (1992), ch. 6
System 7Push buttons and the default ring stay black and white, as in System 6实测clio.css capture, System 7.5.3 in Infinite Mac (npm run capture:system7), frame page-setup (OK)
93.8% identical; a few ring corner pixels differ
System 6Push button: 20px tall, 1px ink round rectangle with corners of about 4px, paper face, Chicago 12 (AI System 6 uses 7px corners)实测clio.css capture, System 6.0.8 in Infinite Mac (npm run capture:system6), frame alert, OK button 60×20
System 6.0.8 stop alert
System 6Pressed: the whole button inverts to ink with paper text实测clio.css capture, System 6.0.8 in Infinite Mac (npm run capture:system6), frame button-pressed (Cancel held in a TeachText alert)
System 6.0.8
System 6Disabled: the frame stays solid ink and the label is drawn through the 50% gray pattern (the menu's pattern, clipped to the label)实测clio.css capture, System 6.0.8 in Infinite Mac (npm run capture:system6), frame save-dialog (Eject)
Eject; at fractional zoom the pattern can blur, set --clio-disabled-dither: none for solid grey
System 6Default button: a 1px gap then a 3px ring (68×28 around a 60×20 button)实测clio.css capture, System 6.0.8 in Infinite Mac (npm run capture:system6), frame alert
agrees with Inside Macintosh, Dialog Manager: PenSize(3,3), InsetRect(-4,-4), FrameRoundRect(16,16)
System 6Hovering over a button changes nothing; only a press inverts it实测clio.css capture, System 6.0.8 in Infinite Mac (npm run capture:system6), frames locked-alert and button-hover
agrees with docs/design/CLASSIC_PLATINUM_FIDELITY.md:210
PlatinumHover never changes a push button; pressed only on pointer-down, Space or Enter推断docs/design/CLASSIC_PLATINUM_FIDELITY.md:210
AI System 6 design ruling: Platinum carries no hover state
System 6Keyboard focus: a 1px dotted frame 2px out调整apps/desktop/styles/00-foundation.css:519
System 6 had no button focus; a dotted frame cannot be read as the default ring
Platinum#ddd face, 1px black border, 3px corners, bevel white/#ddd over #777/#aaa实测apps/desktop/styles/65-appearance-themes.css:236
GUIdebook Mac OS 9.0 About dialog (Theme Lab specimen default-ok)
PlatinumPressed: #666 face, white text, #444/#555 top-left over #888/#777 bottom-right实测apps/desktop/styles/65-appearance-themes.css:933 (P29)
Infinite Mac Mac OS 9.0 capture
PlatinumDefault ring: 1px black, a #aaa band with #ddd/#777 edges, 1px gap实测apps/desktop/styles/65-platinum-utility.css:773
GUIdebook Mac OS 9.0 (default-ok specimen)
PlatinumDisabled: #888 border, flat #ddd, #777 text; the default ring goes #888实测apps/desktop/styles/65-appearance-themes.css (N5)
GUIdebook Open dialog Eject button (button-disabled specimen)
Drawing BoardPush buttons: four pattern pens (ppat 7070-7072, 7079) tiled so their pixel 0 is on the last column and row, the corner pixels they leave, the hatched ButtonFaceCorner (image 0) flush in the lower right of the #cec6b5 face, and a 1px pencil shade right and below; the label 1px lower than Platinum's实测clio.css capture, Mac OS 8.5 with the 8.5b6 Drawing Board theme in Infinite Mac (npm run capture:drawingboard), frames themes-tab and energy-saver-alert; the theme file's ppat and pxm# resources, decoded by tooling/theme-resources.py, written by tooling/db-art.py and tooling/db-pens.py
"Save Theme…" and "Specify Settings" agree
Drawing BoardDefault button: a 3px band of pattern pens (ppat 7085 rows, 7086 columns) whose inner line is the box's edge, plus its corner pixels实测clio.css capture, Mac OS 8.5 with the 8.5b6 Drawing Board theme in Infinite Mac (npm run capture:drawingboard), frame energy-saver-alert; the theme file's ppat and pxm# resources, decoded by tooling/theme-resources.py, written by tooling/db-art.py and tooling/db-pens.py
"Close Message"
Drawing BoardHeld buttons lose the hatch; the foot and right side take other pens (ppat 7126, 7127) tiled from the second column and row实测clio.css capture, Mac OS 8.5 with the 8.5b6 Drawing Board theme in Infinite Mac (npm run capture:drawingboard), frame button-held; the theme file's ppat and pxm# resources, decoded by tooling/theme-resources.py, written by tooling/db-art.py and tooling/db-pens.py
"Save Theme…" held
Drawing BoardDisabled buttons: #8c8c8c label on the same face实测clio.css capture, Mac OS 8.5 with the 8.5b6 Drawing Board theme in Infinite Mac (npm run capture:drawingboard), frame date-time
"Server Options…"
Drawing BoardThe pencil overruns at a button's corners: ButtonTopLeft, ButtonTopRight, Button_BotRight, ButtonBotLeft round a plain button and the four *Default pieces round the default one, drawn outside the box实测the theme's pxm# pixmaps (tooling/db-art.py); positions from frames themes-tab and energy-saver-alert
each piece found 1:1 round "Save Theme…" and "Close Message"
NeXTSTEPPush button: #aaaaaa face, no outline, a bevel of white top and left, #555555 then black bottom and right (black keeps the top-right and bottom-left corners); 24px tall实测clio.css capture, NeXTStep 3.0 in Infinite Mac (frames in .fidelity/ns30), frame prefs-dock (Workspace Manager Preferences, Dock), Revert and Set, 63x24)
fidelity nx-button-disabled
NeXTSTEPOn (aria-pressed="true"): the face turns white, the bevel stays raised实测clio.css capture, NeXTStep 3.0 in Infinite Mac (frames in .fidelity/ns30), frame prefsapp-moved (Preferences, Mouse), the Right button)
fidelity nx-button-on; AI System 6's sunken bevel corrected
NeXTSTEPHeld (:active, .active): white and sunken, 1px black top and left, 1px white bottom and right, the two odd corners white实测clio.css capture, NeXTStep 3.0 in Infinite Mac (frames in .fidelity/ns30), frame ns30b/button-held (Log Out's Cancel held; released off it, the panel stayed)
fidelity nx-button-held
NeXTSTEPThe return mark shows only while the button's window is key (gone in an inactive or main window)实测clio.css capture, NeXTStep 3.0 in Infinite Mac (frames in .fidelity/ns30), frames open-panel and open-inactive (Edit's Open panel, key and then behind Workspace)
NeXTSTEP User Interface Guidelines, Release 3 p.139
NeXTSTEPDefault button: no ring; the 15x10 embossed return mark 5px from the right, drawn the same when the button is dimmed实测clio.css capture, NeXTStep 3.0 in Infinite Mac (frames in .fidelity/ns30), frame prefs-dock (Workspace Manager Preferences, Dock), Set); tooling/nx-art.py check
NeXTSTEP User Interface Guidelines, Release 3 p.139; fidelity nx-default-disabled
NeXTSTEPDisabled: the label #555555, the bevel kept实测clio.css capture, NeXTStep 3.0 in Infinite Mac (frames in .fidelity/ns30), frame prefs-dock (Workspace Manager Preferences, Dock), Revert and Set)
fidelity nx-button-disabled
NeXTSTEPKeyboard focus: a 1px dotted frame 2px out调整clio.css
NeXTSTEP 3.3 had no control focus; OPENSTEP's dotted frame is the family's mark
NeXTSTEPMinimum width 82px推断AI System 6 69-nextstep-appearance.css (--theme-button-min-width)
AI System 6 reference widths

关于 clio.css

版本 2.0.4

MIT 许可。源代码在 GitHub。

字体:Clio Sans '84、Clio Text '84 和 Clio Sans '97 是按实测点阵新做的字体。ChicagoFLF 的作者是 Robin Casady(公有领域)。Asap 的作者是 Omnibus-Type,Clio Sans NX 取自 Liberation Sans 2,Clio Pixel 取自 TakWolf 的 Fusion Pixel Font,这三种都用 SIL Open Font License 1.1。详情见 THIRD-PARTY.md(英文)。

本项目与 Apple Inc. 没有关联,也未获其认可。Macintosh、Mac OS 和 Chicago 是 Apple Inc. 的商标,这里提到它们只为说明所还原的年代。

查找

输入组件、选择器、token 或数值。索引是英文的,请用英文查找。