The sekhakh must provide protection from the sun. As long as the sekhakh blocks most of the sun’s rays, the sukka is kosher, as the halakhic principle that “most is tantamount to all (rubo ke-khulo)” is invoked (Sukka 2a). This is measured at the level of the sekhakh, so even if at the floor of the sukka it seems that there is more sun than shade, as long as the shade exceeds the sun at the level of the sekhakh, the sukka is kosher. This is because, as the sun’s rays descend, they become broader but also weaken, so in truth there is more shade than sun.
Le-khatḥila, the sekhakh should provide plenty of shade, so that it is pleasant to sit in the sukka. At the same time, it should not be so thick that it is like a permanent home. That is, ideally it is preferable that stars be visible through the sekhakh at night, or at least sunlight should be visible during the day. Be-di’avad, however, even if no ray of sun can penetrate the sekhakh, it is still kosher (SA 631:3). If the sekhakh is so thick that even rain cannot penetrate, some maintain that the sukka is invalid, because it is like a permanent home (Rabbeinu Tam). One should defer to this view. However, under pressing circumstances, when it is impossible to thin the sekhakh, such as on Shabbat and Yom Tov, one may sit in such a sukka and even recite the berakha upon doing so.
If the shade exceeds the sun for most of the sekhakh’s coverage, but the sun exceeds the shade in a small part, the entire sukka is kosher, and even those sitting beneath the sparse sekhakh may recite the berakha over sitting in a sukka.
Sometimes sekhakh is not laid out flat, so at certain times of the day the sunny areas are larger, and at other times the shady areas are larger. In practice, we determine the status of the sukka based on the situation at noon. If it is mostly shaded, it is kosher; if not, it is invalid. (In some instances, even when there is more sun, we consider the sekhakh as though it were laid flat, and if that would make it so that it has more shade than sun, it is kosher; see SA 631:5.)
According to Rabbeinu Tam, if rain cannot penetrate the sekhakh, the sukka is invalid, while according to Rosh, Rashi, and Yere’im, it is kosher. The lenient ruling is also implicit in all the Rishonim who do not mention this new requirement. Nevertheless, several Rishonim and Aḥaronim write that it is proper to follow the stringency of Rabbeinu Tam, though under pressing circumstances one may be lenient (Birkei Yosef 631:2; MB 631:6). The implication is that one may even recite the berakha, following Radbaz’s view (2:229) that once a sukka has been deemed kosher, one recites the berakha in it, and we do not apply the rule that “when uncertain about berakhot we are lenient.” This is also the opinion of Shevet Ha-Levi (7:60) and Ḥazon Ovadia, p. 37. See Harḥavot.
. The shade must be greater than the sun in two different senses: 1) the shade must exceed the sun for most of the area of the sekhakh’s coverage; 2) there must be an outright majority of shaded areas. Some say that one must ensure that there is no area of 7×7 tefaḥim (53.2 cm x 53.2 cm) with more sun than shade, as that large an area is significant and therefore disqualified (Rema 631:2; Levush; SAH). Others are lenient even in such a case (Me’iri; the implication of SA). To uphold both views, one should ensure that the sukka contains no 7×7 tefaḥim area where the sun exceeds the shade, but be-di’avad one may recite the berakha even while sitting there.