我正在开发一个 React 应用程序,并在 JS 库中使用 withStyles
CSS 来处理 CSS。我在 Mozilla 中遇到一个问题,我必须根据 Mozilla 浏览器更改高度属性。如何在 JS 中使用 CSS 更改它?似乎 @-moz-document url-prefix()
在 withStyles 中不起作用。
const styles = theme => ({
radioGroupRoot : {
backgroundColor : "#fff9d8",
alignItems : "center",
marginTop : '15px'
},
labelRoot : {
margin : 0,
width : "100%",
alignItems : "end"
},
radioLabel : {
width : "100%",
backgroundColor: "#fff9d8"
},
radioRoot : {
height : "37px",
width : "37px",
color : 'rgba(0, 0, 0, 0.7)'
},
'@-moz-document url-prefix()' : {
radioRoot : {
height: '52px'
}
}
});
最佳答案
Firefox 61 已禁用 @-moz-document CSS at 规则以降低 CSS 注入(inject)攻击的风险
https://bugzilla.mozilla.org/show_bug.cgi?id=1449753
试试
@supports ( -moz-appearance:none ){
/* Add firefox CSS code here */
}
关于javascript - 如何使用 withStyles 编写特定于 Mozilla 的 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56593433/