首頁

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 或數值。索引是英文的,請用英文尋找。