Skip to content
Discussion options

You must be logged in to vote

Great question! The short answer is: you can't make many assumptions about el beyond it being an HTMLElement.

el is not created or managed by anywidget. It's provided by the host platform (Jupyter Notebook, JupyterLab, VS Code, marimo, Colab, etc.). Each platform creates and manages that element differently, so anywidget intentionally makes no guarantees about its styling, positioning, or behavior beyond the AFM spec, which just says it's an HTMLElement that represents your widget's display area.

This means things like position, display, sizing behavior, and whether inline styles get reset are all platform-specific. The behavior you're seeing (VS Code resetting certain inline styles) is a…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@almarklein
Comment options

@almarklein
Comment options

Answer selected by almarklein
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants