While windowless buildings are not explicitly illegal, they must comply with building codes and zoning regulations that mandate specific criteria for windows, ventilation, and emergency egress.