In previous Halachot we have explained that Yom Tov and Shabbat are equal regarding all prohibitions besides for certain works associated with food preparation, such as cooking, which are permitted on Yom Tov.
Igniting a Flame
One may not produce a new fire on Yom Tov, for instance by striking a match, even for the purpose of food preparation. It is, nevertheless, permissible to light a match or candle from a flame which existed before the onset of Yom Tov for the purpose of food preparation. For this reason, one may move a matchbox on Yom Tov and this is not considered Muktzeh, since matches are usable on Yom Tov by igniting them from a pre-existing flame.
Thus, if one wishes to cook on one’s gas stove on Yom Tov, one must take care to prepare a candle lit before Yom Tov so that one may light a match from it and subsequently use this match to light the gas range; in this way, one will be permitted to cook as usual.
Extinguishing a Flame
One may not extinguish a flame on Yom Tov; even partially extinguishing a flame, such as by minimizing the flame on a gas stovetop, is prohibited. Some permit lowering a flame when this is done to prevent the food being cooked on top of it from becoming burnt; Maran Rabbeinu Ovadia Yosef zt”l rules accordingly. However, completely extinguishing the flame is forbidden.
The Permissible Method to Extinguish a Flame
Since it is forbidden to extinguish a flame on Yom Tov, it was once customary for people to leave their gas stoves running the entire Yom Tov, for extinguishing is prohibited. Eventually though, Maran Rabbeinu zt”l was asked about this matter, and he ruled that one may cause a flame to be extinguished indirectly, meaning that one should fill a teapot with water until the top and place it on the fire until it boils and by doing so, the water will overflow and spill onto the fire, thereby extinguishing it. After doing so, one may then turn off the knobs of the stove to prevent gas from leaking into the house. (The reason for this leniency is based on the fact that when a flame is not burning on a wick or a piece of wood and is merely burning atop a piece of metal, such as a gas stovetop, the prohibition to extinguish it is merely rabbinic. Thus, an indirect extinguishing, which is likewise only a rabbinic prohibition, is permitted here.)
Regarding the boiled water, one should use it to make tea or coffee, so that their preparation will have been for a food preparation purpose, for one may not boil water on Yom Tov merely in order to extinguish a flame, as it is only permissible for the purpose of food preparation.
It has been quoted in the name of the great Rishon Le’Zion, Hagaon Rabbeinu Yitzchak Yosef Shlit”a, that it would be permissible to extinguish the fire on newer-models of gas stovetops by blocking off the sensor with a spoon and as a result, a few seconds later, the sensor will send a signal to turn off the gas.
(Some write that just as one may cause a flame on a gas stove to be extinguished by boiling a teapot of water on top of it as we have discussed above, so too, one may extinguish a flame on the gas stove by shutting the central gas line through which gas flows to the stove, for this cannot be considered a direct extinguishing, since one is not doing so through a gust of wind or turning off the knobs on the range; rather it is considered indirect, for this is an action that brings about the extinguishing of the flame in a matter of seconds, and is thus permitted. Maran zt”l, nevertheless, disagrees and writes that the Halacha does not follow this opinion, for we can see clearly that immediately upon shutting the central gas line, the flame begins to dwindle until it is completely extinguished; thus, this is not the kind of “indirect action” the Torah permitted. We find a similar concept in the Gemara (Beitzah 22a) that if one removes some olive oil from a candle filled with oil where a wick is burning thereby causing the candle to extinguish earlier than it would have, one has transgressed the prohibition of extinguishing. If so, we see that not all indirect actions are equal, and anytime one carries out the “indirect” action and the outcome is immediately noticeable, this cannot be considered an indirect action.)
Summary: One may not ignite a flame on Yom Tov. One may transfer a pre-existing flame to a match or another candle for purposes of food preparation and the like. One may likewise not extinguish a flame on Yom Tov. One may extinguish a flame on the stove top by boiling a pot of water on top of it thereby allowing the water to overflow onto the flame and extinguish it. One should use this boiled water to make tea or coffee.
By Popular Request: It is permissible to make ice cream or jello on Yom Tov, as long as one intends to eat it in Yom Tov. It is permissible to transfer a flame to ignite a gas stovetop, even when there it has a sensor which is meant to prevent gas from leaking out (as long as no lights or indicators turn on as a result of turning on the gas knob). One may light the stovetop with a match although there may be an electric spark which ignites the flame by placing the match next to the spark, in which case one will have no purpose for this spark, and letting the gas ignite in this manner.