<div dir="ltr">Universal attribute selectors are generally slow, so we should avoid them. Let's get input from the layout team about how the style system could handle this most-efficiently and account for that in the eventual decision.<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 7, 2019 at 11:11 AM Dave Townsend <<a href="mailto:dtownsend@mozilla.com">dtownsend@mozilla.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>So as we move away from XUL elements we're going to have to consider what to do about some of the element attributes that XUL currently uses to apply style effects to the element. Things like orient, pack, align, flex. All of these already have CSS equivalents (both for the XUL box model and HTML flex) but as we switch to HTML elements the attributes will no longer be read by the platform.</div><div><br></div><div>There are a couple of things we could switch to and I'd like to hear thoughts from the front-end team:</div><div><br></div><div>One is to switch them all to the style properties instead, so <box style="-moz-box-orient: 'vertical'/>.</div><div>Another is to require content stylesheets for every element used in this way.</div><div>The other is to define some default CSS rules applied based on attribute: [orient="vertical"] { -moz-box-orient: vertical } This works for attributes with a finite set of options but it would be harder to use this for flex or ordinal (unless the platform team end up implementing attr() support.</div><div><br></div><div>Bear in mind that this doesn't just apply to markup, we set some of these properties from JS too.</div><div><br></div><div>What alternatives sound good?<br></div></div>
_______________________________________________<br>
firefox-dev mailing list<br>
<a href="mailto:firefox-dev@mozilla.org" target="_blank">firefox-dev@mozilla.org</a><br>
<a href="https://mail.mozilla.org/listinfo/firefox-dev" rel="noreferrer" target="_blank">https://mail.mozilla.org/listinfo/firefox-dev</a><br>
</blockquote></div></div>