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

Make the sidebar a web component #290

Open
karger opened this issue Nov 15, 2024 · 0 comments
Open

Make the sidebar a web component #290

karger opened this issue Nov 15, 2024 · 0 comments

Comments

@karger
Copy link
Member

karger commented Nov 15, 2024

Since NB places its html in the page itself, it is susceptible to influence from the CSS of the containing page. Every once in a while someone makes changes to the CSS on a page containing NB, and it breaks the NB sidebar. The introduction of web components and their shadow DOM provides a mechanism to shield a part of the page from the influence of the CSS on the containing page. I'm not sure we want to go all the way to creating a web component, but I think it should be pretty straightforward to use a declarative shadow DOM. Note that since the shadow DOM shields the CSS, you'll need to load the CSS for the NB sidebar into the element inside the shadow DOM, instead of into the containing page.

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

1 participant