2022-06-22
3959
#css
Oscar Jite-Orimiono
119740
Jun 22, 2022 ⋅ 14 min read

A complete guide to using CSS filters with SVGs

Oscar Jite-Orimiono I'm a self-taught frontend web developer. I build websites so everyone finds a home online. The digital space is massive, full of endless possibilities — let's explore it together!

Recent posts:

Rxjs Adoption Guide: Overview, Examples, And Alternatives

RxJS adoption guide: Overview, examples, and alternatives

Get to know RxJS features, benefits, and more to help you understand what it is, how it works, and why you should use it.

Emmanuel Odioko
Jul 26, 2024 ⋅ 13 min read
Decoupling Monoliths Into Microservices With Feature Flags

Decoupling monoliths into microservices with feature flags

Explore how to effectively break down a monolithic application into microservices using feature flags and Flagsmith.

Kayode Adeniyi
Jul 25, 2024 ⋅ 10 min read
Lots of multi-colored blue and purplish rectangles.

Animating dialog and popover elements with CSS @starting-style

Native dialog and popover elements have their own well-defined roles in modern-day frontend web development. Dialog elements are known to […]

Rahul Chhodde
Jul 24, 2024 ⋅ 10 min read
Using Llama Index To Add Personal Data To Large Language Models

Using LlamaIndex to add personal data to LLMs

LlamaIndex provides tools for ingesting, processing, and implementing complex query workflows that combine data access with LLM prompting.

Ukeje Goodness
Jul 23, 2024 ⋅ 5 min read
View all posts

7 Replies to "A complete guide to using CSS filters with SVGs"

  1. Very interesting, thanks.
    Last fall, I decided that in my 60s it would be good to learn some other profession and decided that the frontend would be closest to me. Unfortunately, the process does not go so fast, but now I am mastering the CSS. Just here there will be one more point to practice

  2. This isn’t a comment on the article per se, which is awesome btw, just an observation that your print stylesheet has a rule of display:none; for img but for an article like this the images are almost the whole point.
    I sometimes print articles to PDF for later perusal and I had to come back and disable your CSS rule before the article could make complete sense in the PDF.

  3. Thanks,Oscar!it is informativel for me right now as I learn and work on a css animations project. I’m better at it with you.)This is really important when trying to find a simple and clear explanation.

  4. Hey just noticed that the knockout text doesn’t work with just the code you provided. Tested it in Edge and Firefox as of 2/3/2023 using the latest build of each.

    1. Hi, the code provided is just to create the filter. I didn’t include CSS because it is assumed that you already know how to style text with CSS.

      Here’s the CSS I used:

      h1{
      font-family: ‘Poppins’, sans-serif;
      position: absolute;
      width: 1000px;
      padding: 20px;
      font-size: 5rem;
      font-weight: 800;
      filter: url(#knockout);
      }

      Try this; it should work fine on any modern browser, including Firefox and edge. Cheers!

Leave a Reply