DAR-1762, add context to :before and :after selectors