Better handling of pseudo-elements