Open meowgorithm opened 4 years ago
Easy enough to change, but currently that's behaving as intended. I'm a bit torn on this one :smile:
@toby What do you think?
In my case, when developing styles, my hope in setting the background color was to achieve something like this to aid readability. In other words, make it clear that exactly which parts are code:
Generally, I'd expect background colors on block-level elements to color the block, same as with HTML/CSS.
Yeah, makes sense.
That’s still not something we can also do with code colored by Chroma, eh?
We can do it, but we'd have to adjust the chroma theme's background color to the same value.
If it can apply the theme’s background By default that’s actually good. Would mean light themes can work on dark terminals.
Ah, that's a good idea, didn't think about doing it the other way round! I think we should be able to retrieve the chroma theme's bgcolor indeed.
After a fair amount of experimentation, it seems it still isn't possible to render a code-block in the desired fashion, even when using the prescribed approach in this comment. As far as I can tell the chroma theme background is neither picked up nor able to be overridden to achieve the desired affect. And the only way to apply any background to a codeblock results in the original description of this issue.
I'd be happy to take a stab at a PR to address if that's welcome, but the wedge for where this should happen is currently unclear to me.
When there’s a background color on a code block, should the background color also color the empty cells on the line? Given the following styling:
A code block currently renders as follows: