I believe the basic seense of the rule is that if the quoted matter is a phrase or less -- not a sentence -- it does not merit its own period; hence the final period goes outside the quotation marks.

Thus: Her friends said he was a little "light in the loafers".
-but: Her friends said, "He was a little light in the loafers."

With a bit of LIU, I'm sure someone will provide the exact rule.