I've noticed in some proofs, if $A\subset B$ for $B$ a topological space, it seems that it is enough to show that $A$ intersects every set in a base of $B$ to prove that the closure $\overline{A}=B$. I noticed this for instance in the proof that the closure of $\mathbb{Q}$ is $\mathbb{R}$ in the lower limit topology.
Is this ultimately true in general, that if a subspace meets every subset of a base of the ambient space, that the closure of the subspace is the whole space? If so, why?