(a)
Every provision in a written instrument relating to real property that purports to forbid or restrict the conveyance, encumbrance, leasing, or mortgaging of that real property to any person because of any characteristic listed or defined in subdivision (b) or (e) of Section 51 is void, and every restriction or prohibition as to the use or occupation of real property because of any characteristic listed or defined in subdivision (b) or (e) of Section 51 is void.
(b)
Every
restriction or prohibition, whether by way of covenant, condition upon use or occupation, or upon transfer of title to real property, which restriction or prohibition directly or indirectly limits the acquisition, use or occupation of that property because of any characteristic listed or defined in subdivision (b) or (e) of Section 51 is void.
(c)
In any action to declare that a restriction or prohibition specified in subdivision (a) or (b) is void, the court shall take judicial notice of the recorded instrument or instruments containing the prohibitions or restrictions in the same manner that it takes judicial notice of the matters listed in Section 452 of the Evidence Code.