Yeah, if any employee of mine directly went against company policy, no matter how small, then bragged about it on social media, they'd be written up (or fired if it was a second offense). Blatant disregard to something as minor as dress code, where you're expected to present yourself in a professional manner in a professional environment, shows me that you don't care about the work you do or value the place that pays you to do it.  Now, if it's an, "Oops, it was a rough morning and I forgot I was wearing this," kind of situation, no harm, no foul. But even if an employee feels the dress code (or any other) policy is too strict, going against it intentionally is not the way to get that policy changed, and certainly does not reflect well on their character or work ethic.