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] Hide proprietary appearance values #3968 #3985

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jugglinmike
Copy link
Contributor

This is an attempt to implement the following suggestion from gh-3968:

The only changed required is that the appearance property on those pseudos must return a value that is supported by the property, and that is absolutely logical and shouldn't require any specific text except maybe a note; browsers who support special values internally can convert those values to 'auto' if those pseudos currently have a proprietary value today (either for real, or just for gCS purposes).

However, in gh-3980, the motivating use case is under discussion. Depending on how that is resolved (e.g. by disabling access to non-standard pseudo-elements), this change may not be necessary. Even in that case, standardizing this behavior could improve consistency in a more immediate timeframe.

The text I've written feels primitive to me, but I can't think of a better way to normatively handle a disallowed situation. For instance, it would be cleaner to allow UAs to extend the set of valid values, but that would also allow authors to use apply those proprietary values in their own code. That doesn't seem like what's desired here.

An alternative to the property's computed value may be CSSOM's definition of "resolved value". That's a little more indirect, but indirection may be warranted for an edge case like this.

/cc @FremyCompany @zcorpan

@FremyCompany
Copy link
Contributor

Sounds good by me, but I would phrase this a bit more explicitly in the tabl:

Computed value: as specified (except for proprietary values, see notes below)

@zcorpan
Copy link
Member

zcorpan commented Jun 3, 2019

You can serialize CSS values without going through getComputedStyle(), in particular element.style and document.styleSheets[n].cssRules[m]. Changing the computed style doesn't affect these I believe.

Another approach, if we want expose auto instead of non-standard keywords, is to require the auto keyword to be used directly for any non-standard use cases.

@emilio
Copy link
Collaborator

emilio commented Jun 3, 2019

You can serialize CSS values without going through getComputedStyle(), in particular element.style and document.styleSheets[n].cssRules[m]. Changing the computed style doesn't affect these I believe.

But you cannot set those as an author, and you cannot access UA stylesheets via CSSOM, right? At least the way I plan to go about non-standard values in Gecko is "removing as much as possible, leave the rest only exposed to UA stylesheets".

@zcorpan
Copy link
Member

zcorpan commented Jun 3, 2019

Right, but that setup requires that the non-standard keywords aren't parsed in author-origin CSS (what about user origin?), which would be a separate requirement.

@jugglinmike
Copy link
Contributor Author

@zcorpan I assumed that was a requirement (above, "That doesn't seem like what's desired here.").

Is it acceptable to allow authors to set appearance to a proprietary value?

@zcorpan
Copy link
Member

zcorpan commented Jun 6, 2019

I suppose UAs aren't allowed to support values that aren't listed in the Value grammar, but this isn't particularly clear (to me, at least). From the spec change here, a possible interpretation is that non-standard values should continue to work in author CSS but getting their value from getComputedStyle() should give auto.

I don't think authors should be able to set appearance to non-standard values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-ui-4 Current Work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants