Skip to main content

Mix Blend Mode

Set how an element's content should blend with the background of its parent.

View as Markdown
baselinewidely

Variants

Prefix any class with a variant to apply it only under that condition. Variants stack, as in @md:h:mbm:sl.

Breakpoints

Apply a class from a viewport width up. Each breakpoint covers its width & every width above it.

@xs:mbm:slFrom 32rem up.
@sm:mbm:slFrom 40rem up.
@md:mbm:slFrom 48rem up.
@lg:mbm:slFrom 64rem up.
@xl:mbm:slFrom 80rem up.
@xxl:mbm:slFrom 96rem up.

Containers

Apply a class from a container's width up, not the viewport's. Mark the parent with ct:is first.

@c:xs:mbm:slContainer from 32rem up.
@c:sm:mbm:slContainer from 40rem up.
@c:md:mbm:slContainer from 48rem up.
@c:lg:mbm:slContainer from 64rem up.
@c:xl:mbm:slContainer from 80rem up.
@c:xxl:mbm:slContainer from 96rem up.

Media

Apply a class when the device or the page matches a condition, or on the first frame an element renders.

@pc:mbm:slOn a touch screen.
@prm:mbm:slWith reduced motion on.
@st:mbm:slOn the first frame.

States

Apply a class only while the element is in a state, such as hovered, focused or checked.

h:mbm:slOn :hover.
f:mbm:slOn :focus.
fv:mbm:slOn :focus-visible.
a:mbm:slOn :active.
d:mbm:slOn :disabled.
fc:mbm:slOn :first-child.
c:mbm:slOn :checked.
e:mbm:slOn :empty.
fw:mbm:slOn :focus-within.
i:mbm:slOn :invalid.
in:mbm:slOn :indeterminate.
lc:mbm:slOn :last-child.
nc:mbm:slOn :nth-child.
r:mbm:slOn :required.
ro:mbm:slOn :read-only.
v:mbm:slOn :valid.

Pseudo Elements

Style a part of the element rather than the element itself, such as its placeholder or the selected text.

a::mbm:slOn ::after.
b::mbm:slOn ::before.
p::mbm:slOn ::placeholder.
s::mbm:slOn ::selection.