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

Feature request: support viewEncapsulation.Native and ShadowDom #96

Closed
arthurRbr opened this issue Sep 12, 2018 · 3 comments
Closed

Feature request: support viewEncapsulation.Native and ShadowDom #96

arthurRbr opened this issue Sep 12, 2018 · 3 comments

Comments

@arthurRbr
Copy link

When using viewEncapsulation.Native (shadow DOM), some styles are missing in the component because they are set globally in the head section. For example, you cannot set the size.

This would be a nice evolution to support Angular Elements (web components) that can be shared across other websites without leaking on the global DOM.

@RezaRahmati
Copy link

RezaRahmati commented Sep 18, 2018

Please support this feature, it's needed when creating web components

@Amiral1 did you find a workaround for size?

@devoto13
Copy link
Collaborator

devoto13 commented Sep 19, 2018

I think the root cause is that styles used by FA are not component scoped (#18 and #48). We'll have to solve this issue first. That alone may be enough to resolve the problem described here.

One (dirty) workaround I can think of is to extend FaIconComponent in your own code, set desired view encapsulation and add style.css file (mentioned here) to its styleUrls. Also add window.FontAwesomeConfig.autoAddCss = false right after first import from angular-fontawesome to prevent FA from adding global CSS. Never mind, it won't work.

@bjornharvold
Copy link

bjornharvold commented Mar 23, 2019

Would love support for this and also with Angular's new ViewEncapsulation.ShadowDom. Similar work has been done here: https://github.com/oliverandrich/fa-icon-polymer

@devoto13 devoto13 changed the title Feature request: support viewEncapsulation.Native Feature request: support viewEncapsulation.Native and ShadowDom Sep 10, 2020
devoto13 added a commit to devoto13/angular-fontawesome that referenced this issue May 14, 2024
devoto13 added a commit to devoto13/angular-fontawesome that referenced this issue May 14, 2024
devoto13 added a commit to devoto13/angular-fontawesome that referenced this issue May 14, 2024
devoto13 added a commit to devoto13/angular-fontawesome that referenced this issue May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants