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-4] Define appearance:base #10691

Merged
merged 9 commits into from
Sep 17, 2024
Merged

[css-ui-4] Define appearance:base #10691

merged 9 commits into from
Sep 17, 2024

Conversation

josepharhar
Copy link
Contributor

This was discussed here: #5998

Copy link
Member

@nt1m nt1m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't looked into detail, but I do have one comment.

css-ui-4/Overview.bs Outdated Show resolved Hide resolved
<a>native appearance</a> suppressed where CSS can be used to restyle them,
just like <a>primitive appearance</a>, but also have default styles which are
usable and interoperable. This is unlike <a>base appearance</a> which can
cause some <a>widgets</a> to disappear completely.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we have to define the style system magic here or elsewhere that makes this possible?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't necessarily define the specifics of it (seems like an implementation thing), but maybe just at least the end result?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it has to define that a widget can have some style sheet associated with it (that is defined wherever that widget is defined) and how resolving that style sheet with the existing user agent style sheets and any author and user style sheets is supposed to work.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think I agree that we need to define a bit more here, since (unless I'm misunderstanding the current plan) I think this is going to cause some styles to get applied that change the computed values of other properties, both on this element and likely also on observable pseudo-elements inside of it.

(On the flip side, I think the current plan is that appearance: base doesn't change whether any pseudo-elements exist (if such a thing is even detectable) since it doesn't change the UA shadow DOM at all. (But I think it does change whether some parts of the UA shadow DOM are display:none or not.) At least, I think that's the current plan, and it certainly does make things cleaner architecturally even if it requires some local ugliness in places.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yes, the internal shadow tree plan would be good to clarify as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So should I add a paragraph that looks like this?

A widget can have some style sheet associated with it and those styles can change based on whether the widget has a native appearance, primitive appearance, or base appearance.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible that we only want the style sheet variation to occur between base appearance and the other values. I think the difference between native appearance and primitive appearance has historically not shown up in the computed values of the properties (e.g., border) that are affected. (Though I'm not 100% sure of this.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this?

A widget can have some style sheet associated with it and those styles can change based on whether the widget has a base appearance. Native appearance and primitive appearance should have the same styles.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I added the text I suggested in my last comment

css-ui-4/Overview.bs Outdated Show resolved Hide resolved
css-ui-4/Overview.bs Show resolved Hide resolved
css-ui-4/Overview.bs Outdated Show resolved Hide resolved
<a>native appearance</a> suppressed where CSS can be used to restyle them,
just like <a>primitive appearance</a>, but also have default styles which are
usable and interoperable. This is unlike <a>base appearance</a> which can
cause some <a>widgets</a> to disappear completely.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think I agree that we need to define a bit more here, since (unless I'm misunderstanding the current plan) I think this is going to cause some styles to get applied that change the computed values of other properties, both on this element and likely also on observable pseudo-elements inside of it.

(On the flip side, I think the current plan is that appearance: base doesn't change whether any pseudo-elements exist (if such a thing is even detectable) since it doesn't change the UA shadow DOM at all. (But I think it does change whether some parts of the UA shadow DOM are display:none or not.) At least, I think that's the current plan, and it certainly does make things cleaner architecturally even if it requires some local ugliness in places.)

@fantasai
Copy link
Collaborator

I think this PR needs some very prominent ISSUE: text warning not to ship this feature until its stylesheet has been properly and thoroughly defined (and implemented per spec) for all form controls. We don't want an implementer reading it, making stuff up that matches the current high-level description, and shipping their own interpretation of what appearance: base means.

@josepharhar
Copy link
Contributor Author

I think this PR needs some very prominent ISSUE: text warning not to ship this feature until its stylesheet has been properly and thoroughly defined (and implemented per spec) for all form controls. We don't want an implementer reading it, making stuff up that matches the current high-level description, and shipping their own interpretation of what appearance: base means.

Done

@josepharhar
Copy link
Contributor Author

@fantasai @dbaron anything else needed before we can merge this?

css-ui-4/Overview.bs Outdated Show resolved Hide resolved
css-ui-4/Overview.bs Outdated Show resolved Hide resolved
@dbaron dbaron merged commit 0d3ba6e into w3c:main Sep 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants