Talmud for Maaser Sheni 3:8
הַלְּשָׁכוֹת, בְּנוּיוֹת בַּקֹּדֶשׁ וּפְתוּחוֹת לַחֹל, תּוֹכָן חֹל וְגַגּוֹתֵיהֶן קֹדֶשׁ. בְּנוּיוֹת בַּחֹל וּפְתוּחוֹת לַקֹּדֶשׁ, תּוֹכָן קֹדֶשׁ וְגַגּוֹתֵיהֶן חֹל. בְּנוּיוֹת בַּקֹּדֶשׁ וּבַחֹל וּפְתוּחוֹת לַקֹּדֶשׁ וְלַחֹל, תּוֹכָן וְגַגּוֹתֵיהֶן מִכְּנֶגֶד הַקֹּדֶשׁ וְלַקֹּדֶשׁ, קֹדֶשׁ, מִכְּנֶגֶד הַחֹל וְלַחֹל, חֹל:
The chambers [by the walls of the Temple] that are built in the sacred area and that open out onto the non-sacred area, their insides are non-sacred and their roofs are sacred. If they are built in the non-sacred area and open out onto the sacred area, their insides are sacred and their roofs are non-sacred. If they are built in both the sacred area and non-sacred area and open out onto both the sacred area and the non-sacred area, [the parts of] their insides and roofs that align with the [border of the] sacred area and into the sacred area are sacred, and [the parts that] align with the [border of the] non-sacred area and into the non-sacred area are non-sacred.
Jerusalem Talmud Maaser Sheni
If chambers are built in the holy precinct and open to the profane domain, their insides are profane but their roofs holy85In the profane domain, Second Tithe and simple sacrifices (family sacrifices) may be consumed. In the holy part, most-holy sacrifices may be consumed and simple sacrifices be slaughtered. (Most-holy sacrifices must be slaughtered inside the precinct, North of the altar.). If they are built in the profane domain but open to the holy precinct, their insides are holy but their roofs profane. If they are built in the holy and the profane and open both to the holy and the profane86The chamber of the fireplace, where the Cohanim kept watch during the night and from which a Cohen who became impure could first descend to a subterranean miqweh and then leave directly into the profane domain as a ṭevul yom., their insides and their roofs, over the holy and in direction of the holy they are holy87The border between holy and profane domain was indicated by a mosaic strip. This strip takes the function of the wall which belongs to both domains., over the profane and in direction of the profane they are profane.