Declarative systems describe outcomes; imperative systems describe steps. CSS is declarative: the author writes filter: invert(1) sepia(1) and the browser figures out how to produce those pixels. A canvas-based image editor is imperative: the author writes code that loops over pixels, reads color values, computes new ones, writes them back. Filter hacks live in the declarative world, but they often express what would otherwise be imperative operations. A developer who understands both modes can reach for whichever fits the task; a developer who only knows one will stretch it into territory where the other would serve better.
The declarative mode has specific virtues. Stylesheets are small, legible, and amenable to authoring by humans who do not think of themselves as programmers. The browser's implementation absorbs complexity the author never has to confront: color space conversions, GPU acceleration, caching, compositing.