Let $(X,Y): \Omega \to (\mathbb{R}^d, F)$, with $F = \left\{ 1, \dots, n \right\}$ be a random variable. According to Wikipedia the Bayes classifier is $$C_B(x) = \arg\, \max \mathbb{P}(Y= i \,|\, X=x),$$ with $x \in \mathbb{R}^d$. Now I understand the idea, "pick the most likely one". However, if $X$ has a density, then $X=x$ is a zero probability event. How should conditioning on this event be understood?
Of course you can define something like $$\mathbb{P}(Y=i \,|\, X=x) = \lim \limits_{\varepsilon \to 0} \mathbb{P}(Y=i \, | \, X \in B(x, \varepsilon)),$$ where $B(x,\varepsilon)$ is a ball of radius $\varepsilon > 0$ around $x$, but I'm unable to find a reference for this.