Dynamically changing pseudo classes

Following meter gauge should be solid green - Changing the paseudo class by changing value attribute