Problems with reading CSS properties in Safari

  • Written by: Marko Samastur
  • Published on:
  • Category: Javascript

I was playing with a neat script that reads CSS properties of a given element, but there’s a problem. Fetching background color of an element doesn’t work in Safari, if it was inherited instead of explicitly set in CSS.

Does anyone know how to reliably get that information?