added getElementStyle helper function to get CSS props