Regarding the media detection problem, we are designing a new version of the snap API that is accounting for this issue and will return metadata for all media specifying what media type each item is, so this will surely help with identifying banners (one of the media types would be banner).
Regarding storing the CSS, that feels like a feature that could get complicated and messy pretty easily and pretty soon.
I would advice instead to see if the snap title can be placed outside the banner, or if Gnome Software can have defined a title CSS that would show a soft white-transparent background to ensure the black text is always visible, or have a white border for each letter?
In any case I would suggest to contact our design team so they understand the problem, review the specifics, and make a recommendation.
What do you think?