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

Possibility to animate backdropFilter #56

Open
ManuSevenval opened this issue Oct 3, 2019 · 3 comments
Open

Possibility to animate backdropFilter #56

ManuSevenval opened this issue Oct 3, 2019 · 3 comments

Comments

@ManuSevenval
Copy link

I have a feature request:

What about being able to animate the backdropFilter property as well?

I think we could easily add the following filters for backdropFilter within react-plx pretty easily, since they only use linear values:

blur();
brightness();
contrast();
grayscale();
hue-rotate();
invert();
opacity();
sepia();
saturate();

I would not add drop-shadow since we would have to accept four arguments here:
drop-shadow(4px 4px 10px blue);.

Furthermore I can not think of a way to animate the svg filters via backdrop-filter: url(commonfilters.svg#filter);

I am gladly willing to contribute and open a PR if you approve the feature :)

@Stanko
Copy link
Owner

Stanko commented Oct 3, 2019

Hi @ManuSevenval,
It would be great if you can do a PR for backdrop-filter.

Plx already has support for:

Supported CSS filters are:

  • blur
  • brightness
  • contrast
  • grayscale
  • hueRotate
  • invert
  • opacityFilter (as it shares the same name as CSS opacity)
  • saturate
  • sepia

Be aware that animating these filters on scroll will probably introduce performance issues.

Cheers!

@dil25
Copy link

dil25 commented Oct 8, 2019

can we use text shadow or drop shadow filter now?

@Stanko
Copy link
Owner

Stanko commented Oct 8, 2019

@dil25 unfortunately not, because both properties have multiple numerical values plus color. That means it needs a different approach and decent amount of work to implement these.

Examples:

filter: drop-shadow(30px 10px 4px #4444dd);

text-shadow: 1px 1px 2px black; 

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

3 participants