Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fill: css gradient support? #230

Open
sbrl opened this issue Jan 24, 2025 · 1 comment
Open

fill: css gradient support? #230

sbrl opened this issue Jan 24, 2025 · 1 comment

Comments

@sbrl
Copy link

sbrl commented Jan 24, 2025

Heya,

In a nomnoml diagram, you can change the background:

#.testing: fill=#f9c
[<testing>I has a kewl b/g!]

....but you can't use CSS gradients:

#.party: fill=linear-gradient(#f44,#ff4,#4f4,#44f,#f4f)
[<party>:D]

....as they currently result in a black background.

Haven't checked the nomnoml code, but if you're setting the background of each box via CSS as the .classname seems to suggest in the syntax, then in theory it might be possible to add gradient support, though it might complicate the syntax rather?

@skanaar
Copy link
Owner

skanaar commented Jan 28, 2025

The boxes are rendered either on a Canvas element or as SVG, and it seems neither of those systems accepts linear-gradient. Both have other ways of doing gradients however, but it is a bit out-of-scope for nomnoml to include support for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants