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

The value definition of -webkit-background-clip is missing none #194

Closed
cdoublev opened this issue Jun 13, 2022 · 9 comments
Closed

The value definition of -webkit-background-clip is missing none #194

cdoublev opened this issue Jun 13, 2022 · 9 comments

Comments

@cdoublev
Copy link
Contributor

The initial value of -webkit-background-clip is none but it is missing from its value definition.

Name: -webkit-background-clip
Value: border-box | padding-box | content-box | text
Initial: none

@karlcow
Copy link
Member

karlcow commented Jun 13, 2022

Checking the CSS spec for it, which is introducing text.
https://drafts.csswg.org/css-backgrounds-4/#background-clip

w3c/csswg-drafts#5604

@cdoublev What do you suggest?

@karlcow
Copy link
Member

karlcow commented Jun 14, 2022

We might possibly remove the -webkit-background-clip: text let's open an issue about that.

@karlcow
Copy link
Member

karlcow commented Jun 14, 2022

I open #195 for comment #12

@cdoublev
Copy link
Contributor Author

cdoublev commented Jun 14, 2022

Honestly I was only concerned about automatic parsing of value definitions: I should be able to successfully parse none against the value definition field.

In Chrome:

element.style.webkitBackgroundClip = 'initial'
console.log(getComputedStyle(target).webkitBackgroundClip) // 'border-box'

I think it should have been border-box, like for background-clip.

If background-clip and -webkit-background-clip should have the same value space, as noted in w3c/csswg-drafts#5604, then I'm fine with closing this issue and just ignore this property (eg. when processing extracts from @webref/css) until it is removed from Compat or defined as a legacy name alias for all its values.

@karlcow
Copy link
Member

karlcow commented Jun 14, 2022

Ah! That makes sense. So yes either way we will be deleting the text (#195) or I'll make a PR to edit the value.
Note that for the automatic parsing https://drafts.csswg.org/css-backgrounds-4/#background-clip should give you what you need?

@cdoublev
Copy link
Contributor Author

Yes, Chrome and Firefox (not checked in other browsers) already parse -webkit-background-clip as a legacy name alias of background-clip with the value space from CSS Backgrounds 4, which accepts a list of values whereas the value space from Compat does not.

style.webkitBackgroundClip = 'text, padding-box'
console.log(style.webkitBackgroundClip) // 'text, padding-box'
console.log(style.backgroundClip) // 'text, padding-box'
style.webkitBackgroundClip = 'none'
console.log(style.webkitBackgroundClip) // 'text, padding-box'
@karlcow
Copy link
Member

karlcow commented Jun 14, 2022

@miketaylr
Copy link
Member

@karlcow should we close here?

@karlcow
Copy link
Member

karlcow commented Jun 18, 2022

yes :)

@karlcow karlcow closed this as completed Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants