The filter property applies graphical effects such as blur, brightness, contrast, grayscale, and drop-shadow to an element’s rendered result — including its contents, borders, and backgrounds.
Use one or more filter functions, or an SVG filter via url(). Filters run in the order you list them. The property is not inherited.
Baseline · Widely available.
Not deprecated. Core filter functions are widely supported. SVG url() filters can vary by browser.
Syntax
CSS Syntax
syntax.css
filter:none | <filter-function>+ | url(...);
Example: filter: grayscale(80%) blur(2px);. Invalid function arguments make the whole value act like none.
List functions with spaces. No commas between them.
Order is left to right. Contrast runs, then saturate.
Swap the order in the editor to see a different result.
Keep chains short for clearer code and better performance.
Edge Cases & Pitfalls
If a filter looks wrong or disappears, check these first.
vs
filter vs backdrop-filter
filter changes the element itself. backdrop-filter changes only what shows through it (frosted glass).
invalid
One bad argument cancels the list
If any function has an invalid parameter, the property computes to none. Check units (px, deg, %).
shadow
drop-shadow is not box-shadow
drop-shadow() follows the alpha outline. It has no inset or spread like box-shadow.
perf
Heavy filters cost performance
Large blurs on big layers can be expensive. Prefer smaller radii and avoid animating huge filtered areas when possible.
a11y
Do not convey meaning by color alone
Grayscale or hue shifts are visual only. Pair status with text or icons so color-blind users still understand.
Compatibility
Browser Support
filter is a browser CSS property for visual effects. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
filter
Core filter functions work in all modern browsers. SVG url() filters may differ by engine.
96%Core function support
Google ChromeAll modern versions
Full support
Mozilla FirefoxAll modern versions
Full support
Apple SafariAll modern versions
Full support
Microsoft EdgeAll modern versions
Full support
OperaAll modern versions
Full support
Samsung InternetSupported
Full support
Internet ExplorerNo standard filter
No support
filterWidely supported
Bottom line: Safe for everyday blur, grayscale, and color filters. Verify SVG url() filters on target browsers. It is not a runtime API.
Remember
Key Takeaways
Role: apply visual effects to an element’s painted result.
Initial:none. Not inherited.
Chain with spaces. Order matters.
Behind the glass? Use backdrop-filter instead.
One line:filter restyles how the element looks — blur, color, shadow — without changing layout.
Frequently Asked Questions
It applies graphical effects such as blur, brightness, contrast, grayscale, and drop-shadow to an element’s rendered result, including its contents, borders, and backgrounds.
The initial value is none. No filter effects are applied.
Yes. List functions separated by spaces. They run in order, for example filter: contrast(120%) brightness(110%);.
filter affects the element and everything painted inside it. backdrop-filter affects only what shows through the element, such as a frosted overlay.
No. Set it on each element that should be filtered. Children are included visually because the whole layer is filtered together.
It is Baseline Widely available. SVG url() filters can vary by browser. It is a browser CSS property, not a Node.js feature.