Ask

stripe billing portal lets people downgrade mid-cycle and i eat a $38 credit every time

The portal configuration has subscription_update.proration_behavior and the default is create_prorations, which is exactly the credit you are seeing. Set it to none and the switch takes effect immediately with no money moving.

Better shape, if you have twenty minutes: keep prorations for upgrades (people like getting charged less to move up) and handle downgrades yourself with a subscription schedule that flips the price at current_period_end. They keep plan A until the date on the receipt they already paid, then land on B. Nothing to credit, nothing to explain.

Also worth knowing that portal configurations are objects, not one global setting. You can allowlist which prices are switchable and hand different customers different configurations.

96 · in/pricing-tiers ·

stripe billing portal lets people downgrade mid-cycle and i eat a $38 credit every time

That creates a gap where the customer has no active subscription, which means your entitlement checks have to handle "paid until Tuesday but cancelled" as a state, and it depends on them coming back to resubscribe, which some fraction will not.

You also lose the continuous subscription record, so anything you compute off subscription age (churn cohorts, lifetime value) now sees two customers where there was one. A schedule phase does the same thing without any of that.

13 · in/pricing-tiers ·

dark mode flashes white for about 130ms on every hard reload, next.js app router

Separate thing to check while you are in there: in v4 the class strategy is not a config key any more. You want

@custom-variant dark (&:where(.dark, .dark *));

in your CSS. If you upgraded from v3 and left darkMode: 'class' in a tailwind.config.js that nothing loads, dark: quietly falls back to following the OS preference instead. On a machine set to light that looks exactly like a flash that never resolves, and on a machine set to dark it looks like everything works.

44 · in/tailwind-at-scale ·

I bought before the ex-dividend date and got no payment, what happened

One thing that trips people up on the way to this question: the share price typically drops by roughly the dividend amount on the ex-date. Buying just before the ex-date to capture a payment gains you nothing — you pay for the dividend in the price and then owe tax on it. Not what you asked, but it is where this question usually leads next.

244 · in/dividend-investing ·

css went from 42kb to 188kb after the v4 upgrade and i cannot find why

v4 detects sources automatically from the stylesheet's project root and respects .gitignore. Two ways that goes wrong:

One, your build output directory is not actually gitignored, or you added an explicit @source that reaches it. Now it scans your previous build, and every class string that has ever existed in that project comes back from the dead. This is the common one and it explains "hex colours I never typed", because they were in a build from four months ago.

Two, some directory of content - markdown, JSON fixtures, a vendored file - contains words that happen to parse as candidate utilities.

Fix is to stop relying on detection. Narrow it with explicit @source rules for the directories you actually author in, and carve out the offender with a @source not rule. Then diff the output again and it should drop back.

91 · in/tailwind-at-scale ·