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

CSS Build Process #6966

Open
javag97 opened this issue Aug 7, 2019 · 1 comment
Open

CSS Build Process #6966

javag97 opened this issue Aug 7, 2019 · 1 comment
Labels
documentation enhancement help wanted tag:CSS For general CSS related issues and pecadilloes
Milestone

Comments

@javag97
Copy link

javag97 commented Aug 7, 2019

My name is Javier and I am a UI/UX Design Intern with Jupyter Cal Poly. @isabela-pf and I were wondering how CSS is structured in JupyterLab. We've been working with variables.css in jupyterlab/packages/theme-light-extension/style/variables.css. Our goal is to find ways to make it easier for designers to work with developers.

We see that there are lots of imported style sheets that are both within JupyterLab and outside (ex: Phosphor). We want to understand how these imports interact so that we can design more accurately with this knowledge. For example, instead of giving developers hard-coded hexadecimal values, we've been giving the appropriate color variables. This helps both designers design more accurately and developers implement UI quickly within the preexisting CSS framework.

On a higher level, we're looking at trying to hand developers components rather than static images. To do this, we want to understand how JupyterLab currently puts all of these pieces together. If any developers have experience working with JupyterLab CSS, can you explain how it was organized?

@blink1073
Copy link
Member

Hi @javag97! The following documentation probably belongs in https://github.com/jupyterlab/jupyterlab/blob/master/docs/source/developer/css.rst.

JupyterLab itself pulls in CSS in the following order:

  • application-extension
  • the rest of the non-theme extensions in alphabetical order.

The extensions import the CSS of their dependent packages in order of dependency level and then import their local CSS (in base.css).

We import Phosphor's base CSS before importing any of our own CSS to make it easier to override styles without adding CSS specificity.

The theme is loaded at run-time and brings in its CSS variable values and its icons/fonts.

An example of loading CSS from a third party application is our filebrowser example. It loads the application CSS, then the CSS of its dependencies in order, the light theme CSS, and finally its local overrides.

@blink1073 blink1073 added this to the 1.1 milestone Aug 14, 2019
@blink1073 blink1073 added enhancement tag:CSS For general CSS related issues and pecadilloes labels Aug 14, 2019
@blink1073 blink1073 modified the milestones: 1.1, 1.2 Aug 27, 2019
@jasongrout jasongrout modified the milestones: 1.2, 2.0 Oct 11, 2019
@jasongrout jasongrout modified the milestones: 2.0, Future Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation enhancement help wanted tag:CSS For general CSS related issues and pecadilloes
Projects
None yet
Development

No branches or pull requests

3 participants