How to use it
A mask
- Select any element and open Style > Background.
- In the Mask block, use one of the four sources:
- Shape: pick one of the 36 shapes. The list is searchable. The shapes are the ones Bricks ships for its Image element.
- Image from the Media Library: pick an SVG, or a PNG with transparency. Its opaque parts show the element.
- Image URL: the address of a file on this site, such as an SVG or PNG from the Media Library.
- Fade out at: Top, Bottom, Left, Right, Top and bottom, Left and right or All edges (radial), or At an angle with a Fade angle (180 fades toward the bottom, 90 toward the right). Set Fade length to change how far the fade reaches. The default is 20%.
- For a shape or an image, set Size (Contain, Cover or Stretch), Position (Center,
Top, Bottom, Left or Right) and Repeat (No repeat, Repeat, Repeat horizontally
or Repeat vertically). The defaults are Contain, Center and No repeat. You do not have to touch them.
Custom size (a width, such as 200px or 50%) replaces Size, and Custom position (left and top, such as
30% 70%) replaces Position. - To turn the mask off at one breakpoint or state, tick Remove mask. For example, masked on desktop and plain on mobile.
A pattern
- In the Pattern block, pick a Pattern: Dots, Grid, Horizontal lines, Vertical lines, Diagonal lines or Checker.
- Set Pattern color and Pattern size. The defaults are a faint black (
rgb(0 0 0 / 0.12)) and 16px. - To turn the pattern off at one breakpoint or state, choose Off (at this breakpoint / state).
Where it appears in Bricks
Style tab > Background, on every element, core and third-party. The controls come with Bricks' own breakpoint, hover and state handling, so you can set them per breakpoint, in a hover state and in global classes.
How it works with Bricks' own settings
- A mask draws with the CSS
maskproperties. Use one of Shape, Image from the Media Library, Image URL or Fade out at on an element. Do not combine them with a mask from another source on the same element, such as the mask setting of the Image element. - A pattern is drawn as the element's background image. Do not combine it with a background image or gradient on the same element. The element's background color shows through the pattern.
Limits
- An image from another domain, or a wrong URL, hides the whole element. Browsers load masks with CORS, so use a file from this site.
- Masks use the unprefixed CSS properties, so they need Chromium 120 or newer, Safari 15.4 or newer, or Firefox 53 or newer.
- Kiln registers its custom properties with
@propertyso a child element does not inherit its parent's values. Safari before 16.4 and Firefox before 128 do not support that. - The Image URL and Custom position fields take plain text. They do not take dynamic data and are not offered for translation in WPML or Polylang.
- The masks and patterns add about 0.85 MB to the data the builder loads, measured with 130 elements registered. It compresses well. Turn the module off in Bricks > Kiln if you do not use it.
Settings
Bricks > Kiln, open the module's settings:
- Add these controls to: All elements (the default), Layout and media elements, or The elements ticked below. Bricks loads every control once per element type into the builder, so fewer elements keep the builder lighter. With every Kiln style module set to layout and media elements, the builder loads about 40% less control data. Values you already set on other elements stay on the page; the builder stops showing those fields there.
Requirements
Bricks 2.4 or newer.