Modern Shadow Effects
Box and text shadows from neumorphism and glass to neon, fire and retro lettering.
1Colored Shadows
Tinted shadows in the primary colour (override with --fx-shadow-rgb) that make buttons and images glow softly. Class: fx-colored-shadows
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<button type="button" class="btn btn-primary btn-lg fx-colored-shadows">Sign up</button>
<img src="../assets/img/product-7.svg" alt="Product with an accent shadow" class="fx-colored-shadows rounded-4 object-fit-cover" style="width:110px;height:110px;--fx-shadow-rgb:var(--wt-accent-rgb)">
</div>
/* CSS (already in assets/css/effects.css) */
.fx-colored-shadows {
box-shadow: 0 14px 28px -12px rgba(var(--fx-shadow-rgb, var(--wt-primary-rgb)), .65);
transition: box-shadow .35s ease, transform .35s ease;
}
.fx-colored-shadows:hover, .fx-colored-shadows:focus-visible { transform: translateY(-3px); box-shadow: 0 20px 36px -12px rgba(var(--fx-shadow-rgb, var(--wt-primary-rgb)), .8); }
@media (prefers-reduced-motion: reduce) {
.fx-colored-shadows, .fx-colored-shadows::before, .fx-colored-shadows::after, .fx-colored-shadows *, .fx-colored-shadows *::before, .fx-colored-shadows *::after { animation: none !important; transition: none !important; }
}23D Text Shadow
Stacks hard shadows under a heading so the letters look extruded, with a soft ambient shadow below. Class: fx-3d-text-shadow
Stack
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<h2 class="display-4 fw-bold mb-0 fx-3d-text-shadow">Stack</h2>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-3d-text-shadow {
color: var(--wt-primary-ink);
--fx-depth: rgba(0, 0, 0, .35);
text-shadow: 0 1px 0 var(--fx-depth), 0 2px 0 var(--fx-depth), 0 3px 0 var(--fx-depth), 0 4px 0 var(--fx-depth), 0 5px 0 var(--fx-depth), 0 6px 0 var(--fx-depth),
0 8px 6px rgba(0, 0, 0, .2), 0 14px 18px rgba(0, 0, 0, .18);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
.fx-3d-text-shadow { --fx-depth: color-mix(in srgb, var(--wt-primary) 60%, #000); }
}
@media (prefers-reduced-motion: reduce) {
.fx-3d-text-shadow, .fx-3d-text-shadow::before, .fx-3d-text-shadow::after, .fx-3d-text-shadow *, .fx-3d-text-shadow *::before, .fx-3d-text-shadow *::after { animation: none !important; transition: none !important; }
}3Retro Style
Hard offset shadows in two theme colours for a retro poster look; on .card or .btn it becomes a bold offset box. Class: fx-retro-style
Arcade
<div class="d-flex flex-wrap align-items-center justify-content-center gap-3 p-3 h-100" style="min-height:200px">
<h2 class="display-6 fw-bold text-primary mb-0 fx-retro-style">Arcade</h2>
<button type="button" class="btn btn-warning fw-bold fx-retro-style">Press start</button>
</div>
/* CSS (already in assets/css/effects.css) */
.fx-retro-style { text-shadow: 3px 3px 0 var(--wt-accent), 6px 6px 0 var(--wt-secondary); }
.fx-retro-style.card, .fx-retro-style.btn {
text-shadow: none; border: 2px solid var(--wt-text, #212529);
box-shadow: 6px 6px 0 var(--wt-text, #212529);
transition: transform .2s ease, box-shadow .2s ease;
}
.fx-retro-style.card:hover, .fx-retro-style.btn:hover, .fx-retro-style.btn:focus-visible { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--wt-text, #212529); }
.fx-retro-style.btn:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--wt-text, #212529); }
@media (prefers-reduced-motion: reduce) {
.fx-retro-style, .fx-retro-style::before, .fx-retro-style::after, .fx-retro-style *, .fx-retro-style *::before, .fx-retro-style *::after { animation: none !important; transition: none !important; }
}