Box Shadow

Set the box shadow for an element.

Widely available

This feature is well established and works across many devices and browser versions.

Chrome
Edge
Firefox
Safari

bs-o-none
box-shadow: none;
bs-o-xs
box-shadow: 0 1px 2px #0000000d;
bs-o-sm
box-shadow: 0 1px 3px #0000001a, 0 1px 2px -1px #0000001a;
bs-o-md
box-shadow: 0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;
bs-o-lg
box-shadow: 0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;
bs-o-xl
box-shadow: 0 20px 25px -5px #0000001a, 0 8px 10px -6px #0000001a;
bs-o-xxl
box-shadow: 0 25px 50px -12px #00000040;
bs-o-3xl
box-shadow: 0 35px 60px -15px #0000004d;

bs-i-none
box-shadow: none;
bs-i-xs
box-shadow: inset 0 1px 2px #0000000d;
bs-i-sm
box-shadow: inset 0 2px 4px #0000000f;
bs-i-md
box-shadow: inset 0 2px 4px #0000001a;
bs-i-lg
box-shadow: inset 0 4px 6px #0000001a;
bs-i-xl
box-shadow: inset 0 6px 10px #0000001f;
bs-i-xxl
box-shadow: inset 0 8px 16px #00000026;
bs-i-3xl
box-shadow: inset 0 12px 24px #00000033;

Responsiveness

Use breakpoint prefixes to target different screen sizes. Styles apply from the breakpoint & up.

Outset

sm:bs-o-(value)
Small640px
md:bs-o-(value)
Medium768px
lg:bs-o-(value)
Large1024px
xxl:bs-o-(value)
Extra Large1536px

Inset

sm:bs-i-(value)
Small640px
md:bs-i-(value)
Medium768px
lg:bs-i-(value)
Large1024px
xxl:bs-i-(value)
Extra Large1536px

Hover State

Apply styles conditionally on hover using the h: prefix.

Outset

Add the h: prefix to apply styles only when the user hovers over the element.

Syntax:h:bs-o-(value)

Inset

Add the h: prefix to apply styles only when the user hovers over the element.

Syntax:h:bs-i-(value)