Breakdown of Wem der Dresscode egal ist, der bleibt draußen.
sein
to be
draußen
outside
bleiben
to stay
wem
whom
Questions & Answers about Wem der Dresscode egal ist, der bleibt draußen.
Why does the sentence start with Wem (dative) instead of Wer (nominative)?
The German phrase for "to not matter" is jemandem egal sein. The person who doesn't care takes the dative case (literally: "to whom it is equal"). Because of this rule, "whoever" must translate to the dative Wem. The actual subject of that first clause is der Dresscode.
What is the der doing in the middle of the sentence?
It acts as a pointer (a demonstrative pronoun) referring back to the "whoever" from the first clause. In the first half, the person was in the dative case (Wem). But in the second half, that same person is the subject doing the action (staying outside). We use the nominative der to show this change in role.
Could I just leave out the der and say "Wem der Dresscode egal ist, bleibt draußen"?
No, you cannot drop it here. In a "whoever" sentence, if the person's grammatical case changes between the two halves (here, switching from dative Wem to a nominative subject), you must include a pointer word like der to establish the new case for the main clause. You can usually only drop it if the case stays exactly the same in both halves.
Why does the verb bleibt come immediately after der?