Replies: 1 comment 1 reply
-
Assuming you're using BT via sass, you can iterate through the theme colors and generate a themed variant (using the default box-shadows styles) like this: @each $state, $value in $theme-colors {
.shadow-#{$state} {
box-shadow: 0 0.5rem 1rem rgba($value, 0.15);
}
.shadow-#{$state}-sm {
box-shadow: 0 0.125rem 0.25rem rgba($value, 0.075);
}
.shadow-#{$state}-lg {
box-shadow: 0 1rem 3rem rgba($value, 0.175);
}
.shadow-#{$state}-inset {
box-shadow: inset 0 1px 2px rgba($value, 0.075);
}
}
Note that the default shadows (if you are planning to use them) need to be enabled with I'm not seeing this in bootstrap, however.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it crazy if we allow for shadows of different colours? e.g.
shadow-success
orshadow-danger
? Perhaps I'm missing something in the documentation etc. but I would welcome this ability: https://getbootstrap.com/docs/5.1/utilities/shadows/Beta Was this translation helpful? Give feedback.
All reactions