Primer CSS Marketing Filters
Primer CSS is a free open-source CSS framework that is built upon systems that create the foundation of the basic style elements such as spacing, typography, and color. It is highly reusable and flexible. It is created with GitHub’s design system.
Filters are used to change the overall background or colors of images. You must have used it while clicking photos on your phone to change the brightness contrast or whole color of your photos. A marketing filter is available in the Primer CSS to apply visual effects. Users can use them in div tags or images to turn them grayscale.
Marketing Filter Used Class:
- grayscale: Add the .grayscale class to apply the grayscale effect on the div tags or images.
<img src="#" class="grayscale"/>
Example 1: This example demonstrates the Primer CSS Marketing filters on a div using the grayscale class.
Example 2: This example demonstrates the Primer CSS Marketing filters on an image using the grayscale class.
Output: You can see all the default colors of the image are removed and it has turned to grey as a filter has been applied.