Shopify-如何为自定义产品页面定义容器宽度?

问题描述

我正在尝试开发Shopify应用,以为不同商店生成自定义产品页面。该页面将包含产品列表或网格。

如何像截图一样定义容器的宽度?

enter image description here

一些免费的主题(例如Debut)在theme.scss.liquid中使用了“页面宽度”类(出现两次)

.page-width {
  @include clearfix();
  max-width: $width-site;
  margin: 0 auto;
}

.page-width {
  padding-left: $gutter-site;
  padding-right: $gutter-site;

  @include media-query($small) {
    padding-left: $gutter-site-mobile;
    padding-right: $gutter-site-mobile;
  }
}

问题在于所有主题都不同。最简单的方法是在可用的情况下使用页面宽度。对于某些没有此类的主题,它将变得混乱。

我不确定用硬编码的$变量定义页面宽度类是否正确。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...