Move the opacity getter to the class ElementStyle