

Grass jumps directly from one block to a neighbor and is not affected by gaps or other blocks being "in the way." Grass blocks spread at random intervals and have an equal chance of spreading to any suitable dirt blocks that are in range. Grass blocks can grow under all other transparent blocks like glass, fences, or torches. Though water and lava are both light-filtering blocks (meaning they decrease sky light by 1 level but do not affect block light), other light-filtering blocks such as ice and slime blocks do not block grass from spreading to the dirt block. When Grass is Random ticked, it spreads by checking 4 blocks within range, and converting any dirt blocks selected into Grass. The block directly above the dirt block must not be lava, water, or a waterlogged variant of a block.

That means blocks that partially let light through such as stairs and slabs must not have their light-blocking side(s) facing the dirt block.

↑ Times are for unenchanted tools as wielded by players with no status effects, measured in seconds.
