akveo / akveo/nebular

Changing theme does not update styles from nb-install-component

未关闭
#2,516 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
8.1k
派生
1.5k
PR 合并指标
30 天内没有已合并 PR

描述

### Issue type

**I'm submitting a ...** (check one with "x")

* [ x] bug report
* [ ] feature request

### Issue description

**Current behavior:**

Changing theme with a switch (using themeService.changeTheme('dark')) results in losing the classes defined in nb-install-component. While in the default theme those styles can use theme colors using nb-theme, after changing theme all styles defined in that block stop taking effect.
I have also observed problems themeService.currentTheme returning 'default' after changing to 'dark'. It can be a bug in my code, or caused by using Storybook, but I would like to request adding it to the documentation of themeService.
**Expected behavior:**

The colors described in scss should change to their maching versions from new theme, and all the other styles should still work.
**Steps to reproduce:**

1. Create angular library
2. Create component with the provided code
3. Add component to a Story
4. npm run storybook
Alternately you can just create an Angular project
**Related code:**

@include nb-install-component {
@include nb-theme-global();
.uploadfilecontainer {
background-repeat: no-repeat;
background-size: 10em;
background-position: center;
height: 20em;
width: 80%;
margin: 2em auto;
background-color: nb-theme(color-primary-300);
border: 0.2em dashed nb-theme(color-primary-500);
border-radius: 10em;
}

.uploadfilecontainer:hover {
cursor: pointer;
background-color: nb-theme(color-primary-400);
opacity: 0.5;
}
}

### Other information:

**npm, node, OS, Browser**

Node, npm:
node --version
v12.4.0
npm --version
6.12.0
OS: Windows 10
Browser: Opera

**Angular, Nebular**

"@angular/core": "~10.0.6",
"@nebular/auth": "^6.0.0",
"@nebular/eva-icons": "^6.0.0",
"@nebular/theme": "^6.0.1",

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。