Editor's Draft · compositing
Compositing and Blending 3 properties, 1 type defined by this
specification, all known to at least one browser
.
Read the Editor's Draft ↗
Each feature in detail MDN The background-blend-mode CSS property sets how an element's background images should blend with each other and with the element's background color.
Live preview Example from MDN
background-blend-mode: normal; background-blend-mode: multiply; background-blend-mode: hard-light; background-blend-mode: difference;
#example-element {
background-color : green ;
background-image : url ( "https://developer.mozilla.org/shared-assets/images/examples/balloon.jpg" );
width : 250 px ;
height : 305 px ;
} < section class = "default-example" id = "default-example" >
< div class = "example-container" >
< div class = "transition-all" id = "example-element" ></ div >
</ div >
</ section > Syntax <'mix-blend-mode'># Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition Initial normal Applies to All HTML elements Inherited no Percentages N/A Computed value as specified Canonical order per grammar Animation type discrete Browser support First browser version supporting background-blend-mode Chrome 35 Edge 79 Firefox 30 Safari 8 Chrome Android 35 Safari iOS 8
First version with support, from MDN browser-compat-data.
Specification ↗ MDN reference ↗
MDN The isolation CSS property determines whether an element must create a new stacking context .
Live preview Example from MDN
isolation: auto; isolation: isolate;
.background-container {
background-color : #f4f460 ;
width : 250 px ;
}
#example-element {
border : 1 px solid black ;
margin : 2 em ;
}
#example-element * {
mix-blend-mode : multiply ;
color : #8245a3 ;
} < section class = "default-example" id = "default-example" >
< div class = "background-container" >
< div id = "example-element" >
< img src = "https://developer.mozilla.org/shared-assets/images/examples/firefox-logo.svg" />
< p >< code >mix-blend-mode: multiply;</ code ></ p >
</ div >
</ div >
</ section > Syntax <isolation-mode> Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition Initial auto Applies to All elements. In SVG, it applies to container elements, graphics elements and graphics referencing elements. [SVG11] Inherited no Percentages N/A Computed value as specified Canonical order per grammar Animation type discrete Browser support First browser version supporting isolation Chrome 41 Edge 79 Firefox 36 Safari 8 Chrome Android 41 Safari iOS 8
First version with support, from MDN browser-compat-data.
Specification ↗ MDN reference ↗
MDN The mix-blend-mode CSS property sets how an element's content should blend with its backdrop — the content rendered behind the element within the same stacking context .
Live preview Example from MDN
mix-blend-mode: normal; mix-blend-mode: multiply; mix-blend-mode: hard-light; mix-blend-mode: difference;
.example-container {
background-color : sandybrown ;
} < section class = "default-example" id = "default-example" >
< div class = "example-container" >
< img
id = "example-element"
src = "https://developer.mozilla.org/shared-assets/images/examples/firefox-logo.svg"
width = "200" />
</ div >
</ section > Syntax <blend-mode> | plus-lighter Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition Initial normal Applies to All elements. In SVG, it applies to container elements, graphics elements and graphics referencing elements. [SVG11] Inherited no Percentages N/A Computed value as specified Canonical order per grammar Animation type discrete Browser support First browser version supporting mix-blend-mode Chrome 41 Edge 79 Firefox 32 Safari 8 Chrome Android 41 Safari iOS 8
First version with support, from MDN browser-compat-data.
Specification ↗ MDN reference ↗
MDN The <blend-mode> CSS data type describes how colors should appear when elements overlap. It is used in the background-blend-mode and mix-blend-mode properties.
Live preview Example from MDN
.container {
width : 150 px ;
height : 150 px ;
background : url ( "br.png" ), url ( "tr.png" );
background-blend-mode : normal ;
} < div class = "container" ></ div > Syntax normal | darken | multiply | color-burn | lighten | screen | color-dodge | overlay | soft-light | hard-light | difference | exclusion | hue | saturation | color | luminosity Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Browser support First browser version supporting <blend-mode> Chrome 35 Edge 79 Firefox 30 Safari 8 Chrome Android 59 Safari iOS 8
First version with support, from MDN browser-compat-data.
Specification ↗ MDN reference ↗