-
Notifications
You must be signed in to change notification settings - Fork 667
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
Motion Blur Effects #11134
Comments
I really like this proposal! 2015 is when I learned SVG could do x or y blur effects from SVG filters(demo). I think this proposal should move as much into CSS as possible and detach itself from the SVG dependency. I want that progressive motion blur right now 🙂 I've tried emulating it before with today's blur filters and gradients/masks, but never matched the effect. Great examples, and a solid syntax proposal imo. It's also a great complimentary proposal to #3837. This "motion blur effects" proposal offers specific functions, which give great control but would need manual transitions/keyframes in order to animate; while proposal #3837 is automatic and adapts blur amounts to the distance | difference pixels incur during animation. |
This should be a |
I really like this idea, but adding it as part of the syntax of the
The keywords "at center" and "to bottom" would have a numeric equivalent like |
Why
Current CSS blur capabilities apply uniformly across entire elements, which limits the potential for directionally, progressively, and partially blurred effects directly in CSS. Achieving realistic motion effects, like motion blur, or specific directional blurs, which add depth and context, is only feasible through design tools such as Figma and Photoshop. As a UX Engineer with experience in both design and development, I see a need to expand CSS blur capabilities to enhance design fidelity on the web.
Motivation
In a recent conversation with Google DevRel @argyleink, he emphasized the value of adding a directional blur feature in CSS. This would allow for effects currently only available in SVG to be more accessible within CSS, promoting consistency across web platforms and design tools.
Feature Breakdown
1. Motion Blur:
Values:
motion-blur: none | auto | inherit | initial;
where auto applies a default subtle blur, none disables the effect, and inherit follows the parent element.Example from Photoshop:
2. Horizontal and Vertical Blur:
This syntax not only limits blurring in horizontal or vertical direction, but any direction and has a similar syntax to
linear-gradient()
. This is different from themotion-blur: <distance> <angle>
in a few ways.The distinction between
motion-blur: 10px, -30deg;
andmotion-blur: linear(10px, -30deg);
is crucial for understanding how each type of blur affects visual elements. The first syntax,motion-blur: 10px, -30deg;
, creates a uniform blur effect that smudges an element over a distance of 10 pixels, resulting in a softened appearance that conveys a sense of motion without a specific directional focus. In contrast, the second syntax,motion-blur: linear(10px, -30deg);
, applies a directional blur that not only blurs the element but also simulates a speed-based movement effect by squeezing the blur along the specified angle of -30 degrees. This distinction allows designers to choose between a generalized motion effect and a more dynamic, directional blur that enhances the realism of animations, providing greater control over how motion is visually represented in web design.3. Radial/Zoom Blur
4. Progressive Blur
Syntax Summary for Motion Blur Properties
1. Motion Blur:
2. Horizontal and Vertical Blur:
3. Radial Blur:
4. Progressive Blur:
This syntax aims to provide greater control over how motion blur is visually represented in web design. However, it may need changes as I am still figuring out how to incorporate all aspects of the amount of blurriness to apply as a value, blur distance, blur angle, the amount of squish in directional blur, and the starting point in progressive blur.
The text was updated successfully, but these errors were encountered: