Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-ui] Styling of native appearance #10039

Open
annevk opened this issue Mar 6, 2024 · 3 comments
Open

[css-ui] Styling of native appearance #10039

annevk opened this issue Mar 6, 2024 · 3 comments

Comments

@annevk
Copy link
Member

annevk commented Mar 6, 2024

HTML has a number of open issues around defining the native appearance of various widget types (as red boxes in the standard). However, it seems to me that HTML's role in this should be relatively small. For the majority of widgets we essentially need a box with an implementation-defined intrinsic width and height (not aspect ratio), to which a number of CSS properties apply and the remainder of CSS properties end up ignored. And as far as the native appearance goes I think generally any pseudo elements ought not to be applicable (this would automatically follow if they are defined as replaced elements as @emilio pointed out to me).


At the bottom of https://drafts.csswg.org/css-ui/#appearance-switching there is a list of properties that ought to be applicable to widgets with a native appearance.

This list seems incomplete. writing-mode, transform, filter, transition, width, height, and likely quite a few other properties need to work as well I think. I'm not entirely sure how we can classify CSS properties such that whenever a new property is added it is clear whether it needs to be honored for widgets with a native appearance, but I think eventually we ought to have such a classification as otherwise this continues to be a game of whack-a-mole.


I would appreciate feedback as to whether:

  1. This generally seems reasonable.
  2. What appropriate next steps would be.

Thanks!

cc @mfreed7 @emilio @fantasai

@mfreed7
Copy link
Contributor

mfreed7 commented Jun 20, 2024

I would appreciate feedback as to whether:

This generally seems reasonable.

Specifying this more completely does seem to make sense to me, generally. My primary concern would be web compat, if changes to existing behavior are being proposed. If there's a set of properties that is already honored by all browsers, then it makes sense to list those properties. I'm not sure what to do about differences in behavior, though.

What appropriate next steps would be.

Likely propose a list of properties, along with current browser behavior for those properties?

@josepharhar
Copy link
Contributor

Is every property that native appearance should support supposed to work on every form control element?

For the majority of widgets we essentially need a box with an implementation-defined intrinsic width and height

Should the CSS spec just say that each form control element "has an implementation-defined intrinsic width and height" or does it need to be more specific than that?

@annevk
Copy link
Member Author

annevk commented Aug 13, 2024

Is every property that native appearance should support supposed to work on every form control element?

That's a good question. I suppose for certain properties it might well depend on the widget type, but I would also assume that for many properties there's a single rule.

Should the CSS spec just say that each form control element "has an implementation-defined intrinsic width and height" or does it need to be more specific than that?

I think there's a number of form controls where we can do better than implementation-defined, such as for <input type=text>. But for some like <input type=checkbox> or <input type=checkbox switch> that might well be the best we can do (for now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants