Scss box-shadow is deprecated and will be removed - How to work around

StackOverflow https://stackoverflow.com/questions/20262612

  •  06-08-2022
  •  | 
  •  

سؤال

I am trying to use the following include in my style.scss file:

@include box-shadow(red 2px 2px 10px);

However i get a an error of:

WARNING: box-shadow is deprecated and will be removed in the next major version release

I've tried to google this, but i am not sure what i use instead, is there another mixin i can manually make or use? I looked on the Bourbon website in their docs but all i found was:

Deprecation Warning: The box-shadow mixin has been deprecated. Use the official spec.

هل كانت مفيدة؟

المحلول

Here is the discussion within Bourbon

Box-shadow mixin should be deprecated based on current implementation of the property in browsers.

so you should use:

box-shadow: red 2px 2px 10px;

instead of:

@include box-shadow(red 2px 2px 10px);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top