Is it possible with TileMills and CartoCSS?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
Yes, it is. This rendering is common for contour lines. See this blog entry for CartoCSS code.
I should warn you that when using this code (specifically,
text-comp-op operation), you won't be able to export your map in a vector format: SVG and PDF output would produce a raster image in a vector container. You might not need it though.