Weird border when using Angular Material #9993
-
What version of Tailwind CSS are you using? I'm using Tailwind 3.2.4 What build tool (or framework if it abstracts the build tool) are you using? I'm using Angular 15.0.1, Angular Material/CDK 15.0.2. What version of Node.js are you using? v16.14.2 What browser are you using? Chrome What operating system are you using? macOS Reproduction URL Here is a repo to reproduce the issue https://github.com/shadow1349/angular-tailwind-issue-repro Describe your issue When I use Tailwind and Angular Material I get this weird border. If you look at the repo I linked you'll be able to run that and see what I mean. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
The following element, .mdc-text-field--focused .mdc-notched-outline__leading,
.mdc-text-field--focused .mdc-notched-outline__notch,
.mdc-text-field--focused .mdc-notched-outline__trailing {
border-width: 2px;
} It seems like the library assumes that its elements would have default
|
Beta Was this translation helpful? Give feedback.
-
@shadow1349 Can you show what exactly did you do to remedy that problem? |
Beta Was this translation helpful? Give feedback.
The following element,
.mdc-notched-outline__notch
:is responsible for the border. This is because of the following rule:
It seems like the library assumes that its elements would have default
border-style: none
but as you point out, Tailwind preflight setsborder-style: solid
for all elements. To resolve your problem you could consider: