Conjugated microporous polymers (CMPs) attract marked attention as sustainable, noble metal free materials in a wide range of applications such as heterogeneous catalysis, gas storage and separation, energy storage, optoelectronics, photovoltaics, and sensors. Thanks to their high chemical modularity, exceptional thermal and chemical stability, and a wide array of synthetic approaches, several classes of CMPs have emerged over the last two decades, like polymers of intrinsic microporosity (PIMs), hyper-cross-linked polymers (HCPs), covalent organic frameworks (COFs) and their nitrogen-containing analogues -covalent triazine-based frameworks (CTFs). Arguably, the most important parameters for the performance of these materials in optoelectronics and catalysis is their bandgap energy and their band structure. These will not only depend on the size and co-planarity of the π-conjugated domains in the polymer backbone, but also on the chemical composition of the building blocks. The most common strategy to vary the bandgap of CMPs relies on changes of the size of the carbon-based, polycyclic building blocks. Although this bottom-up approach can indeed lead to networks with variable pore sizes and bandgaps, it can also have detrimental effects on the pore structure once pore channels get sufficiently large for inter-penetration of polymer strands to occur. One further strategy to tune the optical bandgap of a conjugated polymer is the incorporation of heteroatom-containing donor-acceptor (D-A) motifs into its backbone. Recently, we have introduced a family of sulfur-and nitrogen-containing porous polymers (SNPs) that make use of D-A interactions between neighboring electron-deficient triazine (C3N3) cores and electron-rich aryl thiophene building blocks of the polymer to achieve control over the bandgap energy without large changes to the pore structure. In addition, incorporation of aromatic spacers between the donor-and the acceptor-domains enabled us to predictively control the strength of donor-acceptor interactions and -by proxy -the extent of charge-carrier recombination in these networks. This has implications for the fluorescence life-times and the outstanding performance in photocatalytic hydrogen evolution from water of these D-A materials. In this study, we make use of four key-properties of our conjugated, porous D-A polymersnamely, (1) their strong, covalent backbones, (2) their intrinsic Lewis acidity and basicity, (3) their permanently accessible pore channels to gaseous guest molecules, and (4) their optical bandgaps in the visible part of the spectrum -and we use them as optical and electronic sensors and switches that are triggered by volatile acid vapors and re-set by gaseous ammonia. While colorimetric chemical probes are known from molecular systems in solutions, or work on the basis of chemical transformations, the here-presented study shows one of the first instances of amorphous porous conjugated polymers used as fully-reversible, colorimetric chemical probes. Recently, we showed, that triazine-containing COFs, made by the same principle, can be also exploited as acid/base chemosensors, thus, highlighting the significance of our approach in view of making multifunctional smart materials. Herein, we choose four previously reported SNP systems as reference: SNP-NDT1, SNP-NDT2, SNP-BTT1 and SNP-BTT2 that consist of electron-donating thiophene-based naphthodithiophene (NDT) and benzotrithiophene (BTT) moieties, and electron-withdrawing 1,3,5-triazine (Tz) and tris-phenyltriazine moieties (Scheme 1). In addition, we expand the family of SNPs by three networks, two of which contain a benzodithiophene (BDT) moiety -SNP-BDT1 and SNP-BDT2. To study the effect of D-A dyads versus sheer heterocycle content, we further prepare one polymer comprised from electron-rich BTT-building blocks only -SP-BTT. All polymers were prepared using the robust, Pd-catalyzed Stille cross-coupling to link the readily available, stannylated derivatives of thiophene-based molecules with halogenated triazine (TzCl3) and tris-bromophenyltriazine (Tz(PhBr)3) or sulfur-containing benzotrithiophene (BTT-Br3) monomers (see SI and Table ). Scheme 1. Synthetic pathway towards sulfur-and nitrogen-containing polymers (SNPs) and sulfur-only polymer, SP-BTT. Electron-donating thiophene-based linkers (in red) are coupled with electron-accepting triazine-based monomers (in blue) via Pd-catalyzed Stille cross-coupling.