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

Remove bootstrap from frontend #8

Open
pbugnion opened this issue Oct 15, 2017 · 4 comments
Open

Remove bootstrap from frontend #8

pbugnion opened this issue Oct 15, 2017 · 4 comments

Comments

@pbugnion
Copy link
Owner

pbugnion commented Oct 15, 2017

At the moment, we include the Bootstrap CSS. This changes the behaviour of other CSS rules on the page. In particular, since Bootstrap is not included in the ipywidgets embed by default, including bootstrap here leads to slight differences in layout.

For instance, the buttons in the example of issue #6 are not aligned.

The only reason Bootstrap was included was to access the grid layout. We can reproduce this manually without resorting to Bootstrap.

@maryna-yanul
Copy link

maryna-yanul commented Oct 15, 2017

@pbugnion
Copy link
Owner Author

Thanks for this! Unfortunately, this does not help because it seems that, even the most minimal bootstrap normalizes CSS properties so that the DOM behaves in a similar way across all browsers.

Note that I'm not against normalizing CSS properties in principle. I just think that the CSS we provide needs to match the CSS provided by the ipywidgets embed bundle so that users get a consistent experience.

@DougRzz
Copy link

DougRzz commented Nov 12, 2017

I edit this css file to customise my Notebooks. : C:\Users'UserID'\Miniconda3\Lib\site-packages\notebook\static\style\style.min.css

There are many other ways of customising the Jupyter Notebook. For example, the Stackoverflow answers in the link below suggest several methods to change the width of the Jupyter cells. https://stackoverflow.com/questions/21971449/how-do-i-increase-the-cell-width-of-the-jupyter-ipython-notebook-in-my-browser

Perhaps the user could specify the css file in the command line to override Bootstrap CSS settings. This would enable a consistent experience between Jupyter and ipywidgets-server.

@pbugnion
Copy link
Owner Author

pbugnion commented Nov 13, 2017

When the users can specify their own HTML file (x.ref issue #5 ), they can choose to serve arbitrary CSS (including overriding any bootstrap defaults that they want).

The rationale for this issue is just that bootstrap adds a lot of CSS rules that we don't need, and that might lead to complex errors that are hard for the user to diagnose (like the misaligned buttons in the bqplot example from issue #6).

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

3 participants