For the detection of concentrations of reducing and oxidising gases as incredibly small as 10 parts per billion, the NANOPHOS project aimed beyond the established electrochemical or spectroscopic gas sensor concepts. By exploiting emerging nanophotonics technologies, a new class of optical sensors was developed to alleviate deficiencies in terms of sensitivity and selectivity. Based on the detection of changes in the refractive index of oxide films when exposed to hazardous gases, optical sensors promise significant improvements in the accuracy of gas concentration measurements. Thin films of zinc oxide (ZnO), tin dioxide (SnO2) and other inorganic basic materials were used as sensing media with very fast response times. Alterations in their optical properties could be detected by means of an optical interrogation system, which generates light beams to be directed towards the thin oxide films. Researchers at the Institute of Electron Technology in Poland were assigned the challenge of fabricating diffractive optical elements that respond to hydrocarbons and other organic compounds, including alcohols. Optical gratings were written on specially designed photosensitive polymers using photolithographic techniques, as well as on multilayer metal/metal oxide thin film structures. Polymeric materials are transparent over a broad wavelength region, but they suffer from several disadvantages, including a large thermal expansion coefficient and degradation after prolonged illumination. On the other hand, metal oxide-based optical gratings provided for the increased selectivity that was desired. Variations in gratings' diffraction efficiency, not only as a result of changes to their refractive index, but also to their geometry can be used to measure extremely low gas concentrations. Additional advantageous characteristics of these sensing elements include the possibility to operate at room temperature, as well as in unusual and extreme conditions.