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.

Is it possible to import angular material themes?

See original GitHub issue

Hello stackblitz Team, this tool is really awesome! So fast, great job you’ve being done.

I’m trying to run my very simple project with Angular Material hosted at Github, and I’ve imported my CSS theme file into style.css as below

@import '~@angular/material/prebuilt-themes/deeppurple-amber.css';

So I’ve got a Error Error: ENOENT: No such file or directory., '/dev/null'

It seams like the stackblitz canno’t file such file to import

You could try https://stackblitz.com/github/almeidaalex/abank Thx!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:14
  • Comments:17

github_iconTop GitHub Comments

1reaction
thw0rtedcommented, Jun 10, 2021

@purplem1lk , it’s been a month and I’m still having the issue.

  1. I began with the starter from the Angular Components bug report template.
  2. I opened styles.scss and changed @import '~@angular/material/prebuilt-themes/deeppurple-amber.css'; to @use '~@angular/material' as mat;, per the Angular theme guide.
  3. As soon as I add the @use line, the app rebuilds and the output window shows

image

(I need to put together a simple example application that uses a dark theme, and AFAICT there is still no option for a prebuilt dark theme.)

1reaction
benni94commented, Apr 8, 2021

in my case rename the styles.css file to style.scss resolved it. also .angular-cli.json under app, styles the path with styles.scss

Read more comments on GitHub >

github_iconTop Results From Across the Web

Theming Angular Material
Imports the mat-core() Sass mixin. This includes all common styles that are used by multiple components. · Defines a theme data structure as...
Read more >
Angular material theme install - Stack Overflow
First I've installed the theme at styles.css : @import "~@angular/material/prebuilt-themes/purple-green.css";.
Read more >
How to add custom Angular Material Theme in Angular 6.
You can directly include the pre-built angular-material-theme in the styles.css file. @import '@angular/material/prebuilt-themes/deeppurple- ...
Read more >
Custom Theme for Angular Material Components Series: Part 1
1. Create an Angular Project using Angular CLI and add Angular Material. Link to this section · Add project dependencies to package. ·...
Read more >
How to Create Custom Theme in Angular Material - positronX.io
If you are working on a real-world angular application, in that case, you might need to create a custom angular material theme to...
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