Gerrymandering — where one party draws legislative districts to stay in power and diminish the votes of the opposing party — doesn't appear to be very popular. In at least three states on Tuesday, voters approved ballot measures to take district drawing out of the hands of the state legislature and give it to nonpartisan or independent commissions — Michigan, Missouri, and Colorado passed their initiatives overwhelmingly, while an anti-gerrymandering measure in Utah is barely leading with votes left to count.

The reason for a party's temptation to gerrymander itself into power after every decade's census is probably pretty obvious, but it doesn't always work out as planned. Just ask Texas Republicans. While Democrat Beto O'Rourke and every other statewide Democrat lost in Texas on Tuesday, Democrats flipped two U.S. House seats, two state Senate seats, and an unexpectedly robust 12 state House seats. Five of those 12 state House seats were in Dallas County. That was a byproduct of aggressive gerrymandering, The Dallas Morning News reports.

After winning a supermajority in 2010, House Republicans gerrymandered Dallas County a little too thin to ensure they had a majority of the county's 14 House seats. But Republicans dropped from eight of those 14 seats to seven in the 2016 election, and on Tuesday they won two. Instead of opting for safer GOP districts in whiter parts of the county in 2011, "Republicans packed and cracked Latino voters across the county to diminish their voting strength overall and ensure a GOP majority," The Texas Tribune says.

"The lesson is you can get too clever in gerrymandering," redistricting expert Michael Li at NYU's Brennan Center for Justice tells the Tribune. Voting rights lawyer Jose Garza was more direct, saying Republicans "shaved those things off a little too close because they got greedy." You can read more about the perils of redistricting, and see the maps, at The Texas Tribune. Peter Weber