Modules / Styling

Styling: drop shadow

Drop shadow filter

Add a shadow that follows the visible shape of a transparent PNG, an SVG or an icon, instead of the element's rectangular box. It works with breakpoints and hover.

#18 of 39 modules by votes

  • On by default
  • Needs Bricks 2.4 or newer
  • Tested with Bricks 2.4.3
Recording: someone enters an X and Y offset in the Drop shadow fields of a transparent pot image, and the shadow follows the pot’s outline instead of the image’s box.Recorded in Bricks 2.4.3

How to use it

  1. Select an element, such as an Image with a transparent PNG, an SVG or an icon, and open Style > CSS.
  2. In the Drop shadow block, set any of Offset X, Offset Y, Blur and Color.
  3. Leave the other fields empty to keep their defaults: offset X of 0px, offset Y of 4px, blur of 8px and a faint black (rgb(0 0 0 / 0.3)).

Setting any one field switches the shadow on with the defaults for the rest.

Where it appears in Bricks

Style tab > CSS, on every element (or the elements chosen in the settings), in a Drop shadow block after Bricks' CSS Filters. Each field works per breakpoint and in hover states, and in global classes.

Limits

  • Do not combine it with CSS Filters on the same element. Bricks prints its own filter as one filter: declaration, and only one declaration can win. To use both, put one on a wrapper element.

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. Under Elements, tick the elements for the last choice. Bricks loads every control once per element type into the builder, so fewer elements keep the builder lighter. Values you already set on other elements stay on the page; the builder stops showing those fields there.

Requirements

Bricks 2.4 or newer.