In the double slit experiment what, exactly, is a slit? I have seen and read several times about the double slit experiment, that an electron (or even a molecule (!) as I found out later) behaves like a wave that swaps over those slits.
However I wonder now: What exactly is a slit for an electron (mathematically)? Which properties does it have to have to be a slit and prevent an electron from passing through? I think of the material that blocks the electron as something that consists of lots and lots of little pieces between which is empty space. 
If the material is currently blocking the electron, then one could just widen the space between the material the wall is made.. or make the wall thinner. 
I mean there are really many different variations of that experiment possible and I never find any clear information on that. 
Thus I would be very happy, if someone could either elaborate on that topic, link it to a different thread (I did not browse through all double slit experiment threads on this site!) or to an outer source for me for further reading. 
 A: To fill out Mew's comment further:

A slit is a gap wide enough for the electron to pass through

True, but for the purposes of a clear discussion of double slit interference, we need the following further quality: a slit should be such that there is much less than a wavelength difference between the pathlength of all paths through the putative "slit" to any point on the interference screen in the experiment. So it depends on the dimensions of the experiment. In the diagram below, the  maximum path difference between all possible paths through the slit is 
$$\sqrt{d^2 + \left(x+\frac{W}{2}\right)^2} - \sqrt{d^2 + \left(x-\frac{W}{2}\right)^2}\approx \frac{x\,W}{d}$$
So, if $\frac{2\,\pi\,x\,W}{\lambda\,d}\ll 1$, where $\lambda$ is the wavelength of the interfering field, then any interference effects can only be owing to the different paths through two separate slits, and there is negligible interference between paths through the same slit. When this condition is not fulfilled, there will be significant interference effects from each slit alone.


Answers to Comments:
User Steveverrill writes:

While this is interesting, a worked example would be useful. I understood the wavelength of electrons is much less than visible light (approximately 3 orders of magnitude even for electrons accelerated to a handful of eV according to this.) quantummechanics.ucsd.edu/ph130a/130_notes/node72.html. It seems to me the slit would have to be impossibly thin. W<

You need to set $d/x$ to be big enough to uphold the condition stated and also you can use electrostatic lenses to magnify the diffraction pattern. For example, see:
Roger Bach, Damian Pope, Sy-Hwang Liou and Herman Batelaan, "Controlled double-slit electron diffraction", New J. Phys. 15 2013
where we have 62nm wide slits and 50pm wavelength electrons: this means that $d/x$ has to be of the order of $10^5$: with a 150um wide pattern, this makes for $d\approx 75\times 10^{-6}\times 10^5$ which is $7.5m$, but electrostatic lenses will let you shorten that distance somewhat. See the full experimental writeup that you can download from that article: go to the "supplementary data" at http://iopscience.iop.org/1367-2630/15/3/033018/media and click on the download arrow: you'll get a more comprehensive document on the setup.
A: WetSavannaAnimal's answer covers the geometry of the slits necessary to produce a clear pattern.

Which properties does it have to have to be a slit and prevent an
  electron from passing through?

These factors decide what material to use for the barrier/boundary of the slits: 


*

*it's electron-stopping power primarily, which depends on the energy of the
electron beam

*its availability 

*how precisely and easily slits can be engineered into it.


An electron beam is beta radiation. So the material used to create the slit would be something that is effective at stopping beta radiation. Cloth or paper could be enough if the energy was low enough. A thin sheet of metal would usually suffice and I think is usually used. Metal can of course hold quite a sharp straight edge compared to most other materials and is easily available and easy to engineer.
Of course it doesn't have to be an electron beam. A beam of light is much simpler to produce and the best materials for that are obvious: anything opaque.

If the material is currently blocking the electron, then one could
  just widen the space between the material the wall is made.. or make
  the wall thinner.

I think what you are saying amounts to a diffraction grating, which is a multitude of holes regularly spaced (with light it behaves much like a prism). It would only happen at a very precise point between blocking the beam and letting it through unimpeded and would only produce a meaningful pattern if the distances "between the material" were appropriate for the wavelengths of the beam. Otherwise it will just be a fainter version of no barrier at all.
A: 
The double slit experiment for electrons is mostly a Gedankenexperiment ... you can completely ignore it because there is nothing there for you to learn. Start with the Schroedinger equation for hydrogen and work your way trough atomic physics. –  CuriousOne

One can learn a lot from electron interaction with edges and the intensity pattern behind such edges. First a experiment with electrons was performed in 1956 by  G. Möllenstedt and H. Düker "Beobachtungen und Messungen an Biprisma-lnterferenzen mit Elektronenwellen".

They found out that the intensity pattern behind this edges changes in accordance with the electric potential:

So there has to be an interaction between the electron beam and the surface electrons from the edges.
Do you remember the intensity distribution of light behind an edge? The first fringe starts inside the geometric border line of the shadow. In the electron experiment without electric potential the first fringe starts outside the geometric border line of the shadow:

In the electron experiment without electric potential the first fringe starts outside the geometric border line of the shadow. The surface electrons deflect the electrons in the beam and that is why the shadow is broader. In the case of photons the surface electrons can attract and repulse photons in different phases of their motion and that is why the first fringe lay behind the geometrical border line of the shadow.
Later the experiment was performed with single electrons but the mentioned from you interaction between edges (slits) and the moving electrons was not taken in attention and it was declared, that electron interfere with itself.
