Added conditional inserts of attributes, classes and style-properties.