Upstream existing developments

Thanks for wiring the issues.

Those are more workarounds than proper patches. Maybe the css class via env can be merged as is, but the rest needs serious rework…