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.

Angular material + Tailwind: want to setup a clean ng project from scratch

See original GitHub issue

I’m submitting a…


[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  
[ ] Performance issue
[X] Feature request
[ ] Documentation issue or request
[X] Support request
[ ] Other... Please describe:

Current behavior

There is two case: This one is working :

ng new ng-material-tailwind
ng add @angular/material # ok
ng add @ngneat/tailwind # ok

But I have css issues : Material’s styles override Tailwind’s styles and @apply or `#{!mportant} throw errors at compilation : 2020-10-24-021430_413x714_scrot 2020-10-24-162017_842x601_scrot

And this one is not working (because material need the official schematics) :

ng new ng-tailwind-material
ng add @ngneat/tailwind # ok
ng add @angular/material # not ok
# ...
✔ Packages installed successfully.
Your project is not using the default builders for "build". The Angular Material schematics cannot add a theme to the workspace configuration if the builder has been changed

2020-10-24-020910_1583x447_scrot

Expected behavior

  • I wish to make tailwind override Material’s styles in the first repo here (I simply don’t know how to)
  • ng add @ngneat/tailwind should works independently of ng add @angular/material

What is the motivation / use case for changing the behavior?

Just a new cli project, and ng add command.

Environment


Angular CLI: 10.0.8
Node: 12.18.3
OS: linux x64

Angular: 10.0.14
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1000.8
@angular-devkit/build-angular     0.1000.8
@angular-devkit/build-optimizer   0.1000.8
@angular-devkit/build-webpack     0.1000.8
@angular-devkit/core              10.0.8
@angular-devkit/schematics        10.0.8
@angular/cdk                      10.2.5
@angular/cli                      10.0.8
@angular/material                 10.2.5
@ngtools/webpack                  10.0.8
@schematics/angular               10.0.8
@schematics/update                0.1000.8
rxjs                              6.5.5
typescript                        3.9.7
webpack                           4.43.0


Browser:
- [X] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: v12.18.3
- Platform:  Manjaro i3
- Others: VSCode, yarn

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

1reaction
nartccommented, Nov 14, 2020

@E-jarod Hi, I have not had time to dive into this issue as I’ve been going through some new job transitioning myself. I’ll take a closer look asap. Sorry for any inconvenience.

0reactions
nartccommented, Dec 3, 2020

Closed in favor of #24

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setup TailwindCSS in Angular the easy way
First step is to run the following schematic in your Angular project: ng add @ngneat/tailwind · When asked if you want to enable...
Read more >
Setup TailwindCSS in Angular Project - YouTube
In this video, we'll take a look at how we can setup tailwindcss inside of an Angular project. ://www.baljee...
Read more >
Angular, Angular Material, and TailwindCSS | by Jacob Neterer
Set Up TailwindCSS · Install dependencies · Create webpack.config.js · Modify angular.json · Initialize TailwindCSS · OPTIONAL: Setting Tailwind styles as important.
Read more >
Add examples for various UI libraries (Angular Material ...
Documentations: Add examples for various UI libraries (Angular Material, ... + Tailwind: want to setup a clean ng project from scratch #14.
Read more >
Install Tailwind CSS with Angular
Setting up Tailwind CSS in an Angular project. ... Install tailwindcss via npm, and then run the init command to generate a tailwind.config.js...
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