[Bug 13608] Add <menuitem> element

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13608

--- Comment #16 from Jan Varga <jan.varga@gmail.com> 2011-09-26 07:56:08 UTC ---
(In reply to comment #15)
> I don't really see how you'd ever style the menu via the DOM, though. The whole
> point is to make it render using platform-specific conventions, taking all the
> various HTML semantics and turning them into one consistent UI; if we were
> going to allow authors to style this, we'd probably just use pseudo-elements,
> as in:
> 
>     menu ::menu-item { color: yellow; background: navy; }
>     menu ::menu-separator { border-color: white; }
> 
> The menu construction algorithm really doesn't work well for something that
> styles the DOM directly (consider e.g. the separator collapsing, the merging
> into the UA menu, etc).
> 
> 

I had something similar in mind ...
The HTML5 context menu feature in Firefox is implemented using a menu builder
interface that creates custom context menu items. Another builder can be
implemented to construct native anonymous elements for toolbar menus.
I have even a patch for that although it's not finished yet because we were not
sure about styling etc.
Using pseudo-elements sounds good to me. Actually it would work like the XUL
tree widget which uses pseudo elements to style rows, cells, text, separators,
etc.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Monday, 26 September 2011 07:56:14 UTC