CSS Developer Shares a Link With Tips for CSS Coding

A CSS programmer recently came across a website that offers tricks for more efficient coding in CSS. A particular article on the site caught the person's attention. This article was about how a coder can use box shadows and clip path together. The programmer thought this was interesting and wanted to share it with the CSS programming community in order to see what other experienced coders thought about it.

One person replied with comments that they had never seen the filter for drop shadow before this time. Another coder replied to that person stating that they had used box shadow, and now they understood the difference between a drop shadow and a box shadow. A person replied back that it has a high cost to the performance of a site, and it should be used wisely and with an abundance of caution. Another person agreed with this and explained that in their experience, animated effects like this often cause mobile browsers to crash.

A different person said that they use box shadows and clip paths together in child elements. This person felt that it created a nice effect to use them together, especially on things such as arrows. Separately, a person replied that these effects also work well with transparent PNGs.

A few other people had comments about box shadows and filters. These people had additional details to share about how these effects change the speed and performance of a site, especially in the mobile environment. One person noted that the filter attribute has a bigger hit on a site's performance than box shadow does. However, the filter attribute is the only way that a programmer can implement a shadow on an irregular shape.

Another person stated that the filter attribute is not supported by IE version 11. They also noted that the filter attribute is incompatible with Safari and Edge. This person discovered that wrapping the filter attribute in an HTML element does work in all of these situations. The original poster wrote back that they were happy to have all of this additional knowledge for their future coding. For more information click here https://css-tricks.com/using-box-shadows-and-clip-path-together/.