:before and :after should only work on the element which can act as a container of content. <input> cannot contain any content so it should not support those pseudo-elements. Chrome supports it because it does not follow the spec (or bug?).
Reference : https://stackoverflow.com/questions/37653706/before-with-input-in-firefox