嗨,我是 Material UI 和 React 的新手。尝试构建一个 wordpress 插件。管理部分我正在使用 MUI react 创建文本字段。输入文本字段边距和填充默认影响 wordpess load-style.css。
<TextField label="Role or Title" classes={classes.uniqueclass} placeholder="Developer" fullWidth />
在主题提供者中:
MuiInput: {
root: {
top: [theme.spacing(2),'!important'],
bottom: theme.spacing(0),
border: ["none",'!important'],
outline: `1px solid transparent`,
background: "transparent",
padding: theme.spacing(0),
marginBottom: theme.spacing(4),
'&$focused': {
borderColor: theme.palette.primary.main,
},
},
默认情况下,wordpress 正在加载,
input[type=checkbox]:focus, input[type=color]:focus, input[type=date]:focus, input[type=datetime-local]:focus, input[type=datetime]:focus, input[type=email]:focus, input[type=month]:focus, input[type=number]:focus, input[type=password]:focus, input[type=radio]:focus, input[type=search]:focus, input[type=tel]:focus, input[type=text]:focus, input[type=time]:focus, input[type=url]:focus, input[type=week]:focus, select:focus, textarea:focus {
border-color: #2271b1;
box-shadow: 0 0 0 1px #2271b1;
outline: 2px solid transparent;
}
那么,如何为所有文本和选择字段全局覆盖它。提前致谢