Utilities for applying sepia filters to an element.
Use the sepia and sepia-0 utilities alongside the filter utility to whether an element should be rendered as sepia or in full color.
<div class="filter sepia ...">
<!-- ... -->
</div>To control an element’s sepia filter at a specific breakpoint, add a {screen}: prefix to any existing sepia utility. For example, use md:sepia-0 to apply the sepia-0 utility at only medium screen sizes and above.
<div class="filter sepia md:sepia-0 ...">
<!-- ... -->
</div>For more information about Tailwind’s responsive design features, check out the Responsive Design documentation.
You can customize which sepia utilities are generated using the sepia key in the theme section of your tailwind.config.js file.
// tailwind.config.js
module.exports = {
theme: {
+ extend: {
+ sepia: {
+ 25: '.25',
+ 75: '.75',
+ }
+ }
}
}Learn more about customizing the default theme in the theme customization documentation.
By default, only responsive variants are generated for sepia utilities.
You can control which variants are generated for the sepia utilities by modifying the sepia property in the variants section of your tailwind.config.js file.
For example, this config will also generate hover and focus variants:
// tailwind.config.js
module.exports = {
variants: {
extend: {
// ...
+ sepia: ['hover', 'focus'],
}
}
}If you don't plan to use the sepia utilities in your project, you can disable them entirely by setting the sepia property to false in the corePlugins section of your config file:
// tailwind.config.js
module.exports = {
corePlugins: {
// ...
+ sepia: false,
}
}