This is a concrete proposal for a gap decorations feature that covers the use cases and ideas discussed in the issues #2748 and #5080. (I've made a prototype implementation of this in Gecko to ensure it's feasible to implement.)
I'd appreciate any feedback you might have on this proposal in this issue. Thank you.