Legislation that gives Ontario municipalities the option of using ranked ballots in the next municipal elections in 2018 while also banning corporate and union donations passed the legislature today.

The preferential ballots let voters rank candidates instead of voting for a single person.

Ontario's Liberal government says the winning candidate will have a higher percentage of the vote and therefore a broader mandate.

Proponents of the voting system believe it can make campaigns more civil, forcing candidates to be more engaged in substantive debate, instead of just trying to get whatever percentage of the vote that will see them win.

The legislation also bans corporate and union donations to council candidates and would-be school board trustees in all 445 Ontario municipalities.

Municipal campaign nomination periods are also now shortened under the legislation by opening candidate nominations in May instead of January, with an end of July deadline.