First rule: It is perfectly allowable for the Ds to expand the court, there is no law stopping it. It is only inertia that keeps the court at 9 Justices now, there is no law proscribing that, no evidence that 9 is some magical number.
Second rule: McConnell refusing to vote on Obama's nomination for a SCOTUS seat under made up logic about it being an election year, then fasttracking a Trump nomination in the very next election year, changing his logic. Perfectly legal, ethically dubious.
Precedent just means something was established. Technically, there's indications historically that SCOTUS Justice count should go along with the number of Circuit Courts at the federal level (which in this case would actually be 13), but that is, again, not proscribed anywhere by law.