question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to share styles across publishable libs?

See original GitHub issue

Description

I have a monolithic app and now I split it into publishable libs which I am going to use in that app. There are some common styles like variables and mixing in main app. And I want to reuse that styles into my libs. I have tried to move styles into separate lib and I was able to reuse them in main app through configuration in angular.json (stylePreprocessorOptions) but I can’t use these styles in other libraries. Is there any ideas how can I manage this situation?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:31
  • Comments:63 (4 by maintainers)

github_iconTop GitHub Comments

33reactions
tommckcommented, May 14, 2021

Honestly, I think we should have a built-in “@nrwl/angular:style-library” schematic or something like that. Having to guess and try various things is disappointing

23reactions
yharaskrikcommented, Mar 3, 2021

I believe this is still an issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sharing styles between apps inside Nx workspace
Creating a lib for styles. The best solution for my case was to create a lib named ui for the styles: nx generate...
Read more >
Best practices: components, styles, and shared libraries - Figma
Libraries : In Figma, you can share components and styles by publishing them. This turns your file into a library, so you can...
Read more >
Angular 6 library shared stylesheets - Stack Overflow
Angular CLI generates a lib with a root component & component scss, but the styles added or imported to the root component are...
Read more >
How to share Figma components across files - UX Collective
Once you click on “Enable libraries” under the “Team libraries” title you'll get a list of files that have published styles and components ......
Read more >
How to share css among multiple angular projects? - Reddit
In one of my projects, I just build the styles myself and copy them to dist/ in the postbuild hook and package the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found