首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Tailwindcss时在焦点上输入15角度的材料错误

使用Tailwindcss时在焦点上输入15角度的材料错误
EN

Stack Overflow用户
提问于 2022-11-19 12:47:46
回答 1查看 89关注 0票数 3

在聚焦之前:

聚焦后:

问题:

使用角垫第15节和最新的尾风,有一个错误,当聚焦输入场。

为了重现这个问题:

代码语言:javascript
复制
ng new angular-test
cd angular-test
ng add @angular/material
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init

tailwind.config.js

代码语言:javascript
复制
/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    "./src/**/*.{html,ts}",
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

styles.scss

代码语言:javascript
复制
[...]

/* You can add global styles to this file, and also import other style files */

@tailwind base;
@tailwind components;
@tailwind utilities;

app.component.html

代码语言:javascript
复制
<mat-form-field appearance="outline">
  <mat-label>Favorite food</mat-label>
  <input matInput placeholder="Ex. Pizza" value="Sushi">
</mat-form-field>

有什么办法解决这个问题吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-11-19 14:47:35

“顺风”正在添加边框样式: solid;这将导致呈现额外的边框。

快速解决方案是覆盖正确的边框样式。

将其添加到styles.css文件中

代码语言:javascript
复制
.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch {
  border-right-style: hidden;
}
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74500132

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档