-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Add bolilerplate sass for Kibana core #21185
Conversation
💚 Build Succeeded |
@@ -0,0 +1 @@ | |||
@import '../../../../src/ui/public/styles/_styling_constants' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd remove the prefixed underscore from _styling_constants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And add a semicolon to the end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And then in this file is where each core plugin would import the meta index.scss
file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Traditionally (or maybe just me) underscores are used for files that don't compile themselves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the file that is our "Kibana invisibiles". If we made Kibana global_styling, it would probably live here (or be imported into it).
Then a plugin... say monitoring/index.scss, imports this file as a one liner knowing that anything it builds will have that scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example of the underscore stuff on the "partials" sections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh shoot. I misread your comment. You meant the line itself. Doh!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, youp!
@@ -66,6 +66,7 @@ export default function (kibana) { | |||
listed: false, | |||
description: 'the kibana you know and love', | |||
main: 'plugins/kibana/kibana', | |||
styleSheetPath: `${__dirname}/public/index.scss`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scss
or css
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The examples @tylersmalley provided used scss here, but I think it accepts any. Basically the plugin needs a pointer to the root file it needs to compile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I wasn't sure if this was meant to point to the compiled version or the main file to compile. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me as a starting point.
Cool, I'll merge when the tests pass. |
💔 Build Failed |
jenkins, test this |
💚 Build Succeeded |
* Add bolilerplate sass for Kibana core
This PR is related to #19748
It adds the following
index.scss
files incore_plugins/kibana
that imports that scopeindex.css
filesThe later is needed because the watch / build process auto generates CSS files. The plan is to name every compiled css file index.css. I don't want to ignore *.css at large because there are some loose CSS files in Kibana (likely from vendor code).
We're adding this very small PR first so that we both have the theme available as we build out our PRs, and have a starter index.scss file to work with in
src/core_plugins/kibana
which includes quite a few of our major apps.