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

[BUG] Styles loaded with styleUrls are not encapsulated #142

Closed
1 of 2 tasks
miluoshi opened this issue Nov 14, 2022 · 1 comment
Closed
1 of 2 tasks

[BUG] Styles loaded with styleUrls are not encapsulated #142

miluoshi opened this issue Nov 14, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@miluoshi
Copy link
Contributor

Please provide the environment you discovered this bug in.

See this StackBlitz: https://stackblitz.com/edit/github-32hhow?file=src/app/app.component.ts

See app.component.ts that includes both css and scss styles in styleUrls

Which area/package is the issue in?

vite-plugin-angular

Description

When using styleUrls to include styles to a component, each stylesheet gets included twice - once encapsulated, once not encapsulated. Another problem is that encapsulated copy of scss stylesheet is not transpiled to css.

In the included example, I've included red h1 text color in css stylesheet and yellow color in scss stylesheet. See the screenshot:
image

There's another bug related to this issue - inline scss style is not transpiled to css even though the plugin options are set to { inlineStylesExtension: 'scss' } (see .read-the-docs class in the example)
image

Please provide the exception or error you saw

No response

Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@miluoshi
Copy link
Contributor Author

It works in the latest 0.2.0-alpha.18 version. Thanks! 🎉

Villanuevand pushed a commit to Villanuevand/analog that referenced this issue Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant