| 14:16 | <annevk> | emilio jarhar Luke Warlow: so in the HTML standard we have statements like "The following styles are expected to apply to select elements when they are being rendered with base appearance:" But then the style sheet that follows impacts much more than just select elements. WebKit currently follows Chromium with using some kind of function, but it seems to me that is not enough for option elements. Or do you also have some kind of inheritance bit so that option elements know whether the select element has it? I guess that could work... |
| 14:19 | <emilio> | We have a bit that says whether you're in an appearance:base subtree and use a conditional rule instead |
| 14:19 | <jarhar> | yes, and that bit lives on computed style and gets inherited |
| 14:19 | <annevk> | That sounds nice. |
| 14:19 | <emilio> | https://searchfox.org/firefox-main/rev/9c0ad0c9084ef0e36d29aae83892ea4edf3c9085/layout/style/res/forms.css#946 |
| 14:19 | <jarhar> | i think yall have -internal-auto-base() as well, right? that bit is what we use to decide which of the two values to choose |
| 14:20 | <emilio> | We don't |
| 14:20 | <emilio> | I think it's easier to reason about with the conditional rule |
| 14:20 | <emilio> | Also cheaper |
| 14:20 | <emilio> | But we could |
| 14:20 | <jarhar> | oh i see, an at-rule |
| 14:21 | <jarhar> | i was thinking webkit, i think i remember seeing them having an -internal-auto-base() thing |
| 14:21 | <annevk> | That at-rule was my vision, but unfortunately it's not currently the reality in WebKit. |
| 14:22 | <jarhar> | anyway i suppose the spec text could be clearer on how that works, like it could say that elements which are in the flat tree of a select with base appearance get these styles as well? |
| 14:23 | <annevk> | Yeah we might need some more words, but thanks for responding so quickly on the weekend! |
| 15:08 | <annevk> | I filed https://github.com/whatwg/html/issues/12996 on improving this. |
| 16:54 | <Luke Warlow> | anyway i suppose the spec text could be clearer on how that works, like it could say that elements which are in the flat tree of a select with base appearance get these styles as well? |
| 16:54 | <Luke Warlow> | We might end up wanting to define the appearance mechanism in general a bit more concretely, for other controls it gets complex (thankfully for base appearance it's simple enough) but by and large you want appearanceness to inherit. |