The Supreme Court had the choice not only which way to rule, pro- or anti-gay marriage rights, but also how they were going to rule. They could have ruled just federalism, saying, "This isn't a matter for federal; this isn't a federal issue at all. States should decide it." Or they could decide it on equal protection grounds and say that, "Gay discrimination is wrong."
