  Necessary and sufficient conditions are offered for Sobolev type spaces built
on rearrangement-invariant spaces to be continuously embedded into
(generalized) Campanato and Morrey spaces on open subsets of the
$n$-dimensional Euclidean space. As a consequence, the optimal target and
domain spaces in the relevant embeddings are identified. Our general criteria
are implemented to derive sharp embeddings in the class of Orlicz-Sobolev
spaces.
