-
Notifications
You must be signed in to change notification settings - Fork 82
[filter-effects-1] Add filter()
#271
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
base: pre-split
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,33 @@ export default { | |
| status: { | ||
| stability: 'stable', | ||
| }, | ||
| values: { | ||
| properties: ['background-image', 'list-style-image', 'border-image-source', 'cursor', 'mask-image', 'mask-border-source', 'shape-outside', 'content'], | ||
| // https://caniuse.com/css-filter-function | ||
| // There was a bug in Safari before 18.4, | ||
| // https://bugs.webkit.org/show_bug.cgi?id=250303 | ||
| 'filter()': { | ||
| links: { | ||
| tr: '#FilterCSSImageValue', | ||
| dev: '#FilterCSSImageValue', | ||
| }, | ||
| tests: [ | ||
| // filter() = filter( [ <image> | <string> ], <filter-value-list> ) | ||
| 'filter(conic-gradient(red), invert(1))', | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Single-stop gradients were only added recently, as far as I know. So I wouldn't include those in the tests for Generally, I don't think it is necessary to test (so many) different gradient syntaxes here. One basic test per gradient function or even just one for gradients in general should be fine. |
||
| 'filter(conic-gradient(red, orange), invert(1))', | ||
| 'filter(conic-gradient(red 0 0), invert(1))', | ||
| 'filter(conic-gradient(red 0 100%), invert(1))', | ||
| 'filter(linear-gradient(red, orange), invert(1))', | ||
| 'filter(radial-gradient(red, orange), invert(1))', | ||
| 'filter(repeating-conic-gradient(red, red 5%, black 5%, black 10%), invert(1))', | ||
| 'filter(repeating-linear-gradient(red, red 10px, black 10px, black 20px), invert(1))', | ||
| 'filter(repeating-radial-gradient(red, red 10px, black 10px, black 20px), invert(1))', | ||
| 'filter(url("#foo"), blur(8px))', | ||
| 'filter(url(#foo), blur(8px))', | ||
| 'filter(url(foo.png), blur(8px))', | ||
| ], | ||
| }, | ||
| }, | ||
| properties: { | ||
| filter: { | ||
| links: { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The syntax for the
filter()function is:So three annotations:
<string>. Though that's a bit strange, because the spec. doesn't define what this value refers to. I'll try to dig deeper and may create a spec. issue for that.<filter-value-list>. That means we should have at least one test for multiple filters.<image>includes more than just gradients and URLs. So maybe we should add a few tests regarding those other values.