Pico CSS¹ essentially works like that, so you can hard-override any of its exposed variables² to suit your needs.
I discovered it through FastHTML (it was the CSS Jeremy and Johno Whitaker used in their first-ever demo³ early June), and find the 'dx' simple, stupid, in a great way.