krish-adi / barfi

Python Flow Based Programming environment that provides a graphical programming environment.
https://barfi.readthedocs.io
MIT License
670 stars 73 forks source link

[Feature Request] Add style parameter to barfi.st_barfi #24

Open GsLogiMaker opened 1 year ago

GsLogiMaker commented 1 year ago

It is impossible, or very difficult, to change the styling of Barfi to fit a specific project.

For example, I wanted to remove the Menu and Execute buttons using css because they don't fit the functionality of my program, but the Barfi graph is locked behind an iframe and I could not find a way around it.

I propose that a new parameter, style, should be added to bf.st_barfi, which is a string of css that is inserted into the iframe (I don't know how this would be done, or if it is feasible).

The below example would create a Barfi graph where the color of the backgrounds of the nodes are red.

bf.st_barfi(
    [],
    style="""
        .node > .__content {
            background: red;
        }
    """,
)

Which looks like this: Screenshot from 2023-09-21 11-34-02