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

Support for a global SCSS file #20859

Closed
snide opened this issue Jul 16, 2018 · 5 comments
Closed

Support for a global SCSS file #20859

snide opened this issue Jul 16, 2018 · 5 comments
Assignees
Labels
Team:Operations Team label for Operations Team v6.5.0

Comments

@snide
Copy link
Contributor

snide commented Jul 16, 2018

#19643 (comment) added the ability for plugins to generate css files from sass included in plugins.

What we'll also need need is a way to generate a core (across every kibana page) css file (from a scss file) that is included on every Kibana page.

As an example... here is what the load order of css on a random app within kibana should look like:

eui_theme_k6.dark.css (hard import from EUI, loaded on all pages, this already works)
kibana.css (compiled from SCSS, loaded on all pages, regardless of routing, this is done in styles.js now)
named_plugin.css (compiled from SCSS, loaded only on routes of that plugin)

Right now the equivalent of kibana.css lives in src/ui/public/styles Less files and is generated in styles.js

I don't think this would ever require something complicated, so it could be a hardcoded src/public/index.scss file if we wanted. The sass watcher would just need to generate a css file from that location and then reference itself in Kibana's chrome.

@snide snide added the Team:Operations Team label for Operations Team label Jul 16, 2018
@tylersmalley tylersmalley changed the title Kibana SCSS compilation needs a way to compile a kibana.css file included on all pages Support for a global SCSS file Jul 24, 2018
@snide
Copy link
Contributor Author

snide commented Jul 24, 2018

So. I looked into a couple different workaround for this and none of them are very clean. Here's some helpful info for when you decide to tackle this. This shows the current structure vs. what we'd like.

image

image

@snide
Copy link
Contributor Author

snide commented Aug 16, 2018

Just some fair warning, we're working through the plugins at the moment so we're still good without this, but I'm guessing in about 2 weeks we'll be blocked by it.

Still think a hardcoded reference in your build scripts is likely (src/ui/index.scss or similar) would be ok. We will only need one file built for this part. It's mostly the load order in the document that matters to us.

@snide
Copy link
Contributor Author

snide commented Aug 24, 2018

Gonna need this one fairly soon. Would still like to get all of the less converted by 6.5 and this will be a blocker.

@tylersmalley
Copy link
Contributor

Thanks for the heads up @snide. Will try to get this in soon.

@snide
Copy link
Contributor Author

snide commented Sep 10, 2018

I think we're at a point where this might block us from getting all of the sass work done in 6.5.

We have planned:

  • Viz (going in soon)
  • Graph
  • Timelion
  • ML

All the other styling (which is the majority of styles) live either as a global (src/ui) or have mixed usage between xpack and core (management...etc). We're gonna try and take on some of the files we know don't change often (like Watcher) in anticipation of the build solution dropping, but because of the amount of code changing (as well as file moves), they make rebases very difficult so can't sit around too long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Operations Team label for Operations Team v6.5.0
Projects
None yet
Development

No branches or pull requests

2 participants