Technically no browser should support pseudo elements on self-closing elements (<br/>, <hr/>, <input /> etc) as they have no “internal space” to hold them but….some do so nevertheless.
This is what the W3c spec says
Authors specify the style and location of generated content with the :before and :after pseudo-elements. As their names indicate, the :before and :after pseudo-elements specify the location of content before and after an element’s document tree content. The ‘content’ property, in conjunction with these pseudo-elements, specifies what is inserted.