akveo / akveo/nebular

Web Component

Open
#1,748 0 comments 0 reactions 0 assignees View on GitHub
module:theme needs triage P4: nice to have
Dominant language
TypeScript
Stars
8.1k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

### Issue type

* [x] bug report
* [x] feature request

### Issue description

**Current behavior:**
Web Component based on Nebular theming system does not correctly import the CSS rules using _"view encapsulation"_ **ShadowDom** in AppComponent

**Expected behavior:**
Nebular styles are applied to the ShadowDom when the theme is installed also in the root component.

Maybe I miss some configurations, but I can see correct behavior if I configure the project like in the stackblitz example linked below.

The workaround was to put a div that surrounds the root component where has been inserted the CSS class of the currently selected theme.

**Steps to reproduce:**
- Create a new angular project with nebular
- Create a nested module with a component
- Refactor AppModule for generate a web component whit ShadowDom encapsulation
- (optional) Build project and deploy in a html page

working example --> [StackBlitz Nebular Web Component](https://stackblitz.com/edit/github-unajr2?file=src%2Fapp%2Fapp.component.ts)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.