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

Add bolilerplate sass for Kibana core #21185

Merged
merged 2 commits into from
Jul 26, 2018
Merged

Add bolilerplate sass for Kibana core #21185

merged 2 commits into from
Jul 26, 2018

Conversation

snide
Copy link
Contributor

@snide snide commented Jul 25, 2018

This PR is related to #19748

It adds the following

  • A generic "theme" sass file that imports the EUI constants scope.
  • A index.scss files in core_plugins/kibana that imports that scope
  • A change to .gitignore to ignore all index.css files

The 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.

@snide snide requested a review from cchaos July 25, 2018 02:51
@snide snide added v7.0.0 Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. labels Jul 25, 2018
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@@ -0,0 +1 @@
@import '../../../../src/ui/public/styles/_styling_constants'
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

http://sass-lang.com/guide

Copy link
Contributor Author

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!

Copy link
Contributor

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`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scss or css?

Copy link
Contributor Author

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.

Copy link
Contributor

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. 👍

Copy link
Contributor

@cchaos cchaos left a 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.

@snide
Copy link
Contributor Author

snide commented Jul 25, 2018

Cool, I'll merge when the tests pass.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@snide
Copy link
Contributor Author

snide commented Jul 25, 2018

jenkins, test this

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@snide snide merged commit 58eefb8 into elastic:master Jul 26, 2018
@snide snide deleted the sass/shim branch July 26, 2018 01:23
snide added a commit to snide/kibana that referenced this pull request Jul 26, 2018
* Add bolilerplate sass for Kibana core
snide added a commit that referenced this pull request Jul 27, 2018
* Add bolilerplate sass for Kibana core
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants