The Seven Foot Rule is a great rule of thumb to be safe. It's simple to remember and for most conditions quite conservative.
But don't push it. If you are on a mountainside with tons of rain in the winter months, do speak to someone is professionally qualified.
Otherwise you are flirting with disaster.
Simple enough thought.
As you see here any footings on a sloped grade like this should be quite safe as long as there widest point of the footing is no closer than seven feet from the slope if you project a horizontal line at from the point of the underside of the footing.