Setting a style attribute twice can be useful when the browser does not support one of the assignments. Here's the explanation I found while looking this up: "Incompatible browsers will ignore the declaration they can’t parse. Compatible browsers will overwrite the fallback declaration with the newer declaration." In this case, the sqrSizeCSS uses vw and vh units, which are not supported in some earlier browers. The sqrSize value is just a number, and the px unit that follows it has better support than vw and vh.
Setting a style attribute twice can be useful when the browser does not support one of the assignments. Here's the explanation I found while looking this up: "Incompatible browsers will ignore the declaration they can’t parse. Compatible browsers will overwrite the fallback declaration with the newer declaration." In this case, the sqrSizeCSS uses vw and vh units, which are not supported in some earlier browers. The sqrSize value is just a number, and the px unit that follows it has better support than vw and vh.