Brian Grinstead
unread,Nov 7, 2019, 3:56:10 PM11/7/19Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Matthew N., Cameron McCormack, Emilio Cobos Álvarez, firefox-dev
Thanks for raising this topic Mossop,
I've been thinking about this a lot lately and have a rough working plan for how to strip away stuff like this from XULElement to ease mass migration to HTMLElement wherever possible. I'm interested in the feedback from your post so we can modify the plan as needed.
Here's the outline of my current plan as it relates to these magic properties:
1) Stop reading the [align], [pack], [dir], [orient] attributes from directly inside the moz flexbox implementation and instead rely on new CSS rules in xul.css (basically the `[orient="vertical"] { -moz-box-orient: vertical }` stuff you mention). This fixes some xul flexbox bugs since we will be actually setting the style on elements. Here's a bug for that:
https://bugzilla.mozilla.org/show_bug.cgi?id=1592369.
1a) Depending on feedback here especially regarding performance considerations, I was considering making helper classes like `.orient-vertical { -moz-box-orient: vertical }` and rewrite [orient=vertical] in markup/js to use class instead.
2) For the non-enumerable attributes (flex and ordinal), make some helper classes for the most common uses like `.flex-1` and if you don't want one of those values then you set it in a separate CSS file. Here's a bug for that:
https://bugzilla.mozilla.org/show_bug.cgi?id=1593303.
3) Remove the JS properties (.flex, .orient, etc) and use setAttribute instead. Here's a bug for that:
https://bugzilla.mozilla.org/show_bug.cgi?id=1593023.
Brian