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

Improves dark theme support in the filter editor #13522

Merged
merged 5 commits into from
Aug 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/core_plugins/kibana/public/dashboard/styles/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ dashboard-grid {
display: block;
margin: 0;
padding: 5px;
z-index: @dashboardGridDepth;
}

.start-screen {
Expand Down
4 changes: 3 additions & 1 deletion src/ui/public/styles/variables/depth.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/**
* 1. The local nav contains tooltips which should pop over the filter bar.
* 2. The filter and local nav components should always appear above the dashboard grid items.
*/
@filterBarDepth: 1; /* 1 */
@filterBarDepth: 2; /* 1 */
@localNavDepth: 3; /* 1 */
@dashboardGridDepth: 1; /* 2 */
Copy link
Contributor

Choose a reason for hiding this comment

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

I ❤️ these comments.

9 changes: 9 additions & 0 deletions ui_framework/dist/ui_framework.css
Original file line number Diff line number Diff line change
Expand Up @@ -2498,6 +2498,9 @@ main {
border-radius: 4px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);
z-index: 1001; }
.theme-dark .kuiModal {
background-color: #525252;
border-color: #000; }

.kuiModalHeader {
display: -webkit-box;
Expand All @@ -2515,9 +2518,13 @@ main {
padding: 10px;
padding-left: 20px;
border-bottom: 1px solid #D9D9D9; }
.theme-dark .kuiModalHeader {
border-bottom-color: #000; }

.kuiModalHeader__title {
font-size: 18px; }
.theme-dark .kuiModalHeader__title {
color: #cecece; }

.kuiModalHeaderCloseButton {
display: inline-block;
Expand All @@ -2541,6 +2548,8 @@ main {

.kuiModalBodyText {
font-size: 14px; }
.theme-dark .kuiModalBodyText {
color: #cecece; }

.kuiModalFooter {
display: -webkit-box;
Expand Down
3 changes: 3 additions & 0 deletions ui_framework/doc_site/src/views/modal/modal_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ export default props => (
<GuideDemo>
<StaticConfirmModal />
</GuideDemo>
<GuideDemo isDarkTheme>
<StaticConfirmModal />
</GuideDemo>
</GuideSection>

<GuideSection
Expand Down
4 changes: 4 additions & 0 deletions ui_framework/src/components/modal/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ $modalBackgroundColor: #FFF;
$modalOverlayBackground: rgba(#000000, 0.5);
$globalModalDepth: 1000;

// Dark theme colors
$modalBorderColor--darkTheme: #000;
$modalBackgroundColor--darkTheme: #525252;

@import "modal_overlay";
@import "modal";
19 changes: 18 additions & 1 deletion ui_framework/src/components/modal/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
border-radius: $globalBorderRadius;
box-shadow: $globalBoxShadow;
z-index: $globalModalDepth + 1;

@include darkTheme {
background-color: $modalBackgroundColor--darkTheme;
border-color: $modalBorderColor--darkTheme;
}
}

.kuiModalHeader {
Expand All @@ -14,10 +19,18 @@
padding: $modalPadding;
padding-left: $modalPadding * 2;
border-bottom: $globalBorderThin;

@include darkTheme {
border-bottom-color: $modalBorderColor--darkTheme;
}
}

.kuiModalHeader__title {
font-size: $globalTitleFontSize;

@include darkTheme {
color: $globalTextColor--darkTheme;
}
}

.kuiModalHeaderCloseButton {
Expand All @@ -31,13 +44,17 @@

.kuiModalBodyText {
font-size: 14px;

@include darkTheme {
color: $globalTextColor--darkTheme;
}
}

.kuiModalFooter {
display: flex;
justify-content: flex-end;
padding: $modalPadding * 2;
padding-top:: $modalPadding;
padding-top: $modalPadding;

> * + * {
margin-left: 5px;
Expand Down