[whatwg] Suggestion for Menus in Web Forms 2.0
Ian Hickson
ian at hixie.ch
Sat Aug 7 01:50:49 PDT 2004
On Sat, 7 Aug 2004, Matthew Thomas wrote:
>>
>> As for a default direction, I'd rather have CSS or an HTML attribute
>> handle it.
>
> Sure, just as CSS can be used to alter the orientation of OL or UL or
> DL.
Not similar enough, unfortunately.
Which direction inline menu "bars" go in is the least of my worries. The
primary problem I was referring to is that if we are assuming that inline
menu bars must simply be styled using CSS, then where do the labels come
from?
<menubar>
<menu label="File">
<command command="OpenFile"/>
<command command="SaveFile"/>
<command command="SaveFileAs"/>
</menu>
<menu label="Edit">
<command command="CutSel"/>
<command command="CopySel"/>
<command command="PasteSel"/>
</menu>
</menubar>
The menu element itself is display:none, and its display (on visual media)
is micromanaged by the UA. The question is how do you style the label?
Where is it? How does it get rendered?
> > > Authors wanting horizontally adjacent menus could get them without extra
> > > styling just by using adjacent <menu>s, without a <menulist> element.
> >
> > How would they do this, by setting the |style| property equal to
> > "display: inline"?
>
> No, they'd do it "by using adjacent <menu>s, without a <menulist> element".
> For example, <menu...>...</menu> <menu...>...</menu>.
But since the menus are display:none (they have to be otherwise their
contents would be on the screen), what you describe would result in
nothing being rendered at all.
At the moment the only way to do it according to the spec is:
<menubar>
<a href="#fileMenu">File</a>
<menu id="fileMenu">
<command command="OpenFile"/>
<command command="SaveFile"/>
<command command="SaveFileAs"/>
</menu>
<a href="#editMenu">Edit</a>
<menu id="editMenu">
<command command="CutSel"/>
<command command="CopySel"/>
<command command="PasteSel"/>
</menu>
</menubar>
...which is IMHO pretty pathetic.
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list