Only automatically add rule when selector is given.