Shadows
Simple box shadow property styles available as utility classes and CSS variables.
Examples (anchor)
Small
Default
Large
Extra large
Examples HTML
<div class="shadow-sm">Small</div>
<div class="shadow">Default</div>
<div class="shadow-lg">Large</div>
<div class="shadow-xl">Extra large</div>
Using the module (anchor)
To use the module load the StyleMods scss
directory as follows (changing the path to suit the source files location as required) then include the Sass mixin anywhere below.
custom.scss
@use "stylemods/scss" as *;
@include shadows-css;
See customizing for information about using the Sass and CSS variables in the source code below to customize the styles, and Sass variables (on the using StyleMods page) for other ways to use the variables to create custom styles.
Source code (anchor)
shadows.scss
// ----------------------------------------------------------
// Shadows
// ----------------------------------------------------------
$shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15) !default;
$shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1) !default;
$shadow-lg: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.15) !default;
$shadow-xl: 0 1rem 2.5rem rgba(0, 0, 0, 0.175) !default;
@mixin shadows-css {
:where(html) {
--shadow: #{$shadow};
--shadow-sm: #{$shadow-sm};
--shadow-lg: #{$shadow-lg};
--shadow-xl: #{$shadow-xl};
}
.shadow {
box-shadow: var(--shadow);
}
.shadow-sm {
box-shadow: var(--shadow-sm);
}
.shadow-lg {
box-shadow: var(--shadow-lg);
}
.shadow-xl {
box-shadow: var(--shadow-xl);
}
} // end shadows-css