我正在尝试重新定义媒体查询中的$susy属性容器。我在试着跑
@include breakpoint($mobile) {
$susy: (
container: 100%,
);
}
当我编译cmd时,建议尝试使用$susy:(container: 100%)!global -我试过了,但不起作用。
有什么想法吗?
谢谢
发布于 2014-07-27 17:51:41
据我所知,$susy是设置站点基本布局的全局设置。对于断点的后续布局,我将使用新的地图,例如$tablet、$desktop。
发布于 2014-08-03 22:10:02
$susy
是一个全局设置,并且Sass不会将变量更改的范围设置为媒体上下文。你可以按照@user2713715的建议去做,并给其他布局起新的名字,但是Susy也有一个工具可以帮助你将这些设置应用到不同的代码块中。最基本的是with-layout
@include breakpoint($mobile) {
@include with-layout(100%) { // can pass in shorthand, or a map of new settings
// any code in here will use the new layout...
}
}
但是,如果你使用断点,我们有一个更好的捷径:
@include susy-breakpoint($mobile, (container: 100%)) {
// again: you can use the shorthand or a settings map.
// any code in here will use the new layout...
}
https://stackoverflow.com/questions/24983446
复制相似问题