I ran into a similar problem and I used window.getComputedStyle(domElement) which takes into account the sx properties set.
window.getComputedStyle(domElement)
Then you can do the appropriate style checks as needed.