Changes in tax laws are usually applied retroactively to the year they’re enacted. However, this has occurred mostly for *decreases* in taxes whereas increases are usually for prospective years.
No sense in worrying about a hypothetical cap gains increase which most likely won’t be retroactive anyway.