Press/to search

Filters

Contrast v1.0.9

Utilities for sets contrast filter to an element.


Class

classcss
filter {contrast}filter: brightness(var(--brightness)) contrast(var(--contrast)) saturate(var(--saturate)) blur(var(--blur)) drop-shadow(var(--drop-shadow))
classcss
contrast-0--contrast: 0
contrast-1--contrast: 1
contrast-2--contrast: 1.10
contrast-3--contrast: 1.20
contrast-4--contrast: 1.30
contrast-5--contrast: 1.40
contrast-6--contrast: 1.50
contrast-7--contrast: 1.60
contrast-8--contrast: 1.70
contrast-9--contrast: 1.80
contrast-10--contrast: 1.90

Usage

Filter: OFFFilter: ON

Apply the filter class first, and then set the filter in any order when with other filters.

<!-- Example -->
<img class="filter contrast-10 ..."
src="...">


<y class="filter contrast-10 ..."
style="background-image:url(...)">
</y>

Mix with other filters, such as Brightness, Saturate, Blur and Drop Shadow.

<!-- Example -->
<img class="filter contrast-10 brightness-10 saturate-5 blur-5 drop-shadow-md ..."
src="...">


<y class="filter contrast-10 brightness-10 saturate-5 blur-5 ..."
style="background-image:url(...)">
</y>

Customization

Read more information about using the Plugin API, and Responsive or Pseudo-Class Variants configuration with the Plugin API.

// Add Values
@include yogurt(
$class: 'filter.contrast',
$property: --contrast,
$modifier: (
1: 1.10,
2: 2.20
//...
)
);

Variant

ResponsiveDark ModeLight ModeReduce-MotionPortraitLandscapeHoverGroup-HoverFocusGroup-FocusFocus-VisibleFocus-WithinActiveVisitedCheckedDisabled

Default enabled variants. Read more information about the Responsive and Pseudo-Class Variants.