The general rule for deck footings built on a slope are based on average soil conditions. So, if you have unstable soil conditions all bets are off. You will want to speak to an authority in your area. Usually a Geo-technical engineer or someone with lots of experience with building decks will know exactly what to do.
The Seven Foot Rule is a great rule of thumb to be safe. It's simple to remember and for most conditions quite conservative.
However, if you are on a mountainside with tons of rain in the winter months, speak to someone who is professionally qualified. Otherwise you are flirting with disaster.
As you can see in the photo, any footings on a sloped grade like this should be safe if the widest point of the footing is no closer
than seven feet from the slope when you project a horizontal line from
the point of the underside of the footing.
Note: The seven foot rule is only a rule of thumb. All slopes have to be examined and understood before any building commences. There are places in the St. Lawrence Valley, and Alaska where quick clay or leda clay, as it is sometimes called, is present.
This is potentially a very unstable soil at the best of times. A water laden slope would be at even higher risk of literally washing away under the right conditions.
Alternatively, in mountainous terrain soil can be a mix of sedimentary layers or alluvial rock or sand. This kind of slope is also at risk of sliding if its saturation point is reached. The seven-foot rule may NOT apply in any of these situations.
The topic of foundations and how to properly support a deck over a sloped grade demands local building knowledge that you must acquire
before you build or plan any light structure. On special locations like slopes or hillsides, take the time to contact your local building officials to find out what the soil is and what the common building practices are.
Obviously, a hillside deck can give you dramatic views and benefits but don't forget to consider safety in the equation.
Some Other Great Reading:
Home > Building A Deck > Deck Footing On A Slope