California Family Code Section 3020 (c) states, 3020.
(c) Where the policies set forth in subdivisions (a) and (b) of this section are in conflict, any court's order regarding physical or legal custody or visitation shall be made in a manner that ensures the health, safety, and welfare of the child and the safety of all family members.
California Family Code Section 3020 (b) states, 3020.The court, in its discretion, may require the parents to submit to the court a plan for the implementation of the custody order.(2) If to neither parent, to the person or persons in whose home the child has been living in a wholesome and stable environment. Like most states, the standard for child custody determinations in California is the overall best interest of the child with an emphasis on assuring the "health, safety, and welfare" of the child and "frequent and continuing contact" with both parents absent child abuse, domestic violence, or where the contact would not be in the best interest of the child as provided in the California family code section 3011 (See California Family Code Section 3011, 3020, 3040, 3080.Further, according to California family code section 3040, child custody should be granted in an order of preference and according to the best interest of the child.