Check whether a CSS style string contains exactly one property matching the given name.
hasOnlyStyleProperty("font-size: 20px", "font-size") // truehasOnlyStyleProperty("font-size: 20px; color: red", "font-size") // false Copy
hasOnlyStyleProperty("font-size: 20px", "font-size") // truehasOnlyStyleProperty("font-size: 20px; color: red", "font-size") // false
Check whether a CSS style string contains exactly one property matching the given name.