From 5d923a64bdbb211c57b815dd5723f416b56d59ec Mon Sep 17 00:00:00 2001 From: Sergey Andrievskiy Date: Thu, 25 Apr 2019 16:08:05 +0300 Subject: [PATCH] feat(search): Eva theme (#1419) BREAKING CHANGE: Following theme properties renamed: search-bg -> search-background-color search-bg-secondary -> search-extra-background-color search-text -> search-text-color search-info -> search-info-text-color search-dash -> search-divider-color search-placeholder -> search-placeholder-text-color Following theme properties removed: search-btn-open-fg search-btn-close-fg --- .../search/_search.component.theme.scss | 60 +++++++++---------- .../components/search/search.component.ts | 11 ++-- .../theme/components/search/search.module.ts | 2 + .../theme/styles/themes/_default.scss | 29 ++++++--- 4 files changed, 59 insertions(+), 43 deletions(-) diff --git a/src/framework/theme/components/search/_search.component.theme.scss b/src/framework/theme/components/search/_search.component.theme.scss index 5beefde0d5..4f439d5aef 100644 --- a/src/framework/theme/components/search/_search.component.theme.scss +++ b/src/framework/theme/components/search/_search.component.theme.scss @@ -9,22 +9,26 @@ nb-search-field { .search { - background: nb-theme(search-bg); - - button { - color: nb-theme(search-btn-close-fg); - } - - span { - color: nb-theme(search-info); + background: nb-theme(search-background-color); + + span.info { + color: nb-theme(search-info-text-color); + font-family: nb-theme(search-info-text-font-family); + font-size: nb-theme(search-info-text-font-size); + font-weight: nb-theme(search-info-text-font-weight); + line-height: nb-theme(search-info-text-line-height); } input { - color: nb-theme(search-text); - border-bottom: 4px solid nb-theme(search-dash); + border-bottom: nb-theme(search-divider-width) nb-theme(search-divider-style) nb-theme(search-divider-color); + color: nb-theme(search-text-color); + font-family: nb-theme(search-text-font-family); + font-size: nb-theme(search-text-font-size); + font-weight: nb-theme(search-text-font-weight); + line-height: nb-theme(search-text-line-height); &::placeholder { - color: nb-theme(search-placeholder); + color: nb-theme(search-placeholder-text-color); } &::-ms-clear { @@ -35,60 +39,54 @@ &.rotate-layout { opacity: 0; - background: nb-theme(search-bg); + background: nb-theme(search-background-color); } &.modal-zoomin { .search::before, .search::after { - border: 1.5rem solid nb-theme(search-bg-secondary); + border: 1.5rem solid nb-theme(search-extra-background-color); } } - &.modal-half { - .form-wrapper { - background: nb-theme(search-bg); - } + &.modal-half { + .form-wrapper { + background: nb-theme(search-background-color); + } .search::before { - background: nb-theme(search-bg-secondary); + background: nb-theme(search-extra-background-color); } } &.modal-drop { .form-content::after { - background: nb-theme(search-dash); + background: nb-theme(search-divider-color); } .search::before { - background: nb-theme(search-bg); + background: nb-theme(search-background-color); } } &.curtain { .search::after { - background: nb-theme(search-bg); + background: nb-theme(search-background-color); } .search { - background: nb-theme(search-bg); + background: nb-theme(search-background-color); } } - &.column-curtain { + &.column-curtain { &::before { - background: nb-theme(search-bg); + background: nb-theme(search-background-color); } &::after { background: transparent; } &.show::after { - background: nb-theme(search-bg-secondary); + background: nb-theme(search-extra-background-color); } - } - } - - nb-search { - button { - color: nb-theme(search-btn-open-fg); } } } diff --git a/src/framework/theme/components/search/search.component.ts b/src/framework/theme/components/search/search.component.ts index 2569008265..a81bc30b05 100644 --- a/src/framework/theme/components/search/search.component.ts +++ b/src/framework/theme/components/search/search.component.ts @@ -47,7 +47,7 @@ import { NbOverlayService, NbOverlayRef, NbPortalDirective } from '../cdk'; ], template: `