Menu bar and menus 简介

选择器
.menu-bar [role=menubar] .menu [role=menu] .menu > li li.separator li.checked li.disabled kbd
Token
--clio-menubar-height --clio-menubar-bg --clio-menu-bg --clio-menu-shadow --clio-menu-item-height --clio-menu-item-active-bg --clio-menu-separator
无障碍
用 role=menubar、role=menu 和 role=menuitem,并在菜单标题上加 aria-haspopup 和 aria-expanded。标题的 aria-expanded=true、它的 <li> 带 open 类,或焦点在菜单里时,菜单都是打开的,所以不用脚本也能用键盘操作。用方向键在项目之间移动,要由你的脚本来做。

也接受: system.css 的标记(ul[role=menu-bar], [role=menu-item], li.divider).

证据(38)
每个数值的来源(英文)
年代数值状态来源
Classic erasA dimmed item never lights under the pointer, whether the dimming is on the item or on the button inside it (1.1.0 fix: a cell holding a dimmed button lit up in System 6, System 7 and Platinum)推断Macintosh Human Interface Guidelines (1992), ch. 4: a dimmed command cannot be chosen
tooling/behaviour.ts 1b, three engines
Platinumclio.js: a chosen item blinks 3 times, 3 ticks dark and 3 lit, before the menu closes and the command runs实测clio.css capture, Mac OS 9.0 in Infinite Mac, Apple menu, each animation frame of the emulator's canvas recorded (release at 30 ms; dark at 59, 159, 276 ms; gone at 375 ms)
General Controls' default Menu Blinking
Drawing Boardclio.js: as Mac OS 9: 3 blinks of about 3 ticks; a menu opened with a click stays open实测clio.css capture, Mac OS 8.5 with the theme in Infinite Mac, Edit > Show Clipboard released (changes at 59, 126, 177, 227, 277, 327 ms; gone at 376 ms)
Appearance > Options in 8.5: Smart Scrolling and double-click collapse both off
System 6clio.js: as Mac OS 9: the chosen item blinks 3 times, about 3 ticks dark and 3 lit实测clio.css capture, System 6.0.8 in Infinite Mac, File > Get Info released, each animation frame recorded (dark at 109, 193, 293 ms; gone at 392 ms)
MenuFlash 3
System 7clio.js: as Mac OS 9: 3 blinks of about 3 ticks实测clio.css capture, System 7.5.3 in Infinite Mac, Edit > Show Clipboard released (dark at 63, 147, 246 ms; gone at 346 ms)
MenuFlash 3
Classic erasclio.js: a submenu opens 9 ticks after its item lights (MenuDelay 8 ticks, polled)实测clio.css capture, Mac OS 9.0 in Infinite Mac, Apple menu > Control Panels (150 ms in two runs); MenuDelay's default read from the Menu Manager in the Mac IIx, Quadra 650 and New World ROMs (extended PRAM $7E, 8 ticks when zero)
the same code in System 6, System 7 and Mac OS 9
Classic erasclio.js: leaving a parent item keeps its submenu while the pointer stays in the wedge from the last point inside the item to the submenu's two near corners (whole degrees) and does not move back away from it, for 60 ticks from leaving the item, not extended by further moves; outside the wedge the item under the pointer lights at once实测the Menu Manager's MenuSelect in the Mac IIx, Quadra 650 and New World ROMs (MenuDrag: extended PRAM $7F, 60 ticks when zero; DeltaPoint, FixRatio, AngleFromSlope); clio.css capture, System 7.5.3 in Infinite Mac (into the wedge: held 1.18-1.53 s; down or left: switched in 0.19-0.27 s, the emulator's input lag) and Mac OS 9.0 (held 1.42-1.46 s; outside 0.14-0.52 s)
replaces the cone from the previous pointer position, re-armed on every move (0.11.0)
Platinumclio.js: a menu opened with a click stays open until the next click (Mac OS 8 and 9); in System 6 and 7 it closes when the button comes up实测clio.css capture scripts for Mac OS 9.0 (click opens the Apple menu) and System 7.5.3 (menus must be held); System 6.0.8 in Infinite Mac: a click on File leaves no menu open
--clio-menu-sticky
Classic erasclio.js: from the keyboard the bar is an application menu bar: one Tab stop (roving tabindex), a title's menu previewed on focus, Left/Right between menus, Down/Home/End into a menu, Esc one level at a time, Tab out closes all; Command-key equivalents from <kbd>⌘N</kbd> on menu bars marked data-clio-shortcuts, the title lit for 8 ticks调整WAI-ARIA Authoring Practices, menubar pattern (via modern-web-guidance app-menus and menu)
Mac OS 8 and 9 had no keyboard menu navigation; Command keys are opt-in so a page's demo menus never take the browser's shortcuts
System 7Menus keep System 6's rows and black highlight; disabled items and the separator are solid #888 instead of a dither实测clio.css capture, System 7.5.3 in Infinite Mac (npm run capture:system7), frame file-menu
separator row 100% identical
System 6Menu bar: 20 rows with the rule on the last; an open title inverts rows 1–18, about 9px either side of the word实测clio.css capture, System 6.0.8 in Infinite Mac (npm run capture:system6), frame file-menu
System 6.0.8 Finder File menu
System 6Menu: hangs from the bar's rule with no top line; 1px ink frame and 1px drop shadow; 16px rows; text 13px in; the highlighted row inverts实测clio.css capture, System 6.0.8 in Infinite Mac (npm run capture:system6), frame file-menu
System 6.0.8 Finder File menu
System 6Separator: a full 16px row with a 1-on 1-off dotted rule on its ninth line实测clio.css capture, System 6.0.8 in Infinite Mac (npm run capture:system6), frame file-menu rows 164–179
System 6.0.8 Finder File menu
System 6Check mark: the Chicago check glyph, 9×8, 3px in from the frame实测clio.css capture, System 6.0.8 in Infinite Mac (npm run capture:system6), Apple menu Finder item
redrawn as pixels in tooling/s6-art.py
System 6Disabled items are drawn through QuickDraw's 50% gray pattern, aligned to the screen (ink kept where x + y is odd); clio.css clips the same 2px pattern, fixed to the viewport, to the text (solid #696969 only where background-clip: text is missing)实测clio.css capture, System 6.0.8 in Infinite Mac (npm run capture:system6), frame file-menu
"Print" 100% identical (s6-menu-disabled); set --clio-disabled-dither: none for solid #696969
PlatinumMenu bar: #ddd, white top line, #999 bottom line, 1px black rule, 20px; open title #333399 with #6666cc/#000088 lines实测apps/desktop/styles/65-appearance-themes.css:298, :45
Mac OS 9 native menu bar captures 02/04
PlatinumMenu: no top rule, white/#999 inner bevel, #222 1px drop; 16px rows at weight 600; highlight #333399 with #6666cc/#000088 side columns实测apps/desktop/styles/65-appearance-themes.css:912 (P21), :917 (P24)
GUIdebook Mac OS 9.0 Apple menu (Theme Lab specimen apple-menu)
PlatinumSeparator: a 6px row with #888 on its third line and white on its fourth, the full width of the menu实测clio.css capture, Mac OS 9.0 in Infinite Mac (npm run capture:platinum), frame file-menu
between Close Window and Get Info
PlatinumMenu check mark (10x8, antialiased, read black on #ddd from an open pop-up menu; the 9x8 recovered before from the white-on-#339 chosen item had lost the tip's last column) and the 6x11 submenu arrow, redrawn from Mac OS 9.0实测clio.css capture, Mac OS 9.0 in Infinite Mac (npm run capture:platinum), frames popup-open and file-menu; tooling/p9-art.py
replaces the classic-stylesheets art used before 0.8.0
Drawing BoardMenu bar: the theme's 630x27 picture (pxm 6104) tiled from the screen's left, 22 rows shown; menus: paper (ppat 7125) from the inside top-left in a frame of pattern pens (ppat 129-133) tiled from the menu's corner, a 2px pencil shade, fixed pencil pixels where the pens meet; 18px items; the separator is ppat 133实测clio.css capture, Mac OS 8.5 with the 8.5b6 Drawing Board theme in Infinite Mac (npm run capture:drawingboard), frames file-menu, edit-menu and control-panels-menu; 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
File, Edit, Apple and Control Panels menus agree
Drawing BoardThe chosen menu title and item are underlined in pencil instead of inverted实测the theme file's pxm# pixmaps, decoded by tooling/theme-resources.py and redrawn by tooling/db-art.py
Menu_Title_Underline_Center, Menu_Item_underline_center; the title underline is visible under File in the capture
Drawing BoardMenu item underline: left 16px in, right 15px in, its middle piece tiled (the Appearance pop-up's ends 16px from both sides)实测clio.css capture, Mac OS 8.5 with the 8.5b6 Drawing Board theme in Infinite Mac (npm run capture:drawingboard), frames control-panels-menu and popup-open
Energy Saver in the Control Panels menu
System 7A menu longer than the screen ends in a scroll arrow row (11x6, black, 5px in); the up arrow is the down arrow turned over实测clio.css capture, System 7.5.3 in Infinite Mac, frame hig/system7/cp
Control Panels submenu; the up arrow inferred
Drawing BoardMenu scroll arrows are the theme's 364 (down) and 389 (up)实测the theme file's pxm#
the down arrow found in the Control Panels submenu
Classic erasMenu bar extras (li.menu-extras: the Help and Application menus) sit at the right; a 16px icon can lead a title or an item实测clio.css captures, frames hig/*/app-menu, help-menu, apple-menu, cp
positions not compared pixel by pixel
NeXTSTEPThe menu bar is drawn as NeXT's main menu: a vertical panel titled by its aria-label; a title opens its submenu to the right调整clio.css (same DOM as the Classic menu bar)
NeXTSTEP User Interface Guidelines, Release 3 p.100 (the main menu)
NeXTSTEPA menu is as wide as its widest cell (Workspace's main menu 93px, Edit's 77px, its Info submenu 107px)实测clio.css capture, NeXTStep 3.0 in Infinite Mac (frames in .fidelity/ns30), frames boot1, info-open and edit-launch
clio.css lets the browser size it to its text, whose widths are Helvetica's (D3)
NeXTSTEPMenu title: 22 rows, black face, white Helvetica Bold 12 at x=5, a white highlight top and left, #555555 then black below实测clio.css capture, NeXTStep 3.0 in Infinite Mac (frames in .fidelity/ns30), frame boot1 (Workspace main menu)
rows 0-21
NeXTSTEPMenu cell: 20 rows: white top row and left column, 17 rows of #aaaaaa, a #555555 row and column, a black row and column; Helvetica 12 at x=5实测clio.css capture, NeXTStep 3.0 in Infinite Mac (frames in .fidelity/ns30), frame boot1 (Workspace main menu, Info to Log Out)
every cell the same
NeXTSTEPSubmenu arrow: 7x7, a black upright and an embossed point (#555555 above, white below), 6px from the right实测clio.css capture, NeXTStep 3.0 in Infinite Mac (frames in .fidelity/ns30), frame boot1 (Info row, x 80-86); tooling/nx-art.py check
the grid equals the frame
NeXTSTEPKey equivalents: the plain letter at the cell's right (h, q)实测clio.css capture, NeXTStep 3.0 in Infinite Mac (frames in .fidelity/ns30), frame boot1 (Hide, Log Out)
NeXTSTEP User Interface Guidelines, Release 3, ch. 6
NeXTSTEPA highlighted cell turns white, bevel kept; its arrow's light edge turns #aaaaaa实测clio.css capture, NeXTStep 3.0 in Infinite Mac (frames in .fidelity/ns30), frame info-open (the Info submenu open)); tooling/nx-art.py check
fidelity nx-menu-cell-lit
NeXTSTEPA submenu hangs right against its menu, level with that menu's top whichever cell opened it; its left column is #555555实测clio.css capture, NeXTStep 3.0 in Infinite Mac (frames in .fidelity/ns30), frame info-open (the Info submenu open))
fidelity nx-submenu-join; nx-submenu-top (the View submenu, opened from the fifth cell, frame view-open)
NeXTSTEPA dimmed item's label is #555555实测clio.css capture, NeXTStep 3.0 in Infinite Mac (frames in .fidelity/ns30), frame view-open (Icon, Sort Icons, Clean Up Icons)
the label's pixels are Helvetica and are not compared
NeXTSTEPNo dividers and no check marks in NeXT menus; a separator item is not drawn推断NeXTSTEP User Interface Guidelines, Release 3, ch. 6
the captured menus have none
NeXTSTEPA dimmed item does not highlight under the pointer推断NeXTSTEP User Interface Guidelines, Release 3 p.100
found by the Firefox run of nx-submenu-top, whose pointer rested on Clean Up Icons
NeXTSTEPA torn-off submenu (.torn-off): a #555555 line on its top as on its left, and a close button 2px in from the title bar's face; an attached one has none实测clio.css capture, NeXTStep 3.0 in Infinite Mac (frames in .fidelity/ns30), frame ns30b/tornoff (Workspace's Info menu dragged away)
fidelity nx-tornoff-left, nx-tornoff-right
NeXTSTEPclio.js: a clicked menu stays up; a press dragged through it chooses on release推断NeXTSTEP User Interface Guidelines, Release 3, ch. 6
AI System 6 reference notes (Menus)

关于 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 或数值。索引是英文的,请用英文查找。