What is the CSS filter property?
filter is a CSS property that applies graphical effects (blur, brightness, contrast, color shifts, drop-shadow, etc.) to an element. It accepts a space-separated list of filter functions and renders the result on the GPU when possible.
Does filter affect the layout?
No. Filters paint on top of the element without changing its size or position. Drop-shadow casts beyond the element box (unlike box-shadow on transparent images, drop-shadow follows the alpha channel).
What's the difference between drop-shadow and box-shadow?
box-shadow draws around the rectangular border box. filter: drop-shadow follows the actual visible pixels — so PNGs with transparent backgrounds get a shadow tracing their shape, not the bounding box.
Why is hue-rotate not changing my black/white image?
hue-rotate spins around the color wheel and only affects pixels with chroma (saturation > 0). Pure black, white, and neutral grays have no hue, so hue-rotate has no effect on them.
Are filters expensive on performance?
blur and drop-shadow are the heaviest filters because they sample neighboring pixels. Use will-change: filter sparingly, avoid animating heavy filters at 60fps on large surfaces, and prefer baked images for static use.