In The Importance of Being Earnest, by Oscar Wilde, the themes of manners and morality are treated trivially (in Wilde's own words) because they are interconnected for very shallow and superficial reasons. That is what gives it the ironic nature that makes the play a comedy of manners.
Morality is a consistent topic in Wildean literature. Part of it is because Wilde's own morality (which was a thick topic in Victorian England) was often questioned, especially after the publication of his only novel, The Picture of Dorian Gray. He was so attacked that he basically counterattacked by characterizing morality as a superfluous behavior that goes hand in hand with manners. In other words, he would treat the topic of morality, which is a deep symbol of character, as a learned behavior that could be disrupted at anytime, just the same as manners. Hence, if you act like you are highly moral you can be deemed as a person of good manners. This is meant to be ironic, sarcastic, and humorous.
In The Importance of Being Earnest, morality is a game of manners. Lady Bracknell, for example, had the exaggerated mannerisms that were typical of snobby aristocrats. She turned her nose at Algernon's friend, Jack, because she did not consider that he or Algernon were "well-behaved”. However, that immediately left her mind when Jack mentioned his substantial income and his many properties.
Algernon also had the most polite and cultivated mannerisms in the play, but he led a life that left very little to say for morality: He lied to his family, escaped responsibilities, ran bills that he did not pay, plus he ate and spent excessively. However, Algernon would place more importance in his dress suit than in his moral life.
Jack was quite polite to Lady Bracknell, showing the most gentlemanly mannerisms that he could show in order to earn her blessing to marry her daughter Gwendolen. However, after receiving the ill treatment that he got from her for not having a "family name", he called her a "gorgon" and many other insults. Algernon was not upset. In fact, he said that "he loved to have his relatives abused".
Therefore, we can conclude that mannerisms were shallow masks of politeness just like morality was a shallow mask of character. They were both behaviors that were not necessarily inherent to the characters, and could disappear at any given moment.