我正在尝试从Material-UI的makeStyles()
迁移到React-JSS createUseStyles()
,我很好奇如何解决使用“断点”的旧主题?在Material-UI的主题Breakpoints之间是否存在建议的迁移路径?
这时,我倾向于将遗留断点重写为显式CSS @media at-rule。当然,这会失去自定义主题Breakpoints大小的功能,但我可以接受。
例如原始断点样式:
{
[theme.breakpoints.up("md")]: {
top: "auto !important",
}
}
成为:
{
"@media screen and (min-width: 960px)": {
top: "auto !important",
}
}
这似乎是正确的选择吗?