Are closed embeddings characterized by a left lifting property in the category of topological spaces? It is well-known and easy to check that a continuous map between topological spaces is an embedding if and only if it has the LLP with respect to $A \to *$ and $B \to *$ where $A$ is the two-point codiscrete space and $B$ is the Sierpiński space.
Are closed embeddings also characterized by a left lifting property?
 A: As it turns out, there is a weak factorization system $(\mathcal{L}, \mathcal{R})$ where $\mathcal{L}$ is the class of closed embeddings and $\mathcal{R}$ is the class of all maps with the RLP with respect to $\mathcal{L}$. Unfortunately, my argument does not provide a very concrete description of $\mathcal{R}$ and I would be interested if anyone could shed some light on that.
The first observation is that if $f \colon X \to Y$ is a monomorphism between sets, then for any topology on $X$ there is the coarsest topology on $Y$ that makes $f$ into a closed embedding. This is easily verified, but perhaps slightly surprising since usually we obtain coarsest topologies satisfying certain condition by transferring them from codomains to domains.
Given any continuous map $f \colon X \to Y$ define $X \sqcup_f Y$ as the topological space with the underlying set $X \sqcup Y$ and the coarsest topology that makes both the inclusion $i_X \colon X \to X \sqcup_f Y$ a closed embedding and $\bar{f} = [f, \mathrm{id}_Y] \colon X \sqcup_f Y \to Y$ continuous. This space is characterized by the following universal property: a function $g \colon A \to X \sqcup_f Y$ is continuous if and only if $g^{-1}X$ is closed in $A$ while $g|g^{-1} X$ and $\bar{f} g$ are continuous.
This provides a factorization of $f$ into a closed embedding $i_X$ and a map $\bar{f}$ with the RLP with respect to all closed embeddings. The latter claim follows routinely from the universal property described above. If $f$ has the LLP with respect to $\mathcal{R}$, then by the standard retract argument it is a retract of $i_X$ and hence a closed embedding.
A few more remarks:

*

*An analogous argument works for open embeddings as well.

*The space $X \sqcup_f Y$ is a "Sierpiński mapping cylinder" where the standard interval is replaced with the Sierpiński space. (The case of open embeddings is obtained by reversing the Sierpiński space.)

*The best description of $\mathcal{R}$ that I know is that those are retracts of maps of the form $\bar{f}$. In particular, it is not clear that there is a set of maps that detects closed embeddings by LLP. Again, I'd be curious to know if more can be said.

