adjusted style application to allow user to define size unit type (default sto px)