Last Updated: February 25, 2016
· not-only-code

Force IE to redraw pseudo-elements

If you have something like this:

div:after {
     content: '';
     position: absolute;
     top: 0;
     height: 0;
     width: 15px;
     height: 15px;
     background-color: gray;
} {
     background-color: orange;

And you want to change the state of this div with JavasScript adding active class, you must to know that IE doesnt redraw pseudo-elements if their content dont change, then remember to change the content when state changes: {
     content: ' ';
     background-color: orange;