Comments (8)
Easy enough to change, but currently that's behaving as intended. I'm a bit torn on this one 😄
@toby What do you think?
from glamour.
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.
from glamour.
Yeah, makes sense.
from glamour.
That’s still not something we can also do with code colored by Chroma, eh?
from glamour.
We can do it, but we'd have to adjust the chroma theme's background color to the same value.
from glamour.
If it can apply the theme’s background By default that’s actually good. Would mean light themes can work on dark terminals.
from glamour.
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.
from glamour.
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.
from glamour.
Related Issues (20)
- disable trailing space highlighting in code blocks HOT 2
- feat: support clickable relative filepaths HOT 2
- setting table width ?
- code block - would it be possible to render a box around blocks of code?
- refactor: replace TableWriter with lipgloss table HOT 3
- Line feed in vim code block rendered as error
- Go Modules URI incorrectly parsed as mailto link HOT 1
- refactor: use lipgloss renderer for list rendering
- [BUG] cases when backslash should not be shown
- Highlight even row in table
- Unit tests failed: Rendered output doesn't match!
- High CVE on golang.org/x/net
- How to set a custom color for a line or h1 header?
- Reduce minimum dependency size
- TermRenderer Read/Write purpose HOT 1
- Autolink element is not displayed
- Provide a Glamour CLI tool HOT 3
- Easily clone existing style configs to make small adjustments?
- Incorrect auto theme HOT 1
- dracula theme does not load correctly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glamour.