Sets the style of a mercury component from the parent element's width and height